:root {
    --background-color: #f0f2f5;
    --primary-color: #ffd700;
    --secondary-color: #4a90e2;
    --card-background: #ffffff;
    --text-color: #2c3e50;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --btn-text: #ffffff;
    --machine-color: #34495e;
    --nav-bg: #ffffff;
}

body.dark-mode {
    --background-color: #1a1a1a;
    --primary-color: #f1c40f;
    --secondary-color: #3498db;
    --card-background: #2c2c2c;
    --text-color: #ecf0f1;
    --shadow-color: rgba(0, 0, 0, 0.4);
    --machine-color: #3e4e5e;
    --nav-bg: #2c2c2c;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    transition: all 0.3s ease;
}

/* Header & Nav */
.main-header {
    background: var(--nav-bg);
    box-shadow: 0 2px 10px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--secondary-color);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
}

#theme-btn {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
}

.container {
    max-width: 800px;
    margin: 3rem auto;
    padding: 3rem;
    background: var(--card-background);
    border-radius: 30px;
    box-shadow: 0 10px 30px var(--shadow-color);
    text-align: center;
}

/* Content Article */
.content-article {
    text-align: left;
    margin-top: 4rem;
}

.article-text {
    color: var(--text-color);
    font-size: 1.05rem;
}

.subtitle {
    font-size: 1.2rem;
    color: #7f8c8d;
    margin-bottom: 2rem;
}

/* Legal Pages */
.legal-page {
    text-align: left;
}

.legal-content h3 {
    margin-top: 2rem;
}

/* Footer */
.main-footer {
    background: var(--nav-bg);
    padding: 3rem 0;
    margin-top: 5rem;
    text-align: center;
    border-top: 1px solid var(--shadow-color);
}

.footer-links {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.9rem;
}

/* Machine & Buttons (Simplified/Optimized) */
.machine-container { position: relative; width: 200px; margin: 0 auto 1.5rem; }
.glass-sphere { width: 150px; height: 150px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.2); position: relative; margin: 0 auto; overflow: hidden; background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.4), rgba(255,255,255,0.1) 60%); }
.machine-base { width: 170px; height: 35px; background: var(--machine-color); border-radius: 10px 10px 25px 25px; margin: -10px auto 0; position: relative; z-index: 1; }
.exit-chute { position: absolute; bottom: -12px; left: 50%; transform: translateX(-50%); width: 50px; height: 25px; background: #2c3e50; border-radius: 0 0 15px 15px; }

.results-grid { display: flex; flex-direction: column; gap: 1rem; margin: 1.5rem 0; }
.row-container { display: flex; justify-content: center; gap: 0.6rem; animation: slideIn 0.5s ease forwards; opacity: 0; }
@keyframes slideIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.lotto-number { width: 40px; height: 40px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-weight: bold; color: white; box-shadow: 0 3px 6px var(--shadow-color); }
.ball-1 { background-color: #f1c40f; } .ball-2 { background-color: #3498db; } .ball-3 { background-color: #e74c3c; } .ball-4 { background-color: #95a5a6; } .ball-5 { background-color: #2ecc71; }

.generate-btn { background: linear-gradient(145deg, var(--secondary-color), #2980b9); color: white; border: none; padding: 1rem 2.5rem; font-size: 1.2rem; font-weight: bold; border-radius: 50px; cursor: pointer; }
.spinning { animation: shake 0.5s infinite; }
@keyframes shake { 0% { transform: translate(1px, 1px) rotate(0deg); } 10% { transform: translate(-1px, -2px) rotate(-1deg); } 20% { transform: translate(-3px, 0px) rotate(1deg); } }

.ball-deco { position: absolute; width: 20px; height: 20px; border-radius: 50%; opacity: 0.5; }
.b1 { background: #f1c40f; top: 40%; left: 30%; } .b2 { background: #e74c3c; top: 60%; left: 50%; } .b3 { background: #3498db; top: 50%; left: 70%; } .b4 { background: #2ecc71; top: 70%; left: 20%; }

.separator { border: 0; height: 1px; background: linear-gradient(to right, transparent, var(--shadow-color), transparent); margin-bottom: 1.5rem; }
