:root {
    --color-sienna: #A0522D;
    --color-chocolate: #D2691E;
    --color-gold: #FFD700;
    --color-dark-orange: #FF8C00;
    --color-saddle-brown: #8B4513;

    --bg-light: linear-gradient(135deg, var(--color-dark-orange), var(--color-chocolate));
    --container-bg-light: rgba(255,255,255,0.2); /* Keep light for contrast */
    --text-light: #fff;
    --card-bg-light: var(--color-gold);
    --card-text-light: var(--color-saddle-brown);
    --button-bg-light: var(--color-dark-orange);
    --button-text-light: #fff;
    --control-btn-bg: rgba(255,255,255,0.2);

    /* Dark Mode Colors */
    --bg-dark: #2c2c2c; /* Darker background */
    --container-bg-dark: #3a3a3a; /* Darker container */
    --text-dark: #e0e0e0;
    --card-bg-dark: #5c4033; /* Muted sienna for dark card */
    --card-text-dark: var(--color-gold);
    --button-bg-dark: var(--color-chocolate);
    --button-text-dark: #fff;
    --control-btn-bg-dark: rgba(0,0,0,0.3);
}

body {
    margin: 0;
    font-family: 'Nanum Gothic', sans-serif; /* Applied Nanum Gothic */
    background: var(--bg-light);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* Changed to min-height */
    color: var(--text-light);
    transition: background 0.4s, color 0.4s;
    line-height: 1.6;
}
body.dark-mode {
    background: var(--bg-dark);
    color: var(--text-dark);
}

.container {
    background: var(--container-bg-light);
    padding: 30px 40px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    max-width: 90%; /* Responsive change */
    width: 320px; /* Base width for mobile */
    transition: background 0.4s, box-shadow 0.4s, transform 0.3s ease-in-out; /* Added transform for animation */
    position: relative;
    margin: 20px auto; /* Added margin for smaller screens and centering */
}
body.dark-mode .container {
    background: var(--container-bg-dark);
    box-shadow: 0 10px 30px rgba(0,0,0,0.7);
}

.top-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
}

.lang-switch {
    background: var(--control-btn-bg);
    border: none;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}
body.dark-mode .lang-switch {
    background: var(--control-btn-bg-dark);
}
.lang-switch:hover {
    transform: scale(1.1);
}

h1 {
    margin-top: 40px;
    margin-bottom: 10px;
    font-size: 32px; /* Increased base font size */
    font-family: 'Gaegu', cursive; /* Applied Gaegu font */
    letter-spacing: 1px;
}

.subtitle {
    margin-top: 0;
    margin-bottom: 30px;
    font-size: 16px; /* Increased base font size */
    opacity: 0.9;
}

.menu-card {
    min-height: 100px; /* Increased min-height */
    width: 100%;
    border-radius: 12px;
    background: var(--card-bg-light);
    color: var(--card-text-light);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 38px; /* Increased base font size */
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.1);
    transition: background 0.4s, color 0.4s, transform 0.3s ease-in-out; /* Added transform for animation */
    margin: 30px 0;
    padding: 20px;
    box-sizing: border-box;
    word-break: keep-all;
}
body.dark-mode .menu-card {
    background: var(--card-bg-dark);
    color: var(--card-text-dark);
}
.menu-card.animate {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255,255,255,0.5); /* Added glow on animation */
}


button.main-button {
    background: var(--button-bg-light);
    border: none;
    border-radius: 30px;
    padding: 15px 30px;
    color: var(--button-text-light);
    font-size: 20px; /* Increased base font size */
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease; /* Enhanced transition */
    width: 100%;
    letter-spacing: 0.5px;
}

button.main-button:hover {
    transform: translateY(-3px) scale(1.02); /* More engaging hover effect */
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

button.main-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

body.dark-mode button.main-button {
    background: var(--button-bg-dark);
    color: var(--button-text-dark);
}

footer {
    margin-top: 25px;
    font-size: 13px; /* Increased base font size */
    opacity: 0.8;
}

/* Toggle Switch CSS - Kept mostly same, adjusted slider color for dark mode */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
}
.theme-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}
.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}
.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}
input:checked + .slider {
    background-color: var(--color-chocolate); /* Dark mode slider background */
}
input:focus + .slider {
    box-shadow: 0 0 1px var(--color-chocolate);
}
input:checked + .slider:before {
    transform: translateX(26px);
}
.slider.round {
    border-radius: 34px;
}
.slider.round:before {
    border-radius: 50%;
}


/* Responsive Design - Media Queries */

/* Tablets and larger (>= 768px) */
@media (min-width: 768px) {
    .container {
        width: 450px;
        padding: 40px 50px;
    }

    h1 {
        font-size: 40px;
    }

    .subtitle {
        font-size: 18px;
    }

    .menu-card {
        min-height: 120px;
        font-size: 48px;
    }

    button.main-button {
        font-size: 22px;
    }

    footer {
        font-size: 14px;
    }
}

/* Desktops and larger (>= 1024px) */
@media (min-width: 1024px) {
    .container {
        width: 550px;
        padding: 50px 60px;
    }

    h1 {
        font-size: 48px;
    }

    .subtitle {
        font-size: 20px;
    }

    .menu-card {
        min-height: 150px;
        font-size: 56px;
    }

    button.main-button {
        font-size: 24px;
    }

    footer {
        font-size: 15px;
    }
}