/* static/css/styles.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #000;
    color: #f5f5f5;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* =================================
   Sidebar (Used on all pages)
   ================================= */
.sidebar {
    width: 240px;
    background: rgba(10, 10, 10, 0.5);
    display: flex;
    flex-direction: column;
    padding: 20px 10px;
    gap: 5px;
    position: fixed;
    height: 100vh;
    z-index: 100;
    backdrop-filter: blur(12px);
    transition: width 0.3s ease;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.logo {
    font-size: 24px;
    font-weight: bold;
    background: linear-gradient(45deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
    padding-left: 15px;
}

.sidebar-item {
    width: 100%;
    padding: 10px 15px;
    background: transparent;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #e0e0e0;
    gap: 15px;
}

.sidebar-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    stroke: currentColor;
}

.sidebar-text {
    font-size: 16px;
    font-weight: 500;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.sidebar-item:hover, .sidebar-item.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.sidebar-divider {
    border: none;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.1);
    margin: 10px 15px;
}

.sidebar-user-info {
    margin-top: auto;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background-color: #333;
}

.sidebar-username {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
}

.sidebar-action-btn {
    color: #a0a0a0;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background-color 0.2s;
    flex-shrink: 0;
}

.sidebar-action-btn:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}


/* =================================
   Main Content & Header (Used on all pages)
   ================================= */
.main-content {
    flex: 1;
    margin-left: 240px;
    padding: 20px 10px;
    transition: margin-left 0.3s ease;
    min-width: 0;
}

.header {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 40px;
    width: 100%;
}

.search-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    border-radius: 27px;
}

.search-input {
    width: 100%;
    padding: 14px 20px 14px 50px;
    border-radius: 25px;
    background: #1c1c1e;
    color: white;
    font-size: 16px;
    border: 1.5px solid #555;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search-input:hover,
.search-input:focus {
    border-color: #8b56f0;
    box-shadow: 0 0 8px rgba(139, 86, 240, 0.5);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    z-index: 2;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-icon svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
}

.search-results {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 100%;
    background: rgba(18, 18, 18, 0.9);
    border-radius: 16px;
    padding: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-height: 350px;
    overflow-y: auto;
    z-index: 101;
}
.search-results.visible {
    display: block;
}
.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 8px;
    text-decoration: none;
    color: #f0f0f0;
    transition: background-color 0.2s ease;
}
.search-result-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}
.search-result-thumbnail {
    width: 50px;
    height: 37.5px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}
.search-result-name {
    font-size: 15px;
    font-weight: 500;
}

.no-search-results {
    padding: 20px;
    text-align: center;
    color: #999;
    font-style: italic;
}

.header-actions {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 20px;
}

.crave-coins-container {
    position: relative;
}

.crave-coins-display {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #1c1c1e;
    padding: 6px 12px 6px 6px;
    border-radius: 20px;
    border: 1px solid #444;
    cursor: pointer;
    transition: background-color 0.2s;
}

.crave-coins-display:hover {
    background-color: #2c2c2e;
}

.crave-coin-logo {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #8b5cf6;
    color: white;
    font-weight: bold;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: sans-serif;
}
.crave-coin-logo.small {
    width: 16px;
    height: 16px;
    font-size: 12px;
}

.crave-coin-value {
    font-weight: 600;
    font-size: 15px;
}

.crave-coins-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 150px;
    background: #1c1c1e;
    border: 1px solid #444;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 110;
}

.crave-coins-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.crave-menu-item {
    display: block;
    padding: 10px;
    color: #f5f5f5;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.2s;
    text-align: center;
    font-weight: 500;
}

.crave-menu-item:hover {
    background-color: #2c2c2e;
}

.crave-menu-item.auth-prompt-btn {
    background-color: #6366f1;
    font-size: 14px;
    padding: 8px 10px;
}
.crave-menu-item.auth-prompt-btn:hover {
    background-color: #4f46e5;
}


.theme-toggle {
    display: flex;
    gap: 10px;
}

.theme-btn {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.theme-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    stroke: currentColor;
}

.theme-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.theme-btn.active {
    background: #6366f1;
    border-color: #6366f1;
}

/* =================================
   Index Page Specifics - Carousel
   ================================= */
.section {
    margin-bottom: 50px;
    overflow: visible;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 24px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.fire-icon {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
}

.fire-icon svg {
    width: 20px;
    height: 20px;
    fill: #ff6b35;
}

.section-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-top: 5px;
}

.see-all-btn {
    padding: 10px 25px;
    border: 1px solid #6366f1;
    border-radius: 20px;
    background: transparent;
    color: white;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
}

.see-all-btn:hover {
    background: #6366f1;
    transform: translateY(-2px);
}

.carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.games-carousel {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 5px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.games-carousel::-webkit-scrollbar {
    display: none;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 10;
    opacity: 0.8;
}

.carousel-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    opacity: 1;
}

.carousel-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
}

.carousel-btn-prev {
    left: 10px;
}

.carousel-btn-next {
    right: 10px;
}

.trending-section-layout {
    margin-bottom: 50px;
}

.trending-info {
    margin-bottom: 20px;
}

.game-card {
    position: relative;
    height: 130px;
    width: 220px;
    flex-shrink: 0;
    border-radius: 15px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0));
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    background-size: cover;
    background-position: center;
}

.game-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 0 25px rgba(120, 80, 250, 0.4);
    border-color: rgba(120, 80, 250, 0.6);
    z-index: 2;
}

.game-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.6));
}

.new-badge, .hot-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 3px;
    z-index: 2;
}

.new-badge {
    background: linear-gradient(142deg,#3d63cd,#6424db);
    color: white;
}

.new-badge svg, .hot-badge svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

.hot-badge {
    background: #f59e0b;
    color: white;
}

.game-title {
    position: absolute;
    bottom: 10px;
    left: 10px;
    font-weight: 600;
    font-size: 14px;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Re-added rule for category page grids */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 5px;
}

/* =================================
   Game Page Specifics
   ================================= */

.game-page-wrapper {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    justify-content: center;
}
.game-content-column {
    flex: 1 1 auto;
    min-width: 50%;
    max-width: 1100px;
}
.recs-column-flanking {
    flex: 0 0 240px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 15px;
    align-content: start;
}
.side-ad-container {
    grid-column: 1 / -1; /* Make ad span full width of the column */
    min-height: 250px; /* Reserve space to prevent layout shift */
    margin-bottom: 15px;
}
.rec-thumbnail-link {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.rec-thumbnail-link:hover {
    transform: scale(1.03);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}
.rec-thumbnail-link img {
    width: 100%;
    display: block;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.game-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    margin-bottom: 20px;
}
.game-thumbnail {
    width: 120px;
    height: 90px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.game-info h1 {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 10px;
}
.game-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    color: rgba(255, 255, 255, 0.8);
}
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    margin-left: 10px;
}
.badge.new {
    background: #ff6b6b;
}
.badge.hot {
    background: #ffa726;
}

.game-container {
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.game-frame {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9; 
    border: none;
    display: block; 
}

.game-player-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1e1e22;
    padding: 8px 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: none;
    border-radius: 0 0 12px 12px;
    margin-bottom: 20px;
}
.player-bar-info {
    display: flex;
    flex-direction: column;
}
.player-bar-title {
    font-weight: 600;
    font-size: 16px;
    color: #fff;
}
.player-bar-branding {
    font-size: 12px;
    color: #aaa;
}
.fullscreen-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    transition: background-color 0.2s ease;
}
.fullscreen-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}
.fullscreen-btn svg {
    display: block;
    fill: #fff;
}

.game-details {
    margin-top: 30px;
    background: rgba(18, 18, 18, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
    backdrop-filter: blur(10px);
}
.game-details h2 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #4ecdc4;
}
.game-details p {
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 15px;
}
.instructions {
    margin-top: 20px;
}
.instructions h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #ff6b6b;
}

.category-capsules {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.category-capsule {
    display: inline-block;
    padding: 4px 12px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    font-size: 13px;
    font-weight: 500;
    color: #ddd;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.category-capsule:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* =================================
   Make More, Store & Inventory Pages
   ================================= */
.make-more-container, .store-container, .inventory-container {
    background: #1c1c1e;
    padding: 30px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}
.stat-card {
    background: #2c2c2e;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}
.stat-card-value {
    font-size: 28px;
    font-weight: bold;
    color: #8b5cf6;
}
.stat-card-label {
    font-size: 14px;
    color: #aaa;
    margin-top: 5px;
}
.ads-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}
.ad-placeholder {
    width: 100%;
    height: 100px;
    background: #2c2c2e;
    border: 1px dashed #444;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #777;
    border-radius: 8px;
}
.coin-clicker-container {
    text-align: center;
    padding: 40px 20px;
}
.crave-coin-clicker {
    width: 150px;
    height: 150px;
    margin: 0 auto;
    border-radius: 50%;
    background: linear-gradient(45deg, #a855f7, #6366f1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.2), inset 0 -5px 10px rgba(0,0,0,0.2);
    transition: transform 0.1s ease-out;
}
.crave-coin-clicker:active {
    transform: scale(0.95);
    box-shadow: 0 5px 10px rgba(139, 92, 246, 0.2), inset 0 -3px 5px rgba(0,0,0,0.2);
}
.crave-coin-clicker .crave-coin-logo {
    width: auto;
    height: auto;
    background: none;
    font-size: 80px;
}
.click-counter {
    margin-top: 20px;
    font-size: 16px;
    color: #aaa;
}
.store-grid, .inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}
.store-item-card, .inventory-card {
    background: #2c2c2e;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}
.inventory-card.active {
    border-color: #8b5cf6;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
}
.item-image-wrapper {
    background-color: #3b3e42;
    aspect-ratio: 1 / 1;
}
.item-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.item-details {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.item-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}
.item-price {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: auto;
    font-weight: 600;
}
.buy-button, .set-avatar-btn {
    margin-top: 15px;
    width: 100%;
    padding: 10px;
    background: #6366f1;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}
.buy-button:hover:not(:disabled), .set-avatar-btn:hover {
    background-color: #4f46e5;
}
.buy-button.owned, .inventory-card.active .set-avatar-btn {
    background-color: #3b82f6;
    cursor: default;
}
.no-items-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
}
.go-to-store-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #6366f1;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.2s;
}
.go-to-store-btn:hover {
    background-color: #4f46e5;
}


/* =================================
   Responsive Design
   ================================= */
@media (max-width: 1200px) {
    .game-page-wrapper {
        flex-direction: column;
    }
    .game-content-column {
        order: 1; 
        width: 100%; 
    }
    .recs-column-flanking {
        order: 2; 
        width: 100%;
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 80px;
    }
    .sidebar-text, .sidebar-username {
        opacity: 0;
        display: none;
    }
    .sidebar-item {
        justify-content: center;
        padding: 10px;
    }
    .sidebar-icon {
        width: 24px;
        height: 24px;
    }
    .sidebar-icon svg {
        width: 20px;
        height: 20px;
    }
    .sidebar-user-info {
        justify-content: center;
    }
    
    .main-content {
        margin-left: 80px;
        padding: 20px;
    }
    
    .header {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }

    .header-actions {
        position: static;
        transform: none;
        justify-content: center;
    }
    
    .search-container {
        margin: 0;
        max-width: none;
        flex-grow: 1;
    }
    
    .carousel-container {
        gap: 10px;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
    }
    
    .game-card {
        width: 180px;
        height: 110px;
    }
    
    .games-carousel {
        gap: 15px;
    }
    
    .game-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .carousel-btn {
        width: 35px;
        height: 35px;
    }
    
    .carousel-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .game-card {
        width: 160px;
        height: 100px;
    }
    
    .carousel-container {
        gap: 8px;
    }
}
.search-container {
    position: relative;
}

/* In static/css/styles.css */

.search-results {
    /* Frosted glass effect */
    background-color: rgba(44, 47, 51, 0.75); /* Semi-transparent background is required */
    backdrop-filter: blur(12px);              /* This creates the blur effect */
    -webkit-backdrop-filter: blur(12px);      /* Ensures compatibility with Safari */

    /* A subtle border to give it a glossy edge */
    border: 1px solid rgba(255, 255, 255, 0.1);

    /* General positioning and layout (can be adjusted) */
    width: 500px;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); /* A slightly deeper shadow complements the look */
    
    /* --- Other necessary styles --- */
    display: none;
    position: absolute;
    top: 110%;
    left: 0;
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    text-decoration: none;
    color: #fff; /* Example text color */
    transition: background-color 0.2s ease;
}

.search-result-item:hover {
    background-color: #3b3e42; /* Example hover color */
}

.search-result-img {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    margin-right: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.search-result-name {
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-no-results {
    padding: 20px;
    color: #999;
    text-align: center;
}

/* static/css/styles.css additions */

/* Flash Messages */
.flash-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-weight: 500;
}
.flash-message.success { background-color: #28a745; color: white; }
.flash-message.danger { background-color: #dc3545; color: white; }
.flash-message.info { background-color: #17a2b8; color: white; }

/* Auth Forms */
.auth-form-container {
    max-width: 400px;
    margin: 40px auto;
    padding: 30px;
    background: #1c1c1e;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.auth-form h2 { text-align: center; margin-bottom: 25px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; color: #aaa; }
.form-group input {
    width: 100%;
    padding: 12px;
    background: #2c2c2e;
    border: 1px solid #444;
    border-radius: 8px;
    color: white;
    font-size: 16px;
}
.auth-button {
    width: 100%;
    padding: 12px;
    background: #6366f1;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}
.auth-button:hover { background-color: #4f46e5; }
.auth-switch { text-align: center; margin-top: 20px; color: #aaa; }
.auth-switch a { color: #8b5cf6; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

/* Star Rating */
.star-rating { display: flex; align-items: center; gap: 2px; }
.star-rating .star { color: #444; transition: color 0.2s; cursor: pointer; }
.star-rating .star.filled { color: #ffc107; fill: #ffc107; }
.star-rating[data-interactive="false"] .star { cursor: default; }


/* Favorite Button */
.player-bar-actions { display: flex; align-items: center; gap: 10px; }
.favorite-btn { background: none; border: none; color: #aaa; cursor: pointer; padding: 5px; }
.favorite-btn .lucide-heart { transition: all 0.2s; }
.favorite-btn:hover .lucide-heart { color: #ff6b6b; }
.favorite-btn.favorited .lucide-heart { color: #ff6b6b; fill: #ff6b6b; }

/* Comments Section */
.comments-container {
    margin-top: 40px;
    background: rgba(18, 18, 18, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
}
.comments-container h2 { margin-bottom: 20px; }
.comment-form textarea {
    width: 100%;
    min-height: 80px;
    background: #2c2c2e;
    border: 1px solid #444;
    border-radius: 8px;
    color: white;
    padding: 10px;
    margin-bottom: 10px;
}
.comment-form button {
    padding: 10px 20px;
    background: #6366f1;
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    cursor: pointer;
}
.comment-login-prompt { color: #aaa; }
.comment-login-prompt a { color: #8b5cf6; }
.comments-list { margin-top: 20px; display: flex; flex-direction: column; gap: 15px; }
.comment {
    background: #2c2c2e;
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid #6366f1;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}
.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
}
.comment-text { margin-bottom: 10px; color: #f0f0f0; }
.comment-meta { font-size: 12px; color: #888; }
.comment-author { font-weight: bold; color: #aaa; }
.comment-date { margin-left: 10px; }

/* Sorting Dropdown */
.sort-container { display: flex; align-items: center; gap: 10px; }
.sort-container label { color: #aaa; }
.sort-container select {
    background: #2c2c2e;
    color: white;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 8px;
}

/* Game Card overlay */
.game-card-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.game-card:hover .game-card-img { transform: scale(1.1); }
.game-card .game-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 10%, transparent 50%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.game-card:hover .game-overlay { opacity: 1; }
.game-card-stats { display: flex; align-items: center; gap: 10px; font-size: 12px; color: #ccc; }
.game-card-stats .lucide { width: 14px; height: 14px; margin-right: 2px; }

/* Add this entire block to the end of your styles.css file */

/* Custom Prompt Styles */
.prompt-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.prompt-overlay.active {
    display: flex;
    opacity: 1;
}

.prompt-box {
    background: #1c1c1e;
    padding: 30px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transform: scale(0.95);
    transition: transform 0.2s ease-in-out;
}

.prompt-overlay.active .prompt-box {
    transform: scale(1);
}

.prompt-box h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 22px;
    color: #f5f5f5;
}

.prompt-box p {
    color: #b0b0b0;
    margin-bottom: 25px;
    line-height: 1.6;
}

.prompt-button {
    width: 100%;
    padding: 12px;
    background: #6366f1;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.prompt-button:hover {
    background-color: #4f46e5;
}

/* Other styles like auth forms, comments, etc., should already be in your file */

.auth-form-container {
    max-width: 400px;
    margin: 40px auto;
    padding: 30px;
    background: #1c1c1e;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-errors, .field-errors {
    color: #ff6b6b;
    font-size: 14px;
    min-height: 20px;
    margin-top: 5px;
}

.form-errors {
    text-align: center;
    margin-bottom: 15px;
    padding: 10px;
    background-color: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 8px;
}

.form-errors:empty {
    display: none;
}

.search-results {
    display: none; /* Hidden by default */
    background-color: rgba(28, 28, 30, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    min-height: 80px;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 100%;
    border-radius: 16px;
    z-index: 101;
}

/* State when the box should be visible and loading */
.search-results.is-loading {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* State when the box should show results */
.search-results.has-results {
    display: block;
    padding: 10px;
}

/* Real-time Search Loader Animation */
.search-loader {
    width: 28px;
    height: 28px;
    border: 4px solid #444;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* =================================
   Secure Chat Page Styles
   ================================= */
.chat-container {
    max-width: 800px;
    width: 100%;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 80px); /* Adjust height to fit viewport */
    background: #1c1c1e;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.chat-header {
    padding: 15px 20px;
    font-size: 20px;
    font-weight: bold;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #f5f5f5;
}

.chat-messages {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Custom scrollbar for chat messages */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}
.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}
.chat-messages::-webkit-scrollbar-thumb {
    background-color: #4f46e5;
    border-radius: 4px;
}
.chat-messages::-webkit-scrollbar-thumb:hover {
    background-color: #6366f1;
}

.chat-message {
    display: flex;
    flex-direction: column;
    max-width: 85%;
    align-self: flex-start; /* Default to received messages */
}

.chat-message-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    font-size: 13px;
}

.chat-message-username {
    font-weight: bold;
    color: #a855f7;
}

.chat-message-timestamp {
    color: #888;
}

.chat-message-bubble {
    padding: 10px 15px;
    border-radius: 18px;
    line-height: 1.5;
    background-color: #3a3a3c;
    color: #f5f5f5;
    border-bottom-left-radius: 4px;
}

/* Styles for messages sent by the current user */
.chat-message.sent {
    align-self: flex-end;
}

.chat-message.sent .chat-message-bubble {
    background: linear-gradient(45deg, #6366f1, #4f46e5);
    color: white;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 4px;
}

/* Styles for status messages like 'User has entered' */
.chat-status-message {
    align-self: center;
    padding: 4px 12px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    font-size: 12px;
    font-style: italic;
    color: #999;
    margin: 5px 0;
}

.chat-form {
    display: flex;
    gap: 10px;
    padding: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background-color: #1c1c1e;
}

.chat-input {
    flex-grow: 1;
    padding: 12px 18px;
    border-radius: 22px;
    background: #2c2c2e;
    color: white;
    font-size: 16px;
    border: 1px solid #444;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.chat-input:focus {
    border-color: #8b56f0;
    box-shadow: 0 0 8px rgba(139, 86, 240, 0.4);
}

.chat-send-btn {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: #6366f1;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.chat-send-btn:hover {
    background-color: #4f46e5;
}

.chat-send-btn:active {
    transform: scale(0.9);
}

.chat-send-btn svg {
    width: 20px;
    height: 20px;
}