:root {
    --gold-primary: #D4AF37;
    --gold-secondary: #C5A028;
    --navy-dark: #020617;
    --navy-light: #0A192F;
    --ivory: #FFFFF0;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(212, 175, 55, 0.2);
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Dynamic Theme Variables */
    --bg-gradient-start: var(--navy-light);
    --bg-gradient-end: var(--navy-dark);
    --text-primary: var(--ivory);
    --text-subtitle: rgba(255, 255, 240, 0.6);
    --container-bg: var(--glass-bg);
    --ball-bg: var(--navy-dark);
    --row-bg: rgba(255, 255, 255, 0.02);
}

body.light-mode {
    --bg-gradient-start: #f8f9fa;
    --bg-gradient-end: #e9ecef;
    --text-primary: #1a1a1a;
    --text-subtitle: rgba(26, 26, 26, 0.6);
    --container-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(212, 175, 55, 0.4);
    --ball-bg: #ffffff;
    --row-bg: rgba(0, 0, 0, 0.03);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body {
    background: radial-gradient(circle at center, var(--bg-gradient-start), var(--bg-gradient-end));
    color: var(--text-primary);
    font-family: 'Montserrat', sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://www.transparenttextures.com/patterns/carbon-fibre.png');
    opacity: 0.1;
    pointer-events: none;
    z-index: 0;
}

body.light-mode .overlay {
    opacity: 0.03;
}

.luxe-container {
    position: relative;
    z-index: 1;
    width: 95%;
    max-width: 600px;
    padding: 3rem 2rem;
    text-align: center;
    background: var(--container-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideIn 1s var(--transition-smooth);
}

body.light-mode .luxe-container {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
}

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

.luxe-header {
    margin-bottom: 3rem;
    position: relative;
}

.theme-toggle {
    position: absolute;
    top: -1.5rem;
    right: 0;
}

#theme-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

#theme-btn:hover {
    border-color: var(--gold-primary);
    transform: rotate(15deg);
}

.brand {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    letter-spacing: 0.2rem;
    background: linear-gradient(to right, #D4AF37, #FBF5B7, #D4AF37);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 20px rgba(212, 175, 55, 0.2);
    margin-bottom: 0.5rem;
}

.subtitle {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.4rem;
    color: var(--text-subtitle);
}

.latest-draw {
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    background: rgba(212, 175, 55, 0.03);
    border-radius: 20px;
    border: 1px dashed var(--glass-border);
}

.section-title {
    font-size: 0.7rem;
    letter-spacing: 0.3rem;
    color: var(--gold-primary);
    margin-bottom: 1rem;
    opacity: 0.8;
}

.balls-container {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
}

.controls {
    margin-bottom: 3.5rem;
}

.luxe-btn {
    position: relative;
    background: transparent;
    border: 1px solid var(--gold-primary);
    padding: 1rem 2.5rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.2rem;
    color: var(--gold-primary);
    border-radius: 100px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s var(--transition-smooth);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.1);
}

.luxe-btn:hover {
    background: var(--gold-primary);
    color: var(--navy-dark);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.4);
    transform: translateY(-2px);
}

.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: skewX(-25deg);
    transition: 0.5s;
}

.luxe-btn:hover .btn-shine {
    left: 150%;
}

.results-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.lotto-row {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    padding: 1rem;
    border-radius: 20px;
    background: var(--row-bg);
    border: 1px solid rgba(212, 175, 55, 0.05);
}

.luxe-ball {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gold-primary);
    background: var(--ball-bg);
    border: 1.5px solid var(--gold-primary);
    box-shadow: inset 0 0 10px rgba(212, 175, 55, 0.2);
    opacity: 0;
    transform: scale(0.5);
    animation: drawBall 0.5s var(--transition-smooth) forwards;
}

@keyframes drawBall {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 500px) {
    .brand { font-size: 2.2rem; }
    .subtitle { font-size: 0.7rem; letter-spacing: 0.2rem; }
    .luxe-ball { width: 38px; height: 38px; font-size: 0.9rem; }
    .lotto-row { gap: 0.5rem; }
}

