:root {
    --bg-dark: #0f172a;
    --bg-light: #f1f5f9;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-bg-light: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-border-light: rgba(226, 232, 240, 1);
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --text-main: #ffffff;
    --text-main-light: #0f172a;
    --text-muted: #94a3b8;
    --text-muted-light: #475569;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-dark);
    background-image:
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(168, 85, 247, 0.15) 0%, transparent 40%);
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    transition: background-color 0.4s, color 0.4s;
}

.glass-container {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    width: 90%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.8s ease-out;
    transition: background 0.4s, border-color 0.4s, box-shadow 0.4s;
    display: flex; /* Make glass container a flex container */
    flex-direction: column; /* Stack children vertically */
    gap: 2rem; /* Spacing between sections */
}

header {
    position: relative;
    margin-bottom: 0; /* Remove margin-bottom as gap handles spacing */
}

header h1 {
    font-size: 2.5rem;
    margin: 0;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

header p {
    color: var(--text-muted);
    margin-top: 0.5rem;
    font-weight: 300;
    transition: color 0.4s;
}

.results-area {
    margin-top: 0; /* Remove margin-top as gap handles spacing */
    min-height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.menu-display {
    font-size: 2.5rem;
    font-weight: 600;
    padding: 1rem 2rem;
    border-radius: 12px;
    background: var(--primary-gradient);
    color: white;
    animation: slideUp 0.5s ease-out, pulse 1.5s infinite ease-in-out 0.5s;
}

.menu-image {
    width: 100%;
    height: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    animation: fadeIn 0.5s ease-out;
}

.menu-name-overlay {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 0.75rem;
    border-radius: 12px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    animation: slideUp 0.5s ease-out;
}

.glow-button {
    background: var(--primary-gradient);
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3);
    width: 100%;
}

.glow-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(99, 102, 241, 0.4);
    filter: brightness(1.1);
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

body.light-mode .loader {
    border-color: rgba(0,0,0,0.2);
    border-top-color: #333;
}

/* Light Mode */
body.light-mode {
    background-color: var(--bg-light);
    background-image: none;
    color: var(--text-main-light);
}

body.light-mode .glass-container {
    background: var(--glass-bg-light);
    border-color: var(--glass-border-light);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
}

body.light-mode header p {
    color: var(--text-muted-light);
}

/* Language Switcher */
.lang-switcher {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    background: rgba(0,0,0,0.2);
    border-radius: 20px;
    padding: 5px;
    display: flex;
}

.lang-btn {
    background: none;
    border: none;
    color: white;
    padding: 5px 15px;
    border-radius: 15px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.lang-btn.active {
    background: var(--primary-gradient);
}

body.light-mode .lang-switcher {
    background: rgba(0,0,0,0.1);
}

body.light-mode .lang-btn {
    color: var(--text-main-light);
}

body.light-mode .lang-btn.active {
    color: white;
}

/* Theme Switch */
.theme-switch {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    display: inline-block;
    width: 60px;
    height: 34px;
}

.theme-switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #2c3e50;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "🌙";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background: linear-gradient(135deg, #a855f7, #6366f1);
}

input:checked + .slider:before {
    content: "☀️";
    transform: translateX(26px);
}

/* Form Styles */
.contact-form-section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.contact-form .input-group {
    margin-bottom: 1rem;
    text-align: left;
}

.contact-form label {
    display: block;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    padding-left: 0.5rem;
    transition: color 0.4s;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    font-family: 'Outfit', sans-serif;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.contact-form textarea {
    resize: vertical; /* Allow vertical resizing */
    min-height: 100px;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #a855f7;
    background: rgba(255, 255, 255, 0.1);
}

body.light-mode .contact-form label {
    color: var(--text-muted-light);
}

body.light-mode .contact-form input[type="text"],
body.light-mode .contact-form input[type="email"],
body.light-mode .contact-form textarea {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-main-light);
}

body.light-mode .contact-form input:focus,
body.light-mode .contact-form textarea:focus {
    border-color: #6366f1;
    background: rgba(0, 0, 0, 0.02);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes spin {
    to { transform: rotate(360deg); }
}
