/* inter-regular - latin */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    src: url('../fonts/inter-v20-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* inter-600 - latin */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    src: url('../fonts/inter-v20-latin-600.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* inter-800 - latin */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Inter';
    font-style: normal;
    font-weight: 800;
    src: url('../fonts/inter-v20-latin-800.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

:root {
    /* Modern Palette - Deep Space & Neon */
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --primary: #6366f1; /* Indigo */
    --accent: #ec4899; /* Pink */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --ball-gradient: linear-gradient(145deg, #334155, #1e293b);
    --ball-shadow: 5px 5px 10px rgba(0, 0, 0, 0.3), -2px -2px 5px rgba(255, 255, 255, 0.05);

    --font-main: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* Ambient Background Glow */
.background-glow {
    position: fixed;
    top: -20%;
    left: -20%;
    width: 140%;
    height: 140%;
    background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.15), transparent 60%),
    radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.15), transparent 50%);
    z-index: -1;
    pointer-events: none;
}

/* Header - Glassmorphism */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 5%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.05em;
}

.logo a {
    text-decoration: none;
    color: var(--text-main); /* Inherit the white color */
    display: flex;
    align-items: center;
    gap: 2px; /* Tiny gap between Spring and Lotto */
    transition: all 0.3s ease;
}

.logo a span {
    color: var(--primary);
    transition: all 0.3s ease;
}

.logo a:hover {
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}

/* 2. Intensify the color and glow of the "Lotto" part */
.logo a:hover span {
    color: #818cf8; /* Slightly lighter indigo for "lit" effect */
    filter: brightness(1.2);
    text-shadow: 0 0 20px rgba(99, 102, 241, 0.6);
}

/* Navigation Container - ensure items align nicely */
nav {
    display: flex;
    gap: 0.8rem; /* Space between buttons */
    align-items: center;
}

.nav-link {
    position: relative;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.85); /* High visibility */
    font-weight: 600;

    /* Smaller text and tighter padding */
    font-size: 0.85rem;
    padding: 0.45rem 1rem;

    border-radius: 30px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    background: transparent;
}

/* --- HOVER STATE --- */
.nav-link:hover {
    color: #ffffff; /* Pure white on hover */
    background: rgba(139, 92, 246, 0.2); /* Slightly stronger background */
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.5),
    inset 0 0 10px rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.5);
    transform: translateY(-1px);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

/* --- ACTIVE STATE --- */
.nav-link.active {
    color: #a78bfa;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

/* Main Content */
main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* The Card */
.game-card {
    background: var(--bg-card);
    width: 100%;
    max-width: 850px;
    padding: 3rem;
    border-radius: 24px;
    /* Subtle border for glass effect */
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: center;
    backdrop-filter: blur(10px);
    animation: floatUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.card-header h1 {
    font-size: 3rem;
    margin: 0;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    letter-spacing: -0.05em;
}

.subtitle {
    color: var(--text-muted);
    margin-top: 0.5rem;
    font-size: 1.1rem;
}

/* Lottery Balls */
.numbers-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin: 3rem 0;
}

.ball {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--ball-gradient);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    box-shadow: var(--ball-shadow);
    position: relative;
    /* Modern gradient border trick */
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    opacity: 0;
    transform: scale(0.5);
}

/* Stagger animation for balls */
.ball:nth-child(1) {
    animation-delay: 0.1s;
}

.ball:nth-child(2) {
    animation-delay: 0.2s;
}

.ball:nth-child(3) {
    animation-delay: 0.3s;
}

.ball:nth-child(4) {
    animation-delay: 0.4s;
}

.ball:nth-child(5) {
    animation-delay: 0.5s;
}

.ball:nth-child(6) {
    animation-delay: 0.6s;
}

/* Special styling for the last ball if desired */
.ball.accent {
    background: linear-gradient(145deg, var(--primary), #4338ca);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    color: #ffffff;

    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.6);
    filter: brightness(1.1);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

footer {
    text-align: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Animations */
@keyframes popIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes floatUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
/* Mobile Optimization */
@media (max-width: 768px) {
    /* Adjust layout for tablets and phones */
    main {
        padding: 1rem;
        align-items: flex-start; /* Aligns to top on mobile for better scrolling */
        margin-top: 1rem;
    }

    .game-card {
        padding: 2rem 1.5rem;
        width: 100%;
    }

    /* Stack the header elements */
    header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    /* Make nav links look like tabs */
    nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .nav-link {
        font-size: 0.85rem;
        padding: 0.5rem 0.8rem;
    }
}

@media (max-width: 480px) {
    /* Specific tweaks for smartphones */
    .card-header h1 {
        font-size: 2rem;
    }

    .ball {
        width: 55px;
        height: 55px;
        font-size: 1.4rem;
        /* Reduce gap slightly so more fit on one line */
        margin: 0;
    }

    .numbers-container {
        gap: 1rem;
    }

    /* Make the main action button span full width for easy thumb tapping */
    .btn-primary {
        width: 100%;
        justify-content: center;
        padding: 1.2rem;
    }
}

/* --- HOME PAGE SPECIFIC STYLES --- */

/* Hero Section Typography */
.hero {
    text-align: center;
    margin-bottom: 3rem;
    animation: floatUp 0.8s ease-out;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.text-gradient {
    background: linear-gradient(to right, #818cf8, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-sub {
    color: var(--text-muted);
    font-size: 1.2rem;
    max-width: 500px;
    margin: 0 auto;
}

/* Games Grid Layout */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 900px;
}

/* Game Tile Card */
.game-tile {
    position: relative;
    background: rgba(30, 41, 59, 0.4); /* More transparent than game card */
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 2rem;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 260px;
}

/* Gradient Overlays for each game */
.tile-645::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.2), transparent 60%);
    z-index: -1;
    transition: opacity 0.4s;
}

.tile-735::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(236, 72, 153, 0.2), transparent 60%);
    z-index: -1;
}

/* Hover Effects */
.game-tile:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(30, 41, 59, 0.8);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.game-tile h2 {
    font-size: 2rem;
    margin: 1rem 0 0.5rem 0;
}

.game-tile p {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.95rem;
}

/* Icon Badge */
.icon-badge {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 1rem;
}

/* Status Pill (Jackpot/Time) */
.status-pill {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.4rem 0.8rem;
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* The Arrow that appears on hover */
.hover-arrow {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    font-size: 1.5rem;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    color: var(--text-main);
}

.game-tile:hover .hover-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Mobile adjustments for Home */
@media (max-width: 600px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .games-grid {
        grid-template-columns: 1fr; /* Stack cards vertically */
    }

    .game-tile {
        min-height: 200px;
    }
}