/* --- 1. VARIABLES --- */
:root {
    --primary: #7f1d1d;       /* Deep Maroon */
    --white: #ffffff;
    --bg-body: #fffbf0;       /* Cream */
    --bg-card: #fff1f2;       /* Rose White */
    --border: #fecdd3;
    --text-main: #2d0a0a;
    --text-muted: #5c2b0c;
    --accent: #b45309;        /* Gold/Bronze */
    --highlight: #ffeb3b;     /* Bright Yellow */
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* --- 2. RESET & BASE --- */
html { font-size: 62.5%; } /* 10px base */
body {
    margin: 0;
    padding-bottom: 80px; /* Space for bottom nav */
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 1.6rem;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--bg-body);
}
a { color: var(--primary); text-decoration: none; font-weight: 700; }
img { max-width: 100%; display: block; }
*, *:before, *:after { box-sizing: border-box; }

/* --- 3. TYPOGRAPHY --- */
h1, h2, h3 { font-weight: 800; margin: 20px 0 10px; line-height: 1.2; }
h1 { font-size: 2.4rem; color: var(--text-muted); text-transform: capitalize; }
h2 { font-size: 2.0rem; }
h3 { font-size: 1.8rem; }
p { margin-bottom: 15px; }
.small-text { font-size: 1.4rem; color: var(--text-muted); }

/* Main Site Title Animation */
.site-logo {
    font-size: 3.6rem;
    font-weight: 900;
    text-align: center;
    margin: 10px 0;

    /* Gradient: Pink -> Purple -> Cyan */
    background: linear-gradient(90deg, #ff00cc, #333399, #00ffff, #ff00cc);
    background-size: 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

    /* Animation */
    animation: shine 3s linear infinite;

    /* Effect: A colored neon glow border */
    filter: drop-shadow(0px 0px 4px rgba(255, 0, 204, 0.8));
}

@keyframes shine { 
    to { background-position: 200%; } 
}

/* --- 4. LAYOUT --- */
.container { max-width: 800px; margin: 0 auto; padding: 0 15px; }
.text-center { text-align: center; }

/* --- 5. COMPONENT: CARD --- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}
.card-yellow { background: #fffbeb; border-color: #fed7aa; } /* For description boxes */

/* --- 6. COMPONENT: SECTION HEADER --- */
.section-header {
    background: linear-gradient(135deg, var(--primary) 0%, #4338ca 100%);
    color: var(--white);
    font-size: 2.4rem;
    font-weight: 800;
    text-align: center;
    padding: 5px;
    border-radius: 8px;
    margin: 15px 0 15px;
    box-shadow: var(--shadow);
}

/* --- 7. COMPONENT: RESULT BOX (Simplified) --- */
.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.result-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden; /* Keeps header inside border */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.result-card.featured { border: 2px solid var(--primary); }

.result-header {
    background: var(--primary);
    color: var(--white);
    padding: 12px;
    text-align: center;
    font-size: 2.6rem;
    font-weight: 700;
    /* Soft dark shadow for depth */
    text-shadow: 0px 3px 5px rgba(0, 0, 0, 0.4);
}

.result-time {
    display: block;
    font-size: 1.4rem;
    color: var(--highlight); /* Yellow Color */
    margin-top: 5px;
    font-weight: 600;
}

.result-number {
    font-size: 3.2rem;
    font-weight: 900;
    text-align: center;
    padding: 10px 0;
    color: var(--text-main);
    /* White highlight top-left, Dark shadow bottom-right */
    text-shadow: -1px -1px 0px rgba(255,255,255,0.8), 
                 2px 2px 2px rgba(127, 29, 29, 0.2);
}

.result-link {
    display: block;
    text-align: center;
    padding: 10px;
    border-top: 1px solid var(--border);
    background: var(--white);
    font-size: 1.6rem;
}

/* --- 8. COMPONENT: BUTTONS --- */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
    color: var(--white);
    border: none;
    margin-bottom: 15px;
    
    /* Animation applied here */
    animation: glow-pulse 2s infinite;
}

/* Define the glow animation */
@keyframes glow-pulse {
    0% {
        /* Base shadow */
        box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.7);
    }
    70% {
        /* Shadow expands outward and fades to transparent */
        box-shadow: 0 0 0 15px rgba(251, 191, 36, 0);
    }
    100% {
        /* Reset */
        box-shadow: 0 0 0 0 rgba(251, 191, 36, 0);
    }
}

/* --- 9. FOOTER NAV --- */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 0; width: 100%;
    height: 60px;
    background: var(--primary);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.2);
}
.nav-link {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: var(--white);
    font-size: 24px;
}
.nav-link img { width: 28px; height: 28px; }
.pulse { animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.2); } }

/* --- 10. DISCLAIMER --- */
.footer-disclaimer {
    background: #fff0f0;
    border-top: 1px solid var(--border);
    padding: 30px 15px;
    margin-top: 30px;
    text-align: center;
}

/* --- Free Game Section Styles --- */
.game-row {
    display: flex;
    justify-content: space-between; /* Pushes Name to left, Number to right */
    align-items: center;
    padding: 12px 5px;
    border-bottom: 1px solid var(--border); /* Adds a divider line */
}

.game-row:last-child {
    border-bottom: none; /* Removes line from the last item */
}

.game-name {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text-main);
}

.game-number {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--primary); /* Deep Maroon */
}

.daily-line-box {
    background-color: #fffbeb; /* Light Amber bg */
    border: 1px solid #fed7aa;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 15px;
}

/* --- CSS STYLES --- */

        /* 1. Base Styles for Buttons */
        .scroll-btn {
            position: fixed;
            right: 20px;
            width: 50px;
            height: 50px;
            background-color: #007bff; /* Blue color */
            color: white;
            border: none;
            border-radius: 50%; /* Makes them round */
            cursor: pointer;
            font-size: 24px;
            z-index: 1000; /* Ensures they sit on top of other content */
            box-shadow: 0 4px 6px rgba(0,0,0,0.3);
            transition: background-color 0.3s, transform 0.3s, opacity 0.3s;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .scroll-btn:hover {
            background-color: #0056b3; /* Darker blue on hover */
            transform: scale(1.1); /* Slight zoom effect */
        }

        /* 2. Specific Positioning */
        
        /* Bottom Button (Always visible or logic handled by JS) */
        #goBottomBtn {
            bottom: 40px;
        }

        /* Top Button ( sits above the bottom button) */
        #goTopBtn {
            bottom: 100px; /* 20px + 50px height + 10px gap */
            opacity: 0;   /* Hidden by default */
            visibility: hidden;
            pointer-events: none; /* Prevents clicking when hidden */
        }

        /* Class to show the top button */
        #goTopBtn.show {
            opacity: 1;
            visibility: visible;
            pointer-events: auto;
        }


.nav-link {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: var(--white); /* This controls the icon color */
    padding: 10px;
}

.svg-icon {
    width: 28px;   /* Adjusted for mobile balance */
    height: 28px;
    fill: currentColor; /* Forces the SVG to take the color from the .nav-link */
    display: inline-block;
    flex-shrink: 0;
}

/* Optional: Ensure the pulse effect doesn't break alignment */
.pulse {
    animation: pulse 2s infinite;
}