/* === CSS Variables - Matching TMM Logo Colors === */
:root {
    /* Primary brand colors from logo */
    --color-yellow: #FFB800;
    --color-yellow-light: #FFD54F;
    --color-blue: #3B9FD8;
    --color-blue-dark: #2B7AB0;
    --color-red: #E84545;
    --color-red-dark: #C73636;
    --color-orange: #FF6B35;

    /* Background & UI */
    --color-bg: #FFF8E7;
    --color-bg-alt: #FFF2D6;
    --color-bg-card: #FFFFFF;
    --color-text: #2D3748;
    --color-text-muted: #606878;
    --color-border: rgba(0, 0, 0, 0.08);

    /* Accent for horror elements */
    --color-spooky: #6B4C9A;
    --color-spooky-glow: rgba(107, 76, 154, 0.3);

    --font-display: 'Fredoka', 'Nunito', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition-fast: 0.2s ease;
    --transition-medium: 0.4s ease;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.15);
}

/* === Reset & Base === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* === Typography === */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text);
}

a {
    color: inherit;
    text-decoration: none;
}

/* === Navigation === */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 0.75rem 2rem;
    background: rgba(255, 248, 231, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition-fast);
}

.logo:hover {
    transform: scale(1.02);
}

.logo-img {
    height: 48px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
    transition: var(--transition-fast);
    position: relative;
    padding: 0.25rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--color-red);
    border-radius: 2px;
    transition: var(--transition-fast);
}

.nav-links a:hover {
    color: var(--color-red);
}

.nav-links a:hover::after {
    width: 100%;
}

/* === Hero Section === */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 8rem 2rem 6rem;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-bg) 0%, var(--color-bg-alt) 100%);
}

/* Decorative circles */
.hero::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: var(--color-yellow);
    border-radius: 50%;
    opacity: 0.15;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -150px;
    left: -150px;
    width: 500px;
    height: 500px;
    background: var(--color-blue);
    border-radius: 50%;
    opacity: 0.1;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-logo {
    max-width: 400px;
    width: 90%;
    height: auto;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.15));
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.hero-tagline {
    font-size: 1.1rem;
    color: var(--color-red);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1.35rem;
    color: var(--color-text-muted);
    max-width: 550px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--color-red) 0%, var(--color-orange) 100%);
    color: white;
    font-weight: 700;
    font-size: 1.05rem;
    border-radius: 50px;
    transition: var(--transition-fast);
    box-shadow: 0 4px 15px rgba(232, 69, 69, 0.35);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(232, 69, 69, 0.45);
}

.cta-button .arrow {
    transition: var(--transition-fast);
}

.cta-button:hover .arrow {
    transform: translateX(4px);
}

/* Floating decorations */
.hero-decoration {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.floating-x, .floating-o {
    position: absolute;
    font-size: 5rem;
    font-weight: 900;
    opacity: 0.08;
    animation: float 6s ease-in-out infinite;
}

.floating-x { color: var(--color-red); }
.floating-o { color: var(--color-blue); }

.floating-x:nth-child(1) { top: 15%; left: 8%; }
.floating-o:nth-child(2) { top: 25%; right: 12%; animation-delay: -1s; }
.floating-x:nth-child(3) { bottom: 25%; left: 15%; animation-delay: -2s; }
.floating-o:nth-child(4) { bottom: 20%; right: 8%; animation-delay: -3s; }

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

/* === Section Styles === */
section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, var(--color-text) 0%, var(--color-blue-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-line {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-yellow) 0%, var(--color-red) 100%);
    margin: 0 auto;
    border-radius: 2px;
}

/* === Games Section === */
.games-section {
    background: var(--color-bg-alt);
    max-width: none;
    padding: 6rem 2rem;
}

.games-section .section-content {
    max-width: 1200px;
    margin: 0 auto;
}

.game-card {
    background: var(--color-bg-card);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
}

.game-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    padding: 0.5rem 1.25rem;
    background: linear-gradient(135deg, var(--color-spooky) 0%, #8B5FC7 100%);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 50px;
    z-index: 10;
    box-shadow: 0 4px 12px var(--color-spooky-glow);
}

.game-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding: 3rem;
}

.game-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.game-title {
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.game-subtitle {
    color: var(--color-spooky);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.game-description {
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 1.05rem;
}

.game-features {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.game-features li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text);
}

.feature-icon {
    font-size: 1.25rem;
}

.wishlist-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 1.75rem;
    background: linear-gradient(135deg, var(--color-spooky) 0%, #8B5FC7 100%);
    color: white;
    font-weight: 700;
    border-radius: 50px;
    transition: var(--transition-fast);
    width: fit-content;
    box-shadow: 0 4px 15px var(--color-spooky-glow);
}

.wishlist-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--color-spooky-glow);
}

/* TTT Board Visual */
.game-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.ttt-board {
    display: grid;
    grid-template-columns: repeat(3, 85px);
    grid-template-rows: repeat(3, 85px);
    gap: 10px;
    transform: perspective(500px) rotateX(5deg) rotateY(-5deg);
    background: linear-gradient(135deg, #2D3748 0%, #1A202C 100%);
    padding: 15px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

.cell {
    background: #F7FAFC;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.75rem;
    font-weight: 900;
    transition: var(--transition-medium);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.cell.x {
    color: var(--color-red);
}

.cell.o {
    color: var(--color-blue);
}

.cell.glowing {
    animation: glow 2s ease-in-out infinite;
}

.cell.x.glowing {
    box-shadow: 0 0 20px rgba(232, 69, 69, 0.6), inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.cell.o.glowing {
    box-shadow: 0 0 20px rgba(59, 159, 216, 0.6), inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

@keyframes glow {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.game-visual-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 40%, var(--color-bg-card) 100%);
    pointer-events: none;
}

/* === Horror Theme (Tic-Tac-Terror) === */
.game-card.horror-theme {
    background: linear-gradient(145deg, #0d0d12 0%, #1a1a24 50%, #12121a 100%);
    border: 1px solid rgba(180, 30, 30, 0.2);
    overflow: hidden;
}

.game-card.horror-theme::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(180, 30, 30, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(100, 20, 20, 0.1) 0%, transparent 40%);
    pointer-events: none;
}

.game-badge.horror {
    background: linear-gradient(135deg, #8B0000 0%, #DC143C 100%);
    box-shadow: 0 4px 20px rgba(139, 0, 0, 0.5);
}

.game-card.horror-theme .game-content {
    position: relative;
    z-index: 1;
}

/* Horror Visual Hero */
.game-visual-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-cover {
    width: 280px;
    height: 280px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(139, 0, 0, 0.3),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    transition: var(--transition-medium);
}

.game-cover:hover {
    transform: scale(1.02);
    box-shadow:
        0 12px 48px rgba(0, 0, 0, 0.7),
        0 0 80px rgba(200, 0, 0, 0.4),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.game-cover-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(180, 0, 0, 0.2) 0%, transparent 70%);
    animation: horrorPulse 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes horrorPulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

/* Horror Typography */
.horror-title {
    color: #fff;
    text-shadow: 0 0 30px rgba(180, 0, 0, 0.5);
}

.horror-subtitle {
    color: #DC143C !important;
    text-shadow: 0 0 20px rgba(220, 20, 60, 0.3);
}

.game-card.horror-theme .game-description {
    color: #9a9ab0;
}

/* Horror Features */
.horror-features li {
    color: #c8c8d8 !important;
}

/* Horror Button */
.horror-btn {
    background: linear-gradient(135deg, #8B0000 0%, #DC143C 100%) !important;
    box-shadow: 0 4px 20px rgba(139, 0, 0, 0.4) !important;
}

.horror-btn:hover {
    box-shadow: 0 8px 32px rgba(220, 20, 60, 0.5) !important;
}

/* Film grain effect for horror card */
.game-card.horror-theme::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.03;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* === About Section === */
.about-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-lead {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    color: var(--color-text);
}

.about-lead strong {
    color: var(--color-red);
}

.about-text p {
    color: var(--color-text-muted);
    margin-bottom: 1rem;
    font-size: 1.05rem;
    line-height: 1.8;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.stat {
    text-align: center;
    padding: 1.75rem;
    background: var(--color-bg-card);
    border-radius: 16px;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}

.stat:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat:nth-child(1) .stat-number { color: var(--color-yellow); }
.stat:nth-child(2) .stat-number { color: var(--color-red); }
.stat:nth-child(3) .stat-number { color: var(--color-blue); }

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 800;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

/* === Contact Section === */
.contact-section {
    text-align: center;
    background: var(--color-bg-alt);
    max-width: none;
    padding: 6rem 2rem;
}

.contact-text {
    color: var(--color-text-muted);
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: var(--color-bg-card);
    border-radius: 50%;
    transition: var(--transition-fast);
    border: 2px solid var(--color-border);
    color: var(--color-text-muted);
}

.social-link svg {
    width: 22px;
    height: 22px;
}

.social-link:nth-child(1):hover { background: #1DA1F2; color: white; border-color: #1DA1F2; }
.social-link:nth-child(2):hover { background: #5865F2; color: white; border-color: #5865F2; }
.social-link:nth-child(3):hover { background: #FF0000; color: white; border-color: #FF0000; }
.social-link:nth-child(4):hover { background: #333; color: white; border-color: #333; }

.social-link:hover {
    transform: translateY(-4px);
}

/* === Footer === */
.footer {
    background: linear-gradient(135deg, #2D3748 0%, #1A202C 100%);
    padding: 3rem 2rem;
    text-align: center;
    color: white;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.footer-logo img {
    height: 60px;
    width: auto;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.footer-tagline {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* === Responsive === */
@media (max-width: 900px) {
    .game-content {
        grid-template-columns: 1fr;
    }

    .game-visual {
        order: -1;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .about-stats {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }

    .stat {
        flex: 1;
        min-width: 140px;
        max-width: 180px;
    }
}

@media (max-width: 600px) {
    .navbar {
        padding: 0.5rem 1rem;
    }

    .logo-img {
        height: 40px;
    }

    .nav-links {
        gap: 1rem;
    }

    .nav-links a {
        font-size: 0.85rem;
    }

    .hero {
        padding: 7rem 1.5rem 4rem;
    }

    .hero-logo {
        max-width: 280px;
    }

    .hero-description {
        font-size: 1.1rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .game-content {
        padding: 1.5rem;
    }

    .game-title {
        font-size: 2rem;
    }

    .game-features {
        grid-template-columns: 1fr;
    }

    .ttt-board {
        grid-template-columns: repeat(3, 65px);
        grid-template-rows: repeat(3, 65px);
        padding: 12px;
    }

    .cell {
        font-size: 2rem;
    }

    .about-stats {
        flex-direction: column;
    }

    .stat {
        max-width: none;
    }
}

/* === Animations on scroll === */
@media (prefers-reduced-motion: no-preference) {
    .game-card,
    .stat,
    .social-link {
        opacity: 0;
        transform: translateY(20px);
        animation: fadeInUp 0.6s ease forwards;
    }

    .game-card { animation-delay: 0.1s; }
    .stat:nth-child(1) { animation-delay: 0.2s; }
    .stat:nth-child(2) { animation-delay: 0.3s; }
    .stat:nth-child(3) { animation-delay: 0.4s; }
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
