@import "./css.css";

/* ===== NEW LIGHT THEME ===== */
:root {
    --primary-dark: #1fad91;
    --primary-mid: #2cc9a8;
    --accent: #f43f5e;
    --accent-secondary: #06b6d4;
    --text-light: #1f2937;
    --text-muted: #6b7280;
    --card-bg: #ffffff;
    --card-hover: #f3f4f6;
    --gradient-start: #1fad91;
    --gradient-end: #1a8a7a;
    --border-color: #e5e7eb;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
}

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

html, body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #f8fafc;
    color: var(--text-light);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== LAYOUT WRAPPER ===== */
.layout-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar-nav {
    width: 260px;
    background: var(--card-bg);
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    padding: 30px 20px;
    z-index: 100;
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    transition: transform 0.3s ease;
    box-shadow: var(--shadow);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    font-weight: 700;
}

.sidebar-logo-text {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-light);
}

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

.nav-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 12px;
    padding-left: 12px;
}

.nav-menu {
    list-style: none;
}

.nav-item {
    margin-bottom: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background: #eff6ff;
    color: var(--primary-dark);
}

.nav-link.active {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
}

.nav-link svg {
    width: 20px;
    height: 20px;
    opacity: 0.8;
}

.nav-badge {
    margin-left: auto;
    background: var(--accent);
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
}

/* ===== MAIN CONTENT AREA ===== */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 30px 40px;
    min-height: 100vh;
}

/* ===== TOP BAR ===== */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 35px;
    gap: 20px;
}

.search-container {
    flex: 1;
    max-width: 600px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 14px 20px 14px 50px;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    background: var(--card-bg);
    color: var(--text-light);
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus {
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

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

.action-btn {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: var(--shadow);
}

.action-btn:hover {
    background: var(--primary-dark);
    color: white;
    border-color: var(--primary-dark);
}

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

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-light);
}

.section-link {
    color: var(--primary-dark);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.section-link:hover {
    text-decoration: underline;
}

/* ===== GAME CARDS ===== */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.game-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.game-card-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: linear-gradient(135deg, #e0f2fe, #f0f9ff);
}

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

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

.play-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transform: scale(0);
    transition: transform 0.3s ease;
}

.game-card:hover .play-btn {
    transform: scale(1);
}

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

.game-card-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-card-category {
    font-size: 12px;
    color: var(--text-muted);
}

/* ===== CATEGORY CHIPS ===== */
.category-chips {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 35px;
}

.category-chip {
    padding: 10px 20px;
    border-radius: 25px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-chip:hover,
.category-chip.active {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-color: transparent;
    color: white;
}

/* ===== GAME LIST (Category Page) ===== */
.game-list-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.game-list-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px 20px;
    background: var(--card-bg);
    border-radius: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.game-list-item:hover {
    background: #eff6ff;
    border-color: var(--primary-dark);
}

.game-list-thumb {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    object-fit: cover;
}

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

.game-list-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.game-list-meta {
    font-size: 13px;
    color: var(--text-muted);
}

.game-list-play {
    padding: 10px 25px;
    border-radius: 8px;
    background: var(--accent);
    border: none;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.game-list-play:hover {
    opacity: 0.9;
}

/* ===== GAME DETAIL PAGE ===== */
.detail-hero {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    margin-bottom: 50px;
    padding: 30px;
    background: var(--card-bg);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.detail-thumbnail {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 15px;
    object-fit: cover;
}

.detail-info h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 15px;
}

.detail-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.detail-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
}

.detail-description {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 30px;
}

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

.detail-play-btn {
    padding: 15px 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border: none;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.detail-play-btn:hover {
    transform: scale(1.05);
}

.detail-fav-btn {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    cursor: pointer;
}

/* ===== FOOTER ===== */
.page-footer {
    margin-top: 60px;
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--primary-dark);
}

/* ===== BACK TO TOP ===== */
.backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(59, 130, 246, 0.4);
}

.backToTop.visible {
    opacity: 1;
    transform: translateY(0);
}

.backToTop:hover {
    transform: translateY(-3px);
}

/* ===== MOBILE MENU TOGGLE ===== */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 101;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    cursor: pointer;
    box-shadow: var(--shadow);
}

@media (max-width: 1024px) {
    .sidebar-nav {
        transform: translateX(-100%);
    }

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

    .main-content {
        margin-left: 0;
        padding: 20px;
    }

    .detail-hero {
        grid-template-columns: 1fr;
    }

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

    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .top-bar {
        flex-wrap: wrap;
    }

    .search-container {
        max-width: 100%;
        order: 2;
    }
}

/* ===== HIDE OLD ELEMENTS ===== */
.app-container,
header.main,
footer.main,
nav.main,
.tile-list,
.consent-box-holder {
    display: none !important;
}

/* Override any inline styles */
.app-container[style],
.content[style] {
    all: unset !important;
}
