/**
 * User Dashboard Styles
 * Modern dashboard for displaying user's uploaded games
 */

/* Dashboard Container */
.cas-user-dashboard {
    background: rgba(17, 24, 39, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(75, 85, 99, 0.3);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 
                0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 1200px;
    margin: 0 auto;
}

/* Dashboard Header */
.cas-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(75, 85, 99, 0.3);
}

.cas-dashboard-title {
    color: #00cab6;
    font-size: 28px;
    font-weight: 600;
    margin: 0;
}

.cas-dashboard-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cas-welcome-text {
    color: #9ca3af;
    font-size: 14px;
}

.cas-logout-btn {
    padding: 0.5rem 1rem;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.cas-logout-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    text-decoration: none;
}

/* Stats Section */
.cas-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.cas-stat-card {
    background: rgba(31, 41, 55, 0.5);
    border: 1px solid rgba(75, 85, 99, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
}

.cas-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.cas-stat-icon {
    margin-bottom: 0.5rem;
    color: #6b7280;
}

.cas-stat-icon svg {
    width: 24px;
    height: 24px;
}

.cas-stat-views .cas-stat-icon {
    color: #3b82f6;
}

.cas-stat-downloads .cas-stat-icon {
    color: #10b981;
}

.cas-stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #00cab6;
    margin-bottom: 0.5rem;
}

.cas-stat-views .cas-stat-number {
    color: #3b82f6;
}

.cas-stat-downloads .cas-stat-number {
    color: #10b981;
}

.cas-stat-label {
    color: #9ca3af;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Action Buttons */
.cas-dashboard-actions {
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
}

.cas-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.cas-primary-btn {
    background: linear-gradient(135deg, #00cab6, #00a693);
    color: white;
}

.cas-primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 202, 182, 0.3);
    color: white;
    text-decoration: none;
}

.cas-btn-icon {
    flex-shrink: 0;
}

/* Games Section */
.cas-games-section {
    margin-top: 2rem;
}

.cas-section-title {
    color: #e5e7eb;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

/* Games Grid */
.cas-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Game Card */
.cas-game-card {
    background: rgba(31, 41, 55, 0.5);
    border: 1px solid rgba(75, 85, 99, 0.2);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.cas-game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
    border-color: rgba(0, 202, 182, 0.3);
}

/* Game Thumbnail */
.cas-game-thumbnail {
    position: relative;
    width: 100%;
    height: 180px;
    background: rgba(17, 24, 39, 0.5);
    overflow: hidden;
}

.cas-game-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cas-game-thumbnail.cas-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cas-placeholder-icon {
    color: rgba(156, 163, 175, 0.3);
}

/* Game Status Badge */
.cas-game-status {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cas-status-published {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.cas-status-pending {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.cas-status-draft {
    background: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
    border: 1px solid rgba(156, 163, 175, 0.3);
}

/* Game Info */
.cas-game-info {
    padding: 1.25rem;
}

.cas-game-title {
    color: #e5e7eb;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    line-height: 1.4;
}

.cas-game-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.cas-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #9ca3af;
    font-size: 13px;
}

.cas-meta-item svg {
    color: #6b7280;
}

.cas-game-stats {
    display: flex;
    gap: 1rem;
    margin: 0.75rem 0;
    padding: 0.75rem 0;
    border-top: 1px solid rgba(75, 85, 99, 0.2);
    border-bottom: 1px solid rgba(75, 85, 99, 0.2);
}

.cas-game-stat {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 13px;
    color: #9ca3af;
}

.cas-game-stat svg {
    flex-shrink: 0;
    color: #6b7280;
}

.cas-game-stat:first-child svg {
    color: #3b82f6;
}

.cas-game-stat:last-child svg {
    color: #10b981;
}

.cas-game-stat span {
    font-weight: 500;
}

.cas-game-date {
    color: #6b7280;
    font-size: 12px;
    margin-bottom: 1rem;
}

/* Game Actions */
.cas-game-actions {
    display: flex;
    gap: 0.5rem;
}

.cas-game-btn {
    flex: 1;
    padding: 0.5rem;
    text-align: center;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.cas-view-btn {
    background: rgba(0, 202, 182, 0.1);
    color: #00cab6;
    border: 1px solid rgba(0, 202, 182, 0.3);
}

.cas-view-btn:hover {
    background: rgba(0, 202, 182, 0.2);
    color: #00cab6;
    text-decoration: none;
}

.cas-edit-btn {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.cas-edit-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    text-decoration: none;
}

.cas-preview-btn {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.cas-preview-btn:hover {
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
    text-decoration: none;
}

.cas-finalize-btn {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
    cursor: pointer;
}

.cas-finalize-btn:hover {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.cas-finalize-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cas-finalize-btn.cas-submitted {
    background: rgba(156, 163, 175, 0.1);
    color: #9ca3af;
    border: 1px solid rgba(156, 163, 175, 0.3);
    cursor: default;
}

/* Empty State */
.cas-empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.cas-empty-icon {
    display: inline-block;
    margin-bottom: 1.5rem;
    color: rgba(156, 163, 175, 0.3);
}

.cas-empty-title {
    color: #e5e7eb;
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.cas-empty-text {
    color: #9ca3af;
    font-size: 14px;
    margin-bottom: 1.5rem;
}

.cas-empty-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #00cab6, #00a693);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.cas-empty-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 202, 182, 0.3);
    color: white;
    text-decoration: none;
}

/* Dashboard Messages */
.cas-success-message,
.cas-info-message,
.cas-error-message {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    position: relative;
}

.cas-success-message {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.cas-info-message {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #3b82f6;
}

.cas-error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.cas-success-message p,
.cas-info-message p,
.cas-error-message p {
    margin: 0 0 0.5rem 0;
}

.cas-success-message p:last-child,
.cas-info-message p:last-child,
.cas-error-message p:last-child {
    margin-bottom: 0;
}

/* Notification Toast */
.cas-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    z-index: 10000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    max-width: 400px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.cas-notification-show {
    opacity: 1;
    transform: translateX(0);
}

.cas-notification-success {
    background: rgba(34, 197, 94, 0.95);
    color: white;
    backdrop-filter: blur(10px);
}

.cas-notification-error {
    background: rgba(239, 68, 68, 0.95);
    color: white;
    backdrop-filter: blur(10px);
}

/* Legacy User Profile Support */
.cas-user-profile {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
    color: #e5e7eb;
    font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

.cas-notice {
    background: rgba(55, 65, 81, 0.3);
    border: 1px solid #00cab6;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem auto;
    max-width: 500px;
    text-align: center;
    color: #e5e7eb;
    backdrop-filter: blur(10px);
}

.cas-notice a {
    color: #00cab6;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.cas-notice a:hover {
    color: #00a896;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cas-dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .cas-dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cas-games-grid {
        grid-template-columns: 1fr;
    }
    
    .cas-user-dashboard {
        padding: 1.25rem;
    }
    
    .cas-game-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .cas-dashboard-title {
        font-size: 24px;
    }

    .cas-stat-card {
        padding: 1rem;
    }

    .cas-stat-number {
        font-size: 24px;
    }

    .cas-dashboard-actions {
        flex-direction: column;
    }

    .cas-action-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   USER PROFILE PAGE STYLES
   Purple/Blue gradient dark theme design (matching Creator Dashboard)
   ============================================ */

/* Profile Container - Full page takeover style */
.cas-user-profile {
	background: transparent !important;
	color: var(--profile-text-color, rgba(255, 255, 255, 0.9));
	font-family: var(--profile-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif);
	font-size: var(--profile-font-size, 14px);
	min-height: auto;
	padding: 0 2.5%;
	margin: 0 auto;
	max-width: 85%;
	width: 100%;
	position: relative;
	border: none;
	border-radius: 0;
	overflow: visible;
	box-shadow: none;
	box-sizing: border-box;
}

/* No gradient overlay - keep it clean */
.cas-user-profile::before {
	display: none;
}

.cas-user-profile > * {
	position: relative;
	z-index: 1;
}

/* Profile Header */
.cas-user-profile .profile-header {
	position: relative;
}

.cas-user-profile .profile-banner {
	width: auto;
	max-width: 100%;
	height: auto;
	overflow: hidden;
	position: relative;
	display: block;
	border-radius: var(--profile-border-radius, 8px);
	margin: 0 auto;
	text-align: center;
}

.cas-user-profile .profile-banner-default {
	display: none; /* Hide default/empty banner */
}

.cas-user-profile .profile-banner img {
	width: auto;
	height: auto;
	max-width: 100%;
	display: block;
	margin: 0 auto;
}

.cas-user-profile .profile-banner-default {
	display: none; /* No default banner - cleaner look */
}

.cas-user-profile .default-banner-gradient {
	display: none;
}

.cas-user-profile .profile-header-content {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px 0;
	background: transparent;
	border-bottom: none;
}

.cas-user-profile .profile-info {
	flex: 1;
}

.cas-user-profile .profile-name {
	font-size: 32px;
	font-weight: 700;
	margin: 0 0 4px 0;
	color: var(--profile-title-color, #ffffff);
	background: none;
	-webkit-background-clip: unset;
	-webkit-text-fill-color: unset;
	background-clip: unset;
	letter-spacing: normal;
}

.cas-user-profile .profile-username {
	display: none; /* Hide username for cleaner look like itch.io */
}

.cas-user-profile .profile-edit-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	background: rgba(0, 0, 0, 0.5);
	border: 2px solid rgba(255, 255, 255, 0.9);
	border-radius: 4px;
	color: #ffffff !important;
	text-decoration: none;
	font-weight: 600;
	font-size: 13px;
	transition: all 0.2s ease;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.cas-user-profile .profile-edit-btn:hover {
	background: rgba(0, 0, 0, 0.65);
	border-color: #ffffff;
	transform: none;
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.5);
	text-decoration: none;
	color: #ffffff !important;
}

/* Social Links - Simple link style like itch.io */
.cas-user-profile .profile-social-links {
	display: flex;
	gap: 8px;
	padding: 12px 0;
	background: transparent;
	border-bottom: none;
	flex-wrap: wrap;
	align-items: center;
}

/* Social links - simple text links like itch.io */
.cas-user-profile .social-link,
.cas-user-profile .profile-social-links .social-link,
.cas-user-profile a.social-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 0;
	background: transparent;
	border: none;
	border-radius: 0;
	color: var(--profile-link-color, #fa5c5c) !important;
	text-decoration: none;
	font-size: inherit; /* Inherit from theme */
	font-weight: 400;
	transition: color 0.2s ease, filter 0.2s ease;
}

.cas-user-profile .social-link:hover,
.cas-user-profile .profile-social-links .social-link:hover,
.cas-user-profile a.social-link:hover {
	background: transparent;
	border-color: transparent;
	color: var(--profile-link-color, #fa5c5c) !important;
	filter: brightness(1.2);
	transform: none;
	text-decoration: underline;
}

.cas-user-profile .social-link svg {
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	color: rgba(255, 255, 255, 0.5);
	fill: rgba(255, 255, 255, 0.5);
	stroke: rgba(255, 255, 255, 0.5);
}

/* Social link labels are now inline with URL text */

.cas-user-profile .website-link:hover,
.cas-user-profile .twitter-link:hover,
.cas-user-profile .itchio-link:hover {
	border-color: transparent;
	box-shadow: none;
}

/* Profile Description - clean, no card */
.cas-user-profile .profile-description {
	padding: 16px 0;
	background: transparent;
}

.cas-user-profile .description-content {
	background: transparent;
	backdrop-filter: none;
	border: none;
	border-radius: 0;
	padding: 0;
	line-height: 1.6;
	font-size: var(--profile-font-size, 14px); /* Use theme font size directly */
	color: var(--profile-text-color, rgba(255, 255, 255, 0.85));
}

.cas-user-profile .description-content p,
.cas-user-profile .description-content span,
.cas-user-profile .description-content div,
.cas-user-profile .description-content ul,
.cas-user-profile .description-content ol,
.cas-user-profile .description-content li {
	font-size: inherit;
}

.cas-user-profile .description-content p {
	margin: 0 0 1em 0;
}

.cas-user-profile .description-content p:last-child {
	margin-bottom: 0;
}

.cas-user-profile .description-content a {
	color: var(--profile-link-color, #fa5c5c);
	text-decoration: none;
	transition: color 0.2s ease;
}

.cas-user-profile .description-content a:hover {
	color: var(--profile-link-color, #fa5c5c);
	filter: brightness(1.2);
	text-decoration: underline;
}

/* Override any external bold/strong color styling */
.cas-user-profile .description-content strong,
.cas-user-profile .description-content b,
.cas-user-profile .description-content em,
.cas-user-profile .description-content i {
	color: inherit !important;
}

.cas-user-profile .description-content h1,
.cas-user-profile .description-content h2,
.cas-user-profile .description-content h3,
.cas-user-profile .description-content h4,
.cas-user-profile .description-content h5,
.cas-user-profile .description-content h6 {
	color: #ffffff;
	margin-top: 1.5em;
	margin-bottom: 0.5em;
}

.cas-user-profile .description-content h1:first-child,
.cas-user-profile .description-content h2:first-child,
.cas-user-profile .description-content h3:first-child {
	margin-top: 0;
}

.cas-user-profile .description-content ul,
.cas-user-profile .description-content ol {
	margin: 1em 0;
	padding-left: 2em;
}

.cas-user-profile .description-content li {
	margin-bottom: 0.5em;
}

.cas-user-profile .description-content blockquote {
	border-left: 4px solid rgba(139, 92, 246, 0.5);
	margin: 1em 0;
	padding-left: 20px;
	color: rgba(255, 255, 255, 0.7);
	font-style: italic;
}

.cas-user-profile .description-content code {
	background: rgba(0, 0, 0, 0.3);
	padding: 2px 6px;
	border-radius: 4px;
	font-family: 'Monaco', 'Menlo', monospace;
	font-size: 0.9em;
}

.cas-user-profile .description-content pre {
	background: rgba(0, 0, 0, 0.4);
	padding: 15px;
	border-radius: 8px;
	overflow-x: auto;
}

/* Text alignment classes for Quill content */
.cas-user-profile .description-content .text-align-center {
	text-align: center;
}

.cas-user-profile .description-content .text-align-right {
	text-align: right;
}

.cas-user-profile .description-content .text-align-justify {
	text-align: justify;
}

/* Games Section - itch.io style */
.cas-user-profile .profile-games-section {
	padding: 30px 0 0 0;
	margin-top: 20px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cas-user-profile .section-title {
	display: none; /* Hide section title for cleaner look */
}

.cas-user-profile .section-title svg {
	display: none;
}

.cas-user-profile .game-count {
	display: none;
}

/* Games Grid - itch.io style */
.cas-user-profile .games-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr)); /* minmax(0, 1fr) prevents content from expanding columns */
	gap: 20px;
	align-items: start; /* Prevent stretch alignment issues */
}

.cas-user-profile .game-card {
	background: transparent;
	backdrop-filter: none;
	border: none;
	border-radius: 0;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	transition: none;
	box-shadow: none;
	display: flex;
	flex-direction: column;
	outline: none; /* Remove focus outline */
	min-width: 0; /* Prevent flex overflow issues */
	width: 100%;
}

.cas-user-profile .game-card:focus,
.cas-user-profile .game-card:focus-visible {
	outline: none;
}

.cas-user-profile .game-card:hover {
	transform: none;
	border-color: transparent;
	box-shadow: none;
	text-decoration: none;
	color: inherit;
}

.cas-user-profile .game-thumbnail {
	width: 100%;
	padding-bottom: 79.37%; /* 250/315 = 0.7937 - fixed aspect ratio via padding */
	position: relative;
	overflow: hidden;
	background: #1a1a2e;
	border-radius: var(--profile-border-radius, 8px);
	flex-shrink: 0; /* Don't let thumbnail shrink */
}

.cas-user-profile .game-thumbnail img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: opacity 0.2s ease;
}

.cas-user-profile .game-card:hover .game-thumbnail img {
	transform: none;
	opacity: 0.9;
}

.cas-user-profile .game-info {
	padding: 10px 0 0 0;
	text-align: left;
	/* Fixed height: 1 line title + 2 line description + margins */
	height: calc((var(--profile-font-size, 14px) * 1.4) + (var(--profile-font-size, 14px) * 0.85 * 1.4 * 2) + 14px);
	overflow: hidden;
	min-width: 0; /* Prevent flex overflow */
	width: 100%;
}

.cas-user-profile .game-title {
	font-size: inherit; /* Inherit from theme */
	font-weight: 600;
	margin: 0;
	color: var(--profile-link-color, #fa5c5c);
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 1;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-align: left;
	/* Ensure text doesn't exceed container */
	word-break: break-word;
}

.cas-user-profile .game-card:hover .game-title {
	text-decoration: underline;
}

.cas-user-profile .game-description {
	font-size: calc(var(--profile-font-size, 14px) * 0.85);
	color: var(--profile-text-color, rgba(255, 255, 255, 0.7));
	margin: 4px 0 0 0;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-align: left;
	opacity: 0.8;
}

.cas-user-profile .game-stats {
	display: none; /* Hide stats for cleaner itch.io look */
}

.cas-user-profile .game-stats .stat {
	display: none;
}

.cas-user-profile .game-stats .stat svg {
	display: none;
}

/* No Games Message */
.cas-user-profile .no-games-message {
	text-align: center;
	padding: 60px 20px;
	color: rgba(255, 255, 255, 0.5);
}

.cas-user-profile .no-games-message svg {
	opacity: 0.5;
	margin-bottom: 16px;
}

.cas-user-profile .no-games-message p {
	font-size: 18px;
	margin: 0;
}

/* ===== PROFILE EDIT STYLES ===== */

.cas-profile-edit {
	padding: 40px;
}

.cas-user-profile .profile-edit-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 40px;
	padding-bottom: 20px;
	border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

.cas-user-profile .edit-title {
	font-size: 32px;
	font-weight: 700;
	margin: 0;
	background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.cas-user-profile .back-to-profile-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 20px;
	background: rgba(99, 102, 241, 0.1);
	border: 1px solid rgba(99, 102, 241, 0.3);
	border-radius: 8px;
	color: #A5B4FC;
	text-decoration: none;
	font-size: 14px;
	font-weight: 500;
	transition: all 0.2s ease;
}

.cas-user-profile .back-to-profile-btn:hover {
	background: rgba(99, 102, 241, 0.2);
	border-color: rgba(99, 102, 241, 0.5);
	color: #C7D2FE;
	text-decoration: none;
}

/* Form Sections */
.profile-edit-form .form-section {
	background: rgba(17, 24, 39, 0.6);
	backdrop-filter: blur(10px);
	border: 1px solid rgba(139, 92, 246, 0.15);
	border-radius: 12px;
	padding: 30px;
	margin-bottom: 30px;
}

.cas-user-profile .section-heading {
	font-size: 18px;
	font-weight: 600;
	color: #ffffff;
	margin: 0 0 24px 0;
	padding-bottom: 12px;
	border-bottom: 1px solid rgba(139, 92, 246, 0.15);
	display: flex;
	align-items: center;
	gap: 10px;
}

/* Form Groups */
.profile-edit-form .form-group {
	margin-bottom: 24px;
}

.profile-edit-form .form-group:last-child {
	margin-bottom: 0;
}

.profile-edit-form .form-group label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.9);
	margin-bottom: 10px;
}

.profile-edit-form .form-group label svg {
	color: #A78BFA;
}

.profile-edit-form .form-group input[type="text"],
.profile-edit-form .form-group input[type="url"],
.profile-edit-form .form-group input[type="email"] {
	width: 100%;
	padding: 14px 16px;
	background: rgba(0, 0, 0, 0.3);
	border: 1px solid rgba(139, 92, 246, 0.2);
	border-radius: 8px;
	color: #ffffff;
	font-size: 15px;
	transition: all 0.3s ease;
	box-sizing: border-box;
}

.profile-edit-form .form-group input[type="text"]:focus,
.profile-edit-form .form-group input[type="url"]:focus,
.profile-edit-form .form-group input[type="email"]:focus {
	outline: none;
	border-color: #8B5CF6;
	box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.profile-edit-form .form-group input[type="text"]::placeholder,
.profile-edit-form .form-group input[type="url"]::placeholder,
.profile-edit-form .form-group input[type="email"]::placeholder {
	color: rgba(255, 255, 255, 0.4);
}

.profile-edit-form .field-description {
	font-size: 13px;
	color: rgba(255, 255, 255, 0.5);
	margin: 8px 0 0 0;
}

/* Image Upload Area */
.profile-edit-form .image-upload-area {
	border: 2px dashed rgba(139, 92, 246, 0.3);
	border-radius: 12px;
	padding: 30px;
	text-align: center;
	cursor: pointer;
	transition: all 0.3s ease;
	position: relative;
	overflow: hidden;
}

.profile-edit-form .image-upload-area:hover {
	border-color: rgba(139, 92, 246, 0.5);
	background: rgba(139, 92, 246, 0.05);
}

.profile-edit-form .image-upload-area.dragover {
	border-color: #8B5CF6;
	background: rgba(139, 92, 246, 0.1);
}

.profile-edit-form .upload-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
}

.profile-edit-form .upload-content.hidden {
	display: none;
}

.profile-edit-form .upload-content svg {
	color: rgba(139, 92, 246, 0.6);
}

.profile-edit-form .upload-content p {
	font-size: 15px;
	color: rgba(255, 255, 255, 0.7);
	margin: 0;
}

.profile-edit-form .upload-content span {
	font-size: 13px;
	color: rgba(255, 255, 255, 0.4);
}

.profile-edit-form .file-input {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
	z-index: 1; /* Below the current image and remove button */
}

/* When an image is displayed, hide the file input overlay */
.profile-edit-form .image-upload-area:has(.current-image) .file-input {
	pointer-events: none; /* Disable file input when image is shown */
}

.profile-edit-form .current-image {
	position: relative;
	display: inline-block;
	z-index: 5; /* Above file input */
}

.profile-edit-form .current-image img {
	max-width: 100%;
	max-height: 200px;
	border-radius: 8px;
	border: 2px solid rgba(139, 92, 246, 0.3);
}

.profile-edit-form .remove-image-btn {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(239, 68, 68, 0.9);
	border: none;
	border-radius: 50%;
	color: white;
	cursor: pointer;
	transition: all 0.2s ease;
	z-index: 10; /* Above file input and current-image */
}

.profile-edit-form .remove-image-btn:hover {
	background: #EF4444;
	transform: scale(1.1);
}

/* Hidden textarea for Quill */
.profile-edit-form .hidden-textarea {
	display: none !important;
}

/* Quill Editor for Profile */
#profile-quill-editor-container {
	background: rgba(0, 0, 0, 0.3);
	border: 1px solid rgba(139, 92, 246, 0.2);
	border-radius: 8px;
	min-height: 250px;
}

#profile-quill-editor-container .ql-toolbar {
	background: rgba(17, 24, 39, 0.8);
	border: none;
	border-bottom: 1px solid rgba(139, 92, 246, 0.2);
	border-radius: 8px 8px 0 0;
}

#profile-quill-editor-container .ql-container {
	border: none;
	border-radius: 0 0 8px 8px;
	font-size: 15px;
}

#profile-quill-editor-container .ql-editor {
	min-height: 200px;
	color: rgba(255, 255, 255, 0.9);
}

#profile-quill-editor-container .ql-editor.ql-blank::before {
	color: rgba(255, 255, 255, 0.4);
	font-style: normal;
}

/* Form Actions */
.profile-edit-form .form-actions {
	display: flex;
	gap: 16px;
	margin-top: 40px;
	padding-top: 30px;
	border-top: 1px solid rgba(139, 92, 246, 0.2);
}

.cas-user-profile .save-profile-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 14px 28px;
	background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
	border: none;
	border-radius: 8px;
	color: white;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.cas-user-profile .save-profile-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 25px rgba(139, 92, 246, 0.4);
}

.cas-user-profile .save-profile-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

.cas-user-profile .cancel-btn {
	display: inline-flex;
	align-items: center;
	padding: 14px 28px;
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 8px;
	color: rgba(255, 255, 255, 0.7);
	font-size: 16px;
	font-weight: 500;
	text-decoration: none;
	transition: all 0.2s ease;
}

.cas-user-profile .cancel-btn:hover {
	background: rgba(255, 255, 255, 0.05);
	border-color: rgba(255, 255, 255, 0.3);
	color: rgba(255, 255, 255, 0.9);
	text-decoration: none;
}

/* Profile Page Success Message */
.cas-user-profile .cas-success-message {
	background: rgba(52, 211, 153, 0.1);
	border: 1px solid rgba(52, 211, 153, 0.3);
	border-radius: 8px;
	padding: 20px;
	color: #6EE7B7;
	text-align: center;
	margin: 20px 40px;
}

/* Loading State */
.profile-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 40px;
	color: rgba(255, 255, 255, 0.7);
}

.profile-loading .spinner {
	width: 24px;
	height: 24px;
	border: 3px solid rgba(139, 92, 246, 0.2);
	border-top-color: #8B5CF6;
	border-radius: 50%;
	animation: profile-spin 1s linear infinite;
}

@keyframes profile-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Profile Responsive Design */
@media (max-width: 1200px) {
	.cas-user-profile .games-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 768px) {
	.cas-user-profile .profile-header-content {
		flex-direction: column;
		align-items: flex-start;
		gap: 20px;
		padding: 20px;
	}

	.cas-user-profile .profile-name {
		font-size: 28px;
	}

	.cas-user-profile .profile-social-links {
		padding: 16px 20px;
	}

	.cas-user-profile .profile-description {
		padding: 20px;
	}

	.cas-user-profile .description-content {
		padding: 20px;
	}

	.cas-user-profile .profile-games-section {
		padding: 20px;
	}

	.cas-user-profile .games-grid {
		grid-template-columns: 1fr;
	}

	.cas-profile-edit {
		padding: 20px;
	}

	.cas-user-profile .profile-edit-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
	}

	.profile-edit-form .form-section {
		padding: 20px;
	}

	.profile-edit-form .form-actions {
		flex-direction: column;
	}

	.cas-user-profile .save-profile-btn,
	.cas-user-profile .cancel-btn {
		width: 100%;
		justify-content: center;
	}
}

/* Scrollbar Styling for Profile */
.cas-user-profile::-webkit-scrollbar {
	width: 10px;
}

.cas-user-profile::-webkit-scrollbar-track {
	background: rgba(0, 0, 0, 0.3);
}

.cas-user-profile::-webkit-scrollbar-thumb {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border-radius: 5px;
}

.cas-user-profile::-webkit-scrollbar-thumb:hover {
	background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Hide theme elements on profile page */
.cas-user-profile ~ .pwg-container.pwg-above-content,
.cas-user-profile ~ .widget.widget_block.widget_search,
.cas-user-profile ~ .pwg-games-container.pwg-sidebar-games,
.cas-user-profile ~ .pwg-games-container.pwg-grid-before-footer,
.cas-user-profile ~ .feedback-banner,
body:has(.cas-user-profile) .pwg-container.pwg-above-content,
body:has(.cas-user-profile) .widget.widget_block.widget_search,
body:has(.cas-user-profile) .pwg-games-container.pwg-sidebar-games,
body:has(.cas-user-profile) .pwg-games-container.pwg-grid-before-footer,
body:has(.cas-user-profile) .feedback-banner {
	display: none !important;
}

/* Hide "Recently Added" sidebar (h1 + ol without wrapper) */
.cas-user-profile ~ h1.text-lg.font-bold,
.cas-user-profile ~ ol,
body:has(.cas-user-profile) h1.text-lg.font-bold,
body:has(.cas-user-profile) h1.text-lg.font-bold + ol {
	display: none !important;
}

/* Hide page title heading */
body:has(.cas-user-profile) .text-accent.text-4xl.font-bold.text-center.my-8,
.cas-user-profile ~ .text-accent.text-4xl.font-bold.text-center.my-8 {
	display: none !important;
}

/* Hide divider */
body:has(.cas-user-profile) .divider.divider-neutral,
.cas-user-profile ~ .divider.divider-neutral {
	display: none !important;
}

/* Make profile page take full width */
body:has(.cas-user-profile) .entry-content,
body:has(.cas-user-profile) .site-main,
body:has(.cas-user-profile) article,
body:has(.cas-user-profile) main,
body:has(.cas-user-profile) .container {
	width: 100% !important;
	max-width: 100% !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	margin: 0 !important;
	float: none !important;
}

body:has(.cas-user-profile) #primary {
	width: 100% !important;
	max-width: 100% !important;
	float: none !important;
}

body:has(.cas-user-profile) #secondary,
body:has(.cas-user-profile) aside,
body:has(.cas-user-profile) .sidebar {
	display: none !important;
}

/* ============================================
   THEME EDITOR STYLES
   ============================================ */

/* Profile Actions Container */
.cas-user-profile .profile-actions {
	display: flex;
	gap: 8px;
	align-items: center;
}

/* Edit Theme Button */
.cas-user-profile .profile-theme-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	background: rgba(0, 0, 0, 0.5);
	border: 2px solid rgba(255, 255, 255, 0.9);
	border-radius: 4px;
	color: #ffffff !important;
	font-weight: 600;
	font-size: 13px;
	cursor: pointer;
	transition: all 0.2s ease;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.cas-user-profile .profile-theme-btn:hover {
	background: rgba(0, 0, 0, 0.65);
	border-color: #ffffff;
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.5);
	color: #ffffff !important;
}

/* Theme Editor Overlay */
.theme-editor-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 9998;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
}

.theme-editor-overlay.active {
	opacity: 1;
	visibility: visible;
}

/* Theme Editor Sidebar */
.theme-editor-sidebar {
	position: fixed;
	top: 0;
	right: -360px;
	width: 360px;
	height: 100vh;
	background: #1a1a2e;
	border-left: 1px solid rgba(255, 255, 255, 0.1);
	z-index: 9999;
	overflow-y: auto;
	transition: right 0.3s ease;
	display: flex;
	flex-direction: column;
}

.theme-editor-sidebar.active {
	right: 0;
}

/* Theme Editor Header */
.theme-editor-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	background: rgba(0, 0, 0, 0.2);
}

.theme-editor-header h2 {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	color: #ffffff;
}

.theme-editor-close {
	background: transparent;
	border: none;
	color: rgba(255, 255, 255, 0.6);
	cursor: pointer;
	padding: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	transition: all 0.2s ease;
}

.theme-editor-close:hover {
	color: #ffffff;
	background: rgba(255, 255, 255, 0.1);
}

/* Theme Editor Content */
.theme-editor-content {
	flex: 1;
	padding: 20px;
	overflow-y: auto;
}

/* Theme Section */
.theme-section {
	margin-bottom: 24px;
}

.theme-section-title {
	font-size: 12px;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.5);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin: 0 0 16px 0;
	padding-bottom: 8px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Theme Field */
.theme-field {
	margin-bottom: 16px;
}

.theme-field label {
	display: block;
	font-size: 13px;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.9);
	margin-bottom: 8px;
}

/* Color Input Wrapper */
.color-input-wrapper {
	display: flex;
	gap: 8px;
	align-items: center;
}

.color-input-wrapper input[type="color"] {
	width: 40px;
	height: 40px;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	padding: 0;
	background: transparent;
}

.color-input-wrapper input[type="color"]::-webkit-color-swatch-wrapper {
	padding: 2px;
}

.color-input-wrapper input[type="color"]::-webkit-color-swatch {
	border: 2px solid rgba(255, 255, 255, 0.2);
	border-radius: 4px;
}

.color-input-wrapper .color-text {
	flex: 1;
	padding: 10px 12px;
	background: rgba(0, 0, 0, 0.3);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 6px;
	color: #ffffff;
	font-size: 13px;
	font-family: 'Monaco', 'Menlo', monospace;
}

.color-input-wrapper .color-text:focus {
	outline: none;
	border-color: var(--profile-link-color, #fa5c5c);
}

/* Select Input */
.theme-field select {
	width: 100%;
	padding: 10px 12px;
	background: rgba(0, 0, 0, 0.3);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 6px;
	color: #ffffff;
	font-size: 13px;
	cursor: pointer;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	padding-right: 36px;
}

.theme-field select:focus {
	outline: none;
	border-color: var(--profile-link-color, #fa5c5c);
}

.theme-field select option {
	background: #1a1a2e;
	color: #ffffff;
}

/* Range Input Wrapper */
.range-input-wrapper {
	display: flex;
	gap: 12px;
	align-items: center;
}

.range-input-wrapper input[type="range"] {
	flex: 1;
	height: 6px;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 3px;
	appearance: none;
	cursor: pointer;
}

.range-input-wrapper input[type="range"]::-webkit-slider-thumb {
	appearance: none;
	width: 18px;
	height: 18px;
	background: var(--profile-link-color, #fa5c5c);
	border-radius: 50%;
	cursor: pointer;
	transition: transform 0.2s ease;
}

.range-input-wrapper input[type="range"]::-webkit-slider-thumb:hover {
	transform: scale(1.1);
}

.range-input-wrapper input[type="range"]::-moz-range-thumb {
	width: 18px;
	height: 18px;
	background: var(--profile-link-color, #fa5c5c);
	border: none;
	border-radius: 50%;
	cursor: pointer;
}

.range-input-wrapper .range-value {
	min-width: 45px;
	text-align: right;
	font-size: 13px;
	color: rgba(255, 255, 255, 0.7);
	font-family: 'Monaco', 'Menlo', monospace;
}

/* Theme Editor Actions */
.theme-editor-actions {
	display: flex;
	gap: 12px;
	padding: 20px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	background: rgba(0, 0, 0, 0.2);
	margin-top: auto;
}

.theme-reset-btn {
	flex: 1;
	padding: 12px 16px;
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 6px;
	color: rgba(255, 255, 255, 0.7);
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
}

.theme-reset-btn:hover {
	background: rgba(255, 255, 255, 0.05);
	border-color: rgba(255, 255, 255, 0.3);
	color: #ffffff;
}

.theme-save-btn {
	flex: 1;
	padding: 12px 16px;
	background: var(--profile-link-color, #fa5c5c);
	border: none;
	border-radius: 6px;
	color: #ffffff;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
}

.theme-save-btn:hover {
	opacity: 0.9;
	transform: translateY(-1px);
}

.theme-save-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
}

/* Theme Editor Responsive */
@media (max-width: 480px) {
	.theme-editor-sidebar {
		width: 100%;
		right: -100%;
	}
}

/* ============================================
   THEME CSS VARIABLES - REFERENCE
   ============================================
   Theme variables are applied throughout the CSS above:
   --profile-bg-color: Background color
   --profile-text-color: Text color
   --profile-link-color: Link/accent color
   --profile-title-color: Title/heading color
   --profile-font-family: Font family
   --profile-font-size: Base font size
   --profile-border-radius: Border radius for images
   ============================================ */

/* Theme notification toast */
.theme-notification {
	position: fixed;
	bottom: 20px;
	right: 20px;
	padding: 12px 20px;
	background: rgba(34, 197, 94, 0.95);
	color: white;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 500;
	z-index: 10001;
	opacity: 0;
	transform: translateY(20px);
	transition: all 0.3s ease;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.theme-notification.show {
	opacity: 1;
	transform: translateY(0);
}

.theme-notification.error {
	background: rgba(239, 68, 68, 0.95);
}