/* ================================================
   NeoGame - Modern Dark Theme Game Portal
   Completely redesigned from scratch
   ================================================ */

/* CSS Reset & Base */
@import "./css.css";

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 50%, #16213e 100%);
    color: #e8e8e8;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ================================================
   Layout Structure - Sidebar + Main Content
   ================================================ */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #0d0d1a 0%, #1a1a2e 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

/* Sidebar Header */
.sidebar-header {
    padding: 30px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.logo-text {
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-subtitle {
    font-size: 11px;
    color: #666;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Navigation Menu */
.nav-menu {
    padding: 20px 0;
}

.nav-section {
    padding: 0 15px;
    margin-bottom: 25px;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
    padding-left: 15px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 15px;
    border-radius: 10px;
    color: #999;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-bottom: 4px;
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
}

.nav-item:hover::before {
    transform: scaleY(1);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.15) 0%, transparent 100%);
    color: #667eea;
}

.nav-item.active::before {
    transform: scaleY(1);
}

.nav-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.2s ease;
}

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon {
    background: rgba(102, 126, 234, 0.2);
}

.nav-text {
    font-size: 14px;
    font-weight: 500;
}

.nav-badge {
    margin-left: auto;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    font-size: 11px;
    color: #666;
}

/* ================================================
   Main Content Area
   ================================================ */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 30px 40px;
    min-height: 100vh;
}

/* Top Bar */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    width: 350px;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.15);
}

.search-box input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: #fff;
    font-size: 14px;
}

.search-box input::placeholder {
    color: #555;
}

.search-icon {
    color: #555;
    font-size: 18px;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.action-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #999;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 18px;
}

.action-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: #667eea;
    color: #667eea;
}

/* ================================================
   Game Cards Grid
   ================================================ */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-title h2 {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
}

.section-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.section-icon.purple {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.section-icon.green {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.section-icon.orange {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.view-all {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.view-all:hover {
    color: #8b9ff8;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.game-card {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.game-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card:hover {
    transform: translateY(-8px);
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.game-card:hover::before {
    opacity: 1;
}

.game-card-image {
    position: relative;
    padding-top: 100%;
    overflow: hidden;
}

.game-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.game-card:hover .game-card-image img {
    transform: scale(1.1);
}

.game-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.8) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card:hover .game-card-overlay {
    opacity: 1;
}

.play-btn {
    padding: 12px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 25px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transform: translateY(10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.game-card:hover .play-btn {
    transform: translateY(0);
}

.game-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.game-card-badge.hot {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.game-card-badge.new {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.game-card-info {
    padding: 18px;
}

.game-card-title {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
    line-height: 1.4;
}

.game-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #666;
}

.game-card-category {
    display: flex;
    align-items: center;
    gap: 5px;
}

.category-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #667eea;
}

/* ================================================
   Category Pills
   ================================================ */
.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.category-pill {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 25px;
    color: #999;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-pill:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.3);
    color: #667eea;
}

.category-pill.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: white;
}

/* ================================================
   Footer
   ================================================ */
.site-footer {
    margin-top: 60px;
    padding: 40px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-links a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #667eea;
}

.footer-copyright {
    color: #444;
    font-size: 13px;
}

/* ================================================
   Loading Animation
   ================================================ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 15, 26, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ================================================
   Back to Top Button
   ================================================ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    z-index: 99;
    font-size: 20px;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
}

/* ================================================
   Responsive Design
   ================================================ */
@media (max-width: 1200px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .menu-toggle {
        display: flex !important;
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 99;
        width: 44px;
        height: 44px;
        border-radius: 10px;
        background: rgba(102, 126, 234, 0.9);
        border: none;
        color: white;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-size: 20px;
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    }

    .menu-toggle:active {
        transform: scale(0.95);
    }

    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 20px;
    }

    .top-bar {
        padding-left: 60px;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 20px;
    }

    .top-bar {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }

    .search-box {
        width: 100%;
    }

    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

.menu-toggle {
    display: none;
}

/* ================================================
   Game Detail Page
   ================================================ */
.game-detail-header {
    position: relative;
    padding: 60px 0;
    margin-bottom: 40px;
    border-radius: 24px;
    overflow: hidden;
}

.game-detail-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    filter: blur(20px);
    opacity: 0.3;
}

.game-detail-content {
    position: relative;
    display: flex;
    gap: 40px;
    align-items: center;
}

.game-detail-poster {
    width: 200px;
    height: 200px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
}

.game-detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-detail-info {
    flex: 1;
}

.game-detail-title {
    font-size: 36px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 15px;
}

.game-detail-desc {
    font-size: 16px;
    color: #999;
    line-height: 1.7;
    margin-bottom: 25px;
}

.game-detail-actions {
    display: flex;
    gap: 15px;
}

.btn-primary {
    padding: 14px 35px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    padding: 14px 35px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ================================================
   Category Page
   ================================================ */
.category-header {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.category-title {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.category-count {
    font-size: 14px;
    color: #666;
    font-weight: 400;
}

/* Hide original styles we don't need */
.original-styles {
    display: none !important;
}

/* Consent Box */
.consent-box-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.consent-box-links a {
    color: #667eea !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

.consent-box-links a:hover {
    color: #8b9ff8 !important;
}
