:root {
    --primary-color: #4CAF50;
    --secondary-color: #FFC107;
    --background-color: #f0f0f0;
    --text-color: #333;
    --white: #fff;
    --machine-bg: #fff;
    --h1-color: #fff;
    --gradient-start: #6d327c;
    --gradient-end: #36C486;
    --input-bg: #fff;
    --input-border: #ddd;
}

body.dark-theme {
    --background-color: #121212;
    --text-color: #e0e0e0;
    --white: #1e1e1e;
    --machine-bg: #2d2d2d;
    --h1-color: #FFC107;
    --gradient-start: #000000;
    --gradient-end: #1a1a1a;
    --input-bg: #3d3d3d;
    --input-border: #444;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 40px 0;
    background-image: linear-gradient(to right top, var(--gradient-start), #485DA6, #00a1ba, #00BF98, var(--gradient-end));
    background-attachment: fixed;
    transition: all 0.3s ease;
}

.container {
    width: 100%;
    max-width: 600px;
    padding: 20px;
    text-align: center;
    z-index: 1;
}

h1 {
    color: var(--h1-color);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 2rem;
    transition: color 0.3s ease;
}

.lotto-machine {
    background-color: var(--machine-bg);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    transition: background-color 0.3s ease;
    margin-bottom: 2rem;
}

.number-display {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.game-row {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    padding: 10px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 50px;
}

body.dark-theme .game-row {
    background: rgba(255, 255, 255, 0.05);
}

.number {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

#generate-btn {
    background-color: var(--secondary-color);
    color: #333;
    border: none;
    padding: 1.2rem 2.5rem;
    font-size: 1.3rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
}

#generate-btn:hover {
    background-color: #ffca2c;
    transform: translateY(-2px);
}

.contact-section {
    background-color: var(--machine-bg);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    text-align: left;
    transition: background-color 0.3s ease;
}

.contact-section h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid var(--input-border);
    background-color: var(--input-bg);
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group textarea {
    height: 100px;
    resize: none;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.submit-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background-color: #45a049;
    transform: translateY(-1px);
}

.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10;
}

#theme-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    font-weight: 600;
}

body.dark-theme #theme-btn {
    background: rgba(0, 0, 0, 0.3);
    color: #FFC107;
    border-color: #FFC107;
}
