/* Fixes overflow issues globally */
*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --primary: #007bff;
    --secondary: #6c757d;
    --success: #28a745;
    --danger: #dc3545;
    --dark: #343a40;
    --light: #f8f9fa;
}

.btn-danger { background-color: #dc3545; color: white; animation: pulse 2s infinite; }
.btn-danger:hover { background-color: #bd2130; }

/* Pulse Animation for "Live Now" */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(220, 53, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f4f6f8;
    margin: 0;
    padding: 0;
    color: #333;
    line-height: 1.6;
}

/* --- Header & Nav --- */
header {
    background: var(--primary);
    color: white;
    padding: 1rem 0;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header h1 { margin: 0; font-size: 1.5rem; }

nav { margin-top: 10px; }
nav a {
    opacity:1.0;
    text-decoration: none;
    margin: 0 15px;
    font-weight: 500;
}
nav a:hover { text-decoration: underline; }

/* --- Layout --- */
.container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--success);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    text-align: center;
    transition: background 0.2s;
}
.btn:hover { background: #218838; text-decoration: none; color: white; }

/* --- Result Table --- */
.result-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.result-table th, .result-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.result-table th {
    background-color: var(--primary);
    color: white;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.result-table tr:last-child td { border-bottom: none; }

/* Highlight 1st Prize */
.prize-row.first-prize {
    background-color: #fff3cd;
    color: #856404;
    font-weight: bold;
    font-size: 1.1rem;
}

/* --- 5th Prize Grid (Mobile Friendly) --- */
.fifth-prize-box {
    margin-top: 30px;
    padding: 20px;
    background: #fdfdfe;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.fifth-prize-box h3 {
    margin-top: 0;
    color: var(--dark);
    border-bottom: 2px solid var(--primary);
    display: inline-block;
    padding-bottom: 5px;
}

.numbers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.numbers-grid span {
    background: var(--light);
    padding: 5px;
    text-align: center;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-family: monospace;
    font-size: 1rem;
    color: var(--dark);
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 20px;
    color: #6c757d;
    font-size: 0.9rem;
    margin-top: 40px;
    border-top: 1px solid #eee;
}

/* --- Mobile Tweaks --- */
@media (max-width: 600px) {
    .container { margin: 10px; padding: 15px; }
    .numbers-grid { grid-template-columns: repeat(5, 1fr); }
}