* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Local font fallback: place font files in public/fonts/ (see public/fonts/README.txt) */
@font-face {
    font-family: 'Annie Use Your Telescope';
    src: local('Annie Use Your Telescope'),
         url('/fonts/AnnieUseYourTelescope-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Brick house / vineyard palette */
    --bg-cream-1: #F6E9D7; /* warm cream */
    --bg-cream-2: #EDE0D5;
    --brick: #9b2f2f; /* brick red */
    --terracotta: #C05A3B;
    --vineyard: #2F5D3E; /* deep green */
    --muted-gold: #C9A23A;

    --control-bg: linear-gradient(180deg,var(--bg-cream-1),var(--bg-cream-2));
    --control-border-color: #e6d7cc;
    --control-border: 1px solid var(--control-border-color);
    --control-radius: 12px;
    --control-padding: 12px 14px;
    --control-shadow: 0 6px 18px rgba(44,28,20,0.04);
    --control-shadow-strong: 0 12px 30px rgba(44,28,20,0.08);
    --focus-ring: 0 8px 24px rgba(192,90,59,0.12), 0 0 0 3px rgba(192,90,59,0.06);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: radial-gradient(circle at 10% 10%, rgba(0,0,0,0.02), transparent 10%),
                radial-gradient(circle at 90% 90%, rgba(0,0,0,0.02), transparent 10%),
                linear-gradient(135deg, var(--bg-cream-1) 0%, var(--bg-cream-2) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 500px;
}

.form-wrapper {
    background: linear-gradient(180deg, rgba(255,250,245,0.98), rgba(250,245,240,0.98));
    border-radius: 18px;
    padding: 36px;
    box-shadow: 0 25px 60px rgba(44,28,20,0.12);
    animation: slideIn 0.45s cubic-bezier(.2,.9,.3,1);
    border: 1px solid rgba(155,47,47,0.06);
}

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

h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 28px;
    text-align: left;
    font-family: 'Annie Use Your Telescope', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: 0.6px;
}

.subtitle {
    color: #666;
    text-align: left;
    margin-bottom: 30px;
    font-size: 14px;
}

/* Brand Header */
.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 24px;
}
.logo {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: url('nb_512x512.png');
    background-size: 100px 100px;
    background-position: 50% 43%;
    background-repeat: no-repeat;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:28px;
}
.brand-info h1 { margin: 0; font-size:20px; font-family: 'Annie Use Your Telescope', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
.logo { font-family: 'Annie Use Your Telescope', sans-serif; }
.event-date { font-family: 'Annie Use Your Telescope', sans-serif; color: #8b87a0; font-size:13px; }

/* Footer */
.footer {
    margin-top: 16px;
    color: rgba(255,255,255,0.9);
    text-align: center;
    font-size: 13px;
    opacity: 0.95;
}

.form-group {
    margin-bottom: 12px;
}

.form-group > label {
    font-family: 'Annie Use Your Telescope', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 18px;
    font-weight: bold;
}

label {
    display: block;
    margin-bottom: 10px;
    color: #333;
    font-weight: 500;
    font-size: 15px;
}

/* Unified modern controls: text inputs, email, textarea, and inputs with .form-control */
input[type="text"],
input[type="email"],
textarea,
.form-control {
    width: 100%;
    padding: var(--control-padding);
    border: var(--control-border);
    border-radius: var(--control-radius);
    font-size: 14px;
    font-weight: 400;
    background: white;
    transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
    box-shadow: var(--control-shadow);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus,
.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: var(--focus-ring);
    transform: translateY(-2px);
}

input::placeholder,
textarea::placeholder {
    color: #a8a6b3;
    font-size: 14px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 400;
}

textarea {
    min-height: 100px;
}

/* Make single-line inputs visually match other controls */
.form-group .form-control,
input[type="text"],
input[type="email"] {
    height: 48px;
    line-height: 24px;
}
.form-group .form-control:hover,
input[type="text"]:hover,
input[type="email"]:hover {
    transform: translateY(-2px);
    box-shadow: var(--control-shadow-strong);
}

/* Meal Options Styling */
.meal-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-option {
    position: relative;
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-option label {
    display: block;
    padding: 14px 16px;
    border: 1px solid #ececf6;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.22s ease;
    margin-bottom: 0;
    background: linear-gradient(180deg, #fff, #fbfbff);
}

.radio-option input[type="radio"]:checked + label {
    border-color: var(--terracotta);
    background-color: rgba(192,90,59,0.06);
    transform: translateY(-2px);
}

.radio-option input[type="radio"]:focus + label {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.meal-name {
    font-family: 'Annie Use Your Telescope';
    display: block;
    font-weight: 600;
    color: var(--brick);
    margin-bottom: 5px;
    font-size: 18px;
}

.meal-name { letter-spacing: 0.2px; }
.meal-name::before { margin-right:8px; }

.meal-description {
    display: block;
    color: #666;
    font-size: 13px;
    font-weight: 400;
}

/* Toggle Switch Styling */
.toggle-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toggle-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 50px;
    height: 28px;
    background-color: #ddd;
    border-radius: 14px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
}

.toggle-checkbox::before {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: white;
    left: 2px;
    top: 2px;
    transition: left 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-checkbox:checked {
    background-color: var(--terracotta);
}

.toggle-checkbox:checked::before {
    left: 24px;
}

.toggle-checkbox:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.toggle-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 0;
}

.toggle-text {
    font-size: 14px;
    color: var(--brick);
    font-weight: 500;
}

/* toggle text handled by JS - no CSS pseudo-content required */

/* small interactions */
.radio-option label:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(44,28,20,0.08); }
.submit-button { letter-spacing: 0.3px; }

/* Error Messages */
.error {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    display: block;
    min-height: 16px;
}

/* Buttons */
.submit-button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--terracotta) 0%, var(--brick) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.submit-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(44,28,20,0.28);
}

.submit-button:active:not(:disabled) {
    transform: translateY(0);
}

.submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Success Message */
.success-message {
    text-align: center;
    animation: slideIn 0.4s ease-out;
}

.success-content {
    padding: 20px;
}

.success-content h2 {
    color: var(--vineyard);
    margin-bottom: 15px;
    font-size: 24px;
}

.success-content p {
    color: #666;
    margin-bottom: 20px;
    font-size: 15px;
}

.reset-button {
    padding: 12px 30px;
    background: linear-gradient(135deg, var(--terracotta) 0%, var(--brick) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

/* Loading Spinner */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 480px) {
    .form-wrapper {
        padding: 30px 20px;
    }

    h1 {
        font-size: 24px;
    }

    .meal-options {
        gap: 10px;
    }

    .radio-option label {
        padding: 12px;
    }

    .meal-name {
        font-size: 14px;
    }

    .meal-description {
        font-size: 12px;
    }
}
