:root {
    --primary-color: #1f6feb;
    --primary-hover: #1457b8;
    --background-color: #eef3fb;
    --surface-color: rgba(255, 255, 255, 0.88);
    --surface-strong: rgba(255, 255, 255, 0.94);
    --text-color: #152033;
    --muted-text: #52607a;
    --shadow-color: rgba(31, 53, 91, 0.18);
    --border-color: rgba(84, 118, 168, 0.18);
    --button-text: #ffffff;
    --input-background: rgba(244, 248, 255, 0.9);
    --success-color: #127a53;
}

body.dark-mode {
    --primary-color: #7cc4ff;
    --primary-hover: #58a9ea;
    --background-color: #09111f;
    --surface-color: rgba(12, 24, 42, 0.88);
    --surface-strong: rgba(10, 20, 36, 0.94);
    --text-color: #edf4ff;
    --muted-text: #aac0de;
    --shadow-color: rgba(0, 0, 0, 0.42);
    --border-color: rgba(124, 196, 255, 0.16);
    --button-text: #06111f;
    --input-background: rgba(8, 17, 30, 0.9);
    --success-color: #8ce7bf;
}

* {
    box-sizing: border-box;
}

body {
    font-family: "Helvetica Neue", sans-serif;
    background:
        radial-gradient(circle at top, rgba(31, 111, 235, 0.18), transparent 28%),
        linear-gradient(180deg, var(--background-color) 0%, #dfe8f7 100%);
    color: var(--text-color);
    min-height: 100vh;
    margin: 0;
    padding: 24px;
    transition: background 0.3s ease, color 0.3s ease;
}

body.dark-mode {
    background:
        radial-gradient(circle at top, rgba(124, 196, 255, 0.18), transparent 24%),
        linear-gradient(180deg, #09111f 0%, #03070f 100%);
}

.container {
    width: min(100%, 860px);
    margin: 0 auto;
    background-color: var(--surface-color);
    padding: 32px;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    box-shadow: 0 24px 60px var(--shadow-color);
    backdrop-filter: blur(18px);
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.eyebrow,
.section-label {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted-text);
}

.hero-section {
    text-align: center;
    padding-bottom: 36px;
}

h1,
h2 {
    margin: 0;
    color: var(--text-color);
}

h1 {
    font-size: clamp(2rem, 5vw, 2.8rem);
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
}

.subtitle,
.section-description {
    color: var(--muted-text);
    line-height: 1.6;
}

.subtitle {
    margin: 16px 0 28px;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.3s ease, color 0.3s ease;
}

button:hover {
    transform: translateY(-1px);
}

#theme-toggle {
    padding: 10px 16px;
    background-color: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

#generate-btn,
.submit-button {
    background-color: var(--primary-color);
    color: var(--button-text);
    padding: 15px 30px;
    font-size: 18px;
    font-weight: 700;
}

#generate-btn:hover,
.submit-button:hover {
    background-color: var(--primary-hover);
}

#numbers-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 36px;
    min-height: 60px;
}

lotto-ball {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    animation: bounce-in 0.5s ease;
}

.form-section {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 28px;
    align-items: start;
    padding: 28px;
    border-radius: 22px;
    background: var(--surface-strong);
    border: 1px solid var(--border-color);
}

.section-copy {
    padding-top: 6px;
}

.section-description {
    margin: 14px 0 0;
}

.contact-form {
    display: grid;
    gap: 16px;
}

.field {
    display: grid;
    gap: 8px;
    text-align: left;
    font-weight: 600;
}

.field span {
    font-size: 14px;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 14px 16px;
    color: var(--text-color);
    background-color: var(--input-background);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(31, 111, 235, 0.12);
}

.field textarea {
    resize: vertical;
    min-height: 140px;
}

.submit-button {
    width: 100%;
}

.form-status {
    min-height: 24px;
    margin: 0;
    font-size: 14px;
    color: var(--muted-text);
}

.form-status.is-success {
    color: var(--success-color);
}

.form-status.is-error {
    color: #d0021b;
}

@keyframes bounce-in {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@media (max-width: 720px) {
    .container {
        padding: 24px;
    }

    .toolbar,
    .form-section {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .toolbar {
        display: flex;
    }

    #theme-toggle,
    #generate-btn,
    .submit-button {
        width: 100%;
    }
}
