/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: #F5F5F7;
    min-height: 100vh;
    color: #333;
}

a{
    text-decoration: none
}

/* ==================== HEADER ==================== */
.header {
    background: #5850EC;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 100%;
    margin: 0 auto;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.3px;
}

/* Desktop Navigation - Hidden on Mobile */
.desktop-nav {
    display: none;
    gap: 32px;
    flex: 1;
}

.desktop-nav a {
    color: #ffffff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.desktop-nav a:hover {
    opacity: 0.8;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-btn {
    background: #ffffff;
    color: #5850EC;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-btn:hover {
    background: #f0f0f0;
    transform: translateY(-1px);
}

.search-btn:active {
    transform: translateY(0);
}

.menu-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    justify-content: center;
    align-items: center;
}

.menu-icon {
    width: 22px;
    height: 2.5px;
    background: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-btn:hover .menu-icon {
    background: #e0e0e0;
}

/* Menu Button Active State (X icon) */
.menu-btn.active .menu-icon:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-btn.active .menu-icon:nth-child(2) {
    opacity: 0;
}

.menu-btn.active .menu-icon:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ==================== MOBILE MENU DROPDOWN ==================== */
.mobile-menu {
    display: none;
    position: fixed;
    top: 56px; /* Below header */
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    z-index: 999;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.mobile-menu.active {
    display: block;
    max-height: calc(100vh - 56px);
    overflow-y: auto;
}

.mobile-menu-content {
    background: #ffffff;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    margin: 0;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    padding: 8px 0;
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    color: #1d1d1f;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: background 0.2s;
    border-bottom: 1px solid #f3f4f6;
}

.mobile-nav-item:last-child {
    border-bottom: none;
}

.mobile-nav-item:hover {
    background: #f9fafb;
}

.mobile-nav-item:active {
    background: #f3f4f6;
}

.nav-icon {
    font-size: 24px;
    width: 32px;
    text-align: center;
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 0;
}

/* ==================== QUICK NAVIGATION ==================== */
.quick-nav {
    padding: 20px 16px;
    background: #ffffff;
}

.quick-nav-container {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    max-width: 100%;
}

.quick-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: transform 0.2s;
}

.quick-nav-item:hover {
    transform: translateY(-3px);
}

.quick-nav-item:active {
    transform: translateY(0);
}

.quick-nav-icon {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.quick-nav-item:hover .quick-nav-icon {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: scale(1.05);
}

.quick-nav-label {
    font-size: 12px;
    font-weight: 600;
    color: #1d1d1f;
    text-align: center;
    line-height: 1.2;
}

/* Section Header */
.section-header {
    padding: 20px 16px 16px;
    background: transparent;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: #5850EC;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.section-subtitle {
    font-size: 14px;
    color: #6B7280;
    font-weight: 400;
    margin: 0;
}

/* ==================== GAME CARDS ==================== */
.game-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0 16px 24px;
}

/* Game Card Link */
.game-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Game Card */
.game-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

.game-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.game-card:active {
    transform: translateY(0);
}

/* Game Image */
.game-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 66.67%; /* 3:2 aspect ratio */
    overflow: hidden;
    background: #e5e7eb;
}

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

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

.game-meta-top {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Game Category Tags */
.game-category {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 6px 12px;
    border-radius: 6px;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.game-category.puzzle {
    background: rgba(88, 80, 236, 0.95);
    color: #ffffff;
}

.game-category.shooting {
    background: rgba(16, 185, 129, 0.95);
    color: #ffffff;
}

.game-category.action {
    background: rgba(239, 68, 68, 0.95);
    color: #ffffff;
}

.game-category.racing {
    background: rgba(245, 158, 11, 0.95);
    color: #ffffff;
}

.game-category.girls {
    background: rgba(236, 72, 153, 0.95);
    color: #ffffff;
}

.game-category.arcade {
    background: rgba(139, 92, 246, 0.95);
    color: #ffffff;
}

.game-category.adventure {
    background: rgba(139, 92, 246, 0.95);
    color: #ffffff;
}

/* Game Date */
.game-date {
    font-size: 12px;
    color: #ffffff;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.4);
    padding: 5px 10px;
    border-radius: 6px;
    backdrop-filter: blur(8px);
}

/* Game Info Section */
.game-info {
    padding: 16px;
}

.game-title {
    font-size: 18px;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 8px;
    line-height: 1.3;
    letter-spacing: -0.3px;
}

.game-description {
    font-size: 14px;
    color: #6B7280;
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    max-height: 2.8em; /* fallback for non-webkit browsers */
}

/* Game Stats */
.game-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #F3F4F6;
}

.rating {
    display: flex;
    align-items: center;
    gap: 4px;
}

.rating-score {
    font-size: 15px;
    font-weight: 600;
    color: #1d1d1f;
}

.star {
    color: #5850EC;
    font-size: 16px;
}

.likes {
    font-size: 13px;
    color: #9CA3AF;
    font-weight: 500;
}

/* ==================== RESPONSIVE DESIGN - DESKTOP ==================== */
@media (min-width: 1024px) {
    /* Header for Desktop */
    .header-content {
        max-width: 1400px;
        margin: 0 auto;
        padding: 14px 32px;
    }

    .logo {
        font-size: 20px;
    }

    /* Show Desktop Navigation */
    .desktop-nav {
        display: flex;
        margin-left: 48px;
    }

    /* Hide Mobile Menu Button and Mobile Menu */
    .menu-btn {
        display: none;
    }

    .mobile-menu {
        display: none !important;
    }

    /* Main Content - Wider */
    .main-content {
        max-width: 1400px;
        padding: 0 32px;
    }

    /* Quick Navigation */
    .quick-nav {
        padding: 32px 0;
    }

    .quick-nav-container {
        max-width: 800px;
        margin: 0 auto;
        gap: 20px;
    }

    .quick-nav-icon {
        font-size: 32px;
    }

    .quick-nav-label {
        font-size: 14px;
    }

    /* Section Header */
    .section-header {
        padding: 32px 0 24px;
    }

    .section-title {
        font-size: 36px;
    }

    .section-subtitle {
        font-size: 16px;
    }

    /* Game Cards - 4 Column Grid on Desktop */
    .game-cards {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
        padding: 0 0 40px;
    }

    /* Adjust card text for smaller grid items */
    .game-title {
        font-size: 16px;
    }

    .game-description {
        font-size: 13px;
        -webkit-line-clamp: 2;
        max-height: 2.6em;
    }

    .game-info {
        padding: 14px;
    }

    /* Game Category smaller on desktop */
    .game-category {
        font-size: 10px;
        padding: 5px 10px;
    }

    .game-date {
        font-size: 11px;
        padding: 4px 8px;
    }

    /* Footer Desktop Layout */
    .footer-content {
        grid-template-columns: 2fr 1fr 1.5fr;
        padding: 64px 32px 40px;
        gap: 48px;
    }

    .footer-bottom {
        padding: 24px 32px;
    }
}

/* ==================== TABLET RESPONSIVE ==================== */
@media (min-width: 768px) and (max-width: 1023px) {
    .header-content {
        padding: 14px 24px;
    }

    .main-content {
        max-width: 900px;
        padding: 0 24px;
    }

    /* Quick Navigation */
    .quick-nav {
        padding: 24px 0;
    }

    .quick-nav-container {
        max-width: 600px;
        margin: 0 auto;
        gap: 16px;
    }

    .quick-nav-icon {
        font-size: 28px;
    }

    .section-header {
        padding: 24px 0 20px;
    }

    .section-title {
        font-size: 32px;
    }

    /* Game Cards - 2 Column Grid on Tablet */
    .game-cards {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
        padding: 0 0 32px;
    }

    /* Footer Tablet Layout */
    .footer-content {
        grid-template-columns: 1.5fr 1fr 1.2fr;
        padding: 48px 24px 32px;
        gap: 32px;
    }

    .footer-bottom {
        padding: 20px 24px;
    }
}

/* ==================== FOOTER ==================== */
.footer {
    background: #5850EC;
    color: #ffffff;
    margin-top: 40px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 48px 16px 32px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.footer-logo {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
}

.footer-brand h3 {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.footer-section h4 {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 12px 0;
}

.footer-description {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-links li a:hover {
    color: #ffffff;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding: 24px 16px;
    text-align: center;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-bottom p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* ==================== MOBILE SMALL SCREENS ==================== */
@media (max-width: 375px) {
    .quick-nav-icon {
        font-size: 20px;
    }

    .quick-nav-label {
        font-size: 10px;
    }

    .quick-nav-container {
        gap: 8px;
    }
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.game-card {
    animation: fadeIn 0.5s ease-out;
}

.game-card:nth-child(2) {
    animation-delay: 0.05s;
}

.game-card:nth-child(3) {
    animation-delay: 0.1s;
}

.game-card:nth-child(4) {
    animation-delay: 0.15s;
}

.game-card:nth-child(5) {
    animation-delay: 0.2s;
}

.game-card:nth-child(6) {
    animation-delay: 0.25s;
}

.game-card:nth-child(7) {
    animation-delay: 0.3s;
}

.game-card:nth-child(8) {
    animation-delay: 0.35s;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #F5F5F7;
}

::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9CA3AF;
}
