/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0099CC;
    --primary-dark: #007AA3;
    --banner: #E91E63;
    --dark: #2C3E50;
    --white: #FFFFFF;
}

body {
    font-family: 'Fredoka', sans-serif;
    background: var(--primary);
    color: var(--dark);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ===== TOP BANNER ===== */
.top-banner {
    background: var(--banner);
    color: var(--white);
    text-align: center;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.top-banner a {
    color: #FFE082;
    font-weight: 600;
    margin-left: 4px;
}

.top-banner a:hover {
    text-decoration: underline;
}

/* ===== HEADER ===== */
.header {
    background: var(--primary);
    padding: 0 40px;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: box-shadow 0.3s;
    height: 65px;
    display: flex;
    align-items: center;
}

.header.scrolled {
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 40px;
    width: auto;
    border-radius: 8px;
    transition: transform 0.3s;
}

.logo:hover .logo-img {
    transform: scale(1.05);
}

.logo-icon {
    background: var(--white);
    border-radius: 50px;
    padding: 8px 16px;
    display: inline-flex;
    gap: 8px;
    transition: transform 0.3s;
}

.logo:hover .logo-icon {
    transform: scale(1.05);
}

.logo-icon .eye {
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    display: block;
}

.logo-text {
    color: var(--white);
    font-size: 20px;
    font-weight: 700;
}

/* Nav */
.nav {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav a {
    color: var(--white);
    font-size: 14px;
    font-weight: 500;
    opacity: 0.85;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
}

.nav a:hover, .nav a.active {
    opacity: 1;
}

.nav-cart {
    opacity: 0.85 !important;
    display: flex;
    align-items: center;
}

.nav-cart svg {
    vertical-align: middle;
}

.nav-cart:hover {
    opacity: 1 !important;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 28px;
    cursor: pointer;
}

/* ===== HERO ===== */
.hero {
    background: var(--primary);
    padding: 70px 20px 50px;
    text-align: center;
}

.hero-content {
    max-width: 600px;
    margin: 0 auto;
}

.hero-logo-img {
    height: 100px;
    width: auto;
    border-radius: 16px;
    margin: 0 auto 30px;
    display: block;
    filter: drop-shadow(0 8px 20px rgba(0,0,0,0.2));
}

.hero-logo {
    padding: 28px 55px;
    border-radius: 70px;
    margin: 0 auto 30px;
}

.hero-logo .eye {
    width: 36px;
    height: 36px;
}

.hero-title {
    color: var(--white);
    font-size: 52px;
    font-weight: 700;
    font-style: italic;
    letter-spacing: -1px;
    margin-bottom: 12px;
}

.hero-subtitle {
    color: rgba(255,255,255,0.8);
    font-size: 18px;
    font-weight: 400;
    margin-bottom: 35px;
}

.hero-nav {
    display: flex;
    justify-content: center;
    gap: 35px;
}

.hero-nav a {
    color: var(--white);
    font-size: 15px;
    font-weight: 500;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.hero-nav a:hover {
    opacity: 1;
}


/* ===== GAMES GRID ===== */
.games-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
}

.game-card {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.game-card:hover {
    transform: scale(1.06);
    z-index: 10;
}

.game-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    transition: background 0.3s;
}

.game-card:hover::after {
    background: rgba(0,0,0,0.08);
}

.game-image {
    width: 60%;
    aspect-ratio: 3/4;
    background: var(--white);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 8px 25px rgba(0,0,0,0.2),
        0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.4s;
    position: relative;
    z-index: 1;
}

.game-card:hover .game-image {
    transform: translateY(-18px) rotate(-2deg);
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.3),
        0 5px 15px rgba(0,0,0,0.15);
}

.placeholder-game {
    font-size: 55px;
}

.game-title {
    color: var(--white);
    font-size: 13px;
    font-weight: 600;
    margin-top: 14px;
    text-align: center;
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s;
}

.game-card:hover .game-title {
    opacity: 1;
    transform: translateY(0);
}

/* ===== CTA SECTION ===== */
.cta-section {
    background: var(--primary);
    padding: 80px 20px;
    text-align: center;
}

.cta-content h2 {
    color: var(--white);
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 12px;
}

.cta-content p {
    color: rgba(255,255,255,0.75);
    font-size: 17px;
    margin-bottom: 30px;
}

.cta-btn {
    display: inline-block;
    background: var(--white);
    color: var(--primary);
    padding: 16px 40px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s;
}

.cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.2);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--primary);
    color: var(--white);
}

/* Footer Games List */
.footer-games {
    padding: 50px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px 30px;
}

.footer-game-item {
    font-size: 13px;
    font-weight: 500;
    opacity: 0.8;
    padding: 6px 0;
    transition: opacity 0.3s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.footer-game-item:hover {
    opacity: 1;
}

/* Footer Nav Links */
.footer-nav {
    border-top: 1px solid rgba(255,255,255,0.15);
    padding: 45px 40px;
}

.footer-nav-inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-col h4 {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-col a {
    display: block;
    font-size: 12px;
    margin-bottom: 8px;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.footer-col a:hover {
    opacity: 1;
}

.footer-col-legal {
    border-left: 1px solid rgba(255,255,255,0.15);
    padding-left: 25px;
}

.footer-bottom {
    text-align: center;
    padding: 25px 40px;
    border-top: 1px solid rgba(255,255,255,0.15);
    font-size: 12px;
    opacity: 0.5;
}

/* ===== PAGE HEADER (shared) ===== */
.page-header {
    background: var(--primary);
    padding: 120px 40px 60px;
    text-align: center;
}

.page-header h1 {
    color: var(--dark);
    font-size: 42px;
    font-weight: 700;
}

/* ===== RESPONSIVE ===== */

/* Large Tablet / Small Desktop */
@media (max-width: 1200px) {
    .games-grid { grid-template-columns: repeat(4, 1fr); }
    .footer-nav-inner { grid-template-columns: repeat(4, 1fr); }
    .footer-col-legal { border-left: none; padding-left: 0; }
}

/* Tablet Portrait */
@media (max-width: 900px) {
    .games-grid { grid-template-columns: repeat(3, 1fr); }
    .footer-nav-inner { grid-template-columns: repeat(3, 1fr); }
    .footer-games-grid { grid-template-columns: repeat(2, 1fr); }
    .hero { padding: 50px 20px 40px; }
    .hero-logo-img { height: 80px; }
    .hero-subtitle { font-size: 16px; }
    .cta-section { padding: 60px 20px; }
    .cta-content h2 { font-size: 28px; }
}

/* Mobile */
@media (max-width: 768px) {
    /* Header mobile */
    .header { padding: 0 16px; height: 56px; }
    .logo-img { height: 32px; }

    .nav { display: none; }
    .nav.mobile-open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary);
        padding: 20px;
        gap: 4px;
        box-shadow: 0 15px 30px rgba(0,0,0,0.2);
        z-index: 200;
    }
    .nav.mobile-open a {
        font-size: 16px;
        padding: 12px 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    .mobile-menu-btn { display: block; min-width: 44px; min-height: 44px; }

    /* Hero mobile */
    .hero { padding: 30px 16px 20px; }
    .hero-logo-img { height: 60px; margin-bottom: 15px; }
    .hero-subtitle { font-size: 15px; margin-bottom: 18px; }
    .hero-nav { gap: 16px; flex-wrap: wrap; justify-content: center; }
    .hero-nav a { font-size: 14px; padding: 8px 4px; min-height: 44px; display: flex; align-items: center; }

    /* Games Grid mobile - BIGGER emojis, show titles */
    .games-grid { grid-template-columns: repeat(2, 1fr); gap: 0; }
    .game-card { padding: 0; aspect-ratio: 1; }
    .game-image { 
        width: 100%; 
        height: 100%;
        aspect-ratio: auto;
        border-radius: 0; 
        background: none !important;
        box-shadow: none;
    }
    .placeholder-game { font-size: 64px; }
    .game-card:hover .game-image { transform: none; box-shadow: none; }
    .game-title { 
        font-size: 11px; 
        margin-top: 0;
        padding: 6px 4px;
        opacity: 1; 
        transform: none; 
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
        position: absolute;
        bottom: 8px;
        left: 0;
        right: 0;
    }

    /* CTA mobile */
    .cta-section { padding: 40px 16px; }
    .cta-content h2 { font-size: 22px; }
    .cta-content p { font-size: 14px; margin-bottom: 20px; }
    .cta-btn { padding: 14px 28px; font-size: 14px; min-height: 44px; }

    /* Footer mobile */
    .footer-games { padding: 25px 16px; }
    .footer-games-grid { grid-template-columns: 1fr 1fr; gap: 4px 16px; }
    .footer-game-item { font-size: 12px; padding: 6px 0; min-height: 36px; display: flex; align-items: center; }
    .footer-nav { padding: 25px 16px; }
    .footer-nav-inner { grid-template-columns: repeat(2, 1fr); gap: 20px 16px; }
    .footer-col h4 { font-size: 12px; margin-bottom: 10px; }
    .footer-col a { font-size: 12px; margin-bottom: 8px; min-height: 32px; display: flex; align-items: center; }
    .footer-col-legal { border-left: none; padding-left: 0; }
    .footer-bottom { padding: 20px 16px; font-size: 11px; }

    /* Top banner mobile */
    .top-banner { font-size: 12px; padding: 10px 16px; }
}

/* Small Mobile */
@media (max-width: 480px) {
    .hero-logo-img { height: 50px; }
    .hero-subtitle { font-size: 14px; }
    .hero-nav { gap: 12px; }
    .hero-nav a { font-size: 13px; }
    .games-grid { grid-template-columns: repeat(2, 1fr); }
    .game-card { min-height: auto; padding: 0; }
    .game-image { width: 100%; height: 100%; }
    .placeholder-game { font-size: 56px; }
    .footer-nav-inner { grid-template-columns: 1fr 1fr; gap: 16px; }
    .cta-content h2 { font-size: 20px; }
    .cta-btn { width: 100%; text-align: center; }
}