:root {
    --primary-color: #66BB6A;
    --primary-dark: #43A047;
    --secondary-color: #2196F3;
    --accent-color: #FF7043;
    --bg-color: #FFF9E6;
    --card-bg: #ffffff;
    --text-color: #212121;
    --text-warm: #5D4037;
    --border-color: #BDBDBD;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    font-size: 20px;
    line-height: 1.5;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    min-height: 100vh;
    background-color: var(--card-bg);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.1);
}

/* Screens */
.screen {
    display: block;
    padding: 30px;
    animation: fadeIn 0.5s;
}

.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ========== INTRO SCREEN - WARM & FRIENDLY ========== */
#intro-screen {
    background: linear-gradient(180deg, #FFF9E6 0%, #FFE8CC 100%);
    text-align: center;
    padding: 30px 25px 40px;
}

/* Illustration at top */
.intro-illustration {
    width: 100%;
    padding: 20px 0 10px;
    margin-bottom: 10px;
}

.food-characters {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.food-characters span {
    font-size: 4rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.12));
    animation: float 3s ease-in-out infinite;
}

.char-veg {
    animation-delay: 0s;
}

.char-onion {
    animation-delay: 0.4s;
}

.char-garlic {
    animation-delay: 0.8s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* Title area */
.intro-title-area {
    margin-bottom: 30px;
}

.main-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--accent-color);
    margin: 0 0 12px 0;
    line-height: 1.3;
    text-shadow: 2px 2px 4px rgba(255, 112, 67, 0.15);
}

.subtitle {
    font-size: 1.3rem;
    color: #8D6E63;
    margin: 0;
    font-weight: 500;
}

/* Instruction cards */
.instruction-cards {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
    width: 100%;
}

.instruction-card {
    background: white;
    border-radius: 22px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.instruction-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.card-icon {
    font-size: 3rem;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.1));
}

.card-text {
    text-align: left;
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--text-warm);
    font-weight: 500;
}

.step-number {
    color: var(--accent-color);
    font-weight: 700;
    font-size: 1.4rem;
}

/* Difficulty selector box */
.difficulty-selector-box {
    background: white;
    border-radius: 22px;
    padding: 20px;
    margin-bottom: 22px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.difficulty-label {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-warm);
    margin-bottom: 14px;
    text-align: left;
}

.difficulty-dropdown {
    width: 100%;
    height: 65px;
    font-size: 1.3rem;
    padding: 0 20px;
    border-radius: 16px;
    border: 3px solid #81C784;
    background: #F1F8E9;
    color: #2E7D32;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.difficulty-dropdown:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 5px rgba(102, 187, 106, 0.2);
}

/* Start button */
.btn-start-game {
    width: 100%;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 40px;
    font-size: 1.7rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(67, 160, 71, 0.35);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-bottom: 18px;
}

.btn-start-game:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(67, 160, 71, 0.4);
}

.btn-start-game:active {
    transform: scale(0.97);
    box-shadow: 0 4px 15px rgba(67, 160, 71, 0.3);
}

/* History link */
.link-history {
    background: none;
    border: none;
    color: #8D6E63;
    font-size: 1.15rem;
    text-decoration: underline;
    cursor: pointer;
    padding: 12px;
    font-weight: 500;
    transition: color 0.2s;
}

/* ========== GAME SCREEN ========== */
#game-screen {
    background: var(--bg-color);
}

.large-btn {
    width: 100%;
    max-width: 400px;
    height: 70px;
    font-size: 26px;
}

.secondary {
    background-color: var(--secondary-color);
    color: white;
}

/* ========== RESULT SCREEN - WARM & CELEBRATORY ========== */
#result-screen {
    background: linear-gradient(180deg, #FFF9E6 0%, #FFF4CC 50%, #FFEBCC 100%);
    padding: 30px 25px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

/* Top sparkles */
.celebration-sparkles {
    display: flex;
    justify-content: space-around;
    width: 100%;
    margin-bottom: 20px;
    animation: sparkleFloat 2s ease-in-out infinite;
}

.sparkle {
    font-size: 2rem;
    animation: twinkle 1.5s ease-in-out infinite;
}

.sparkle:nth-child(2) {
    animation-delay: 0.3s;
}

.sparkle:nth-child(3) {
    animation-delay: 0.6s;
}

.sparkle:nth-child(4) {
    animation-delay: 0.9s;
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.4;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

@keyframes sparkleFloat {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Main congratulation card */
.congratulation-card {
    background: linear-gradient(135deg, #E8F5E9 0%, #F1F8E9 100%);
    border-radius: 30px;
    padding: 20px 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    text-align: center;
    width: 100%;
    max-width: 500px;
    animation: cardPopIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

@keyframes cardPopIn {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(30px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.congrats-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: iconBounce 1s ease-in-out infinite;
}

@keyframes iconBounce {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    25% {
        transform: translateY(-15px) rotate(-10deg);
    }

    75% {
        transform: translateY(-15px) rotate(10deg);
    }
}

.result-title-text {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--primary-color);
    margin: 0 0 15px 0;
    line-height: 1.3;
    text-shadow: 2px 2px 4px rgba(102, 187, 106, 0.2);
}

.result-subtitle {
    font-size: 1.4rem;
    color: #558B2F;
    margin: 0;
    font-weight: 500;
    line-height: 1.5;
}

.mini-celebration {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    font-size: 2rem;
}

.mini-celebration span {
    animation: celebrationPop 0.6s ease-out forwards;
}

.mini-celebration span:nth-child(1) {
    animation-delay: 0.2s;
}

.mini-celebration span:nth-child(2) {
    animation-delay: 0.4s;
}

.mini-celebration span:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes celebrationPop {
    0% {
        opacity: 0;
        transform: scale(0);
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Middle decorative area */
.middle-decoration {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 10px 0;
    opacity: 0.4;
}

.deco-item {
    font-size: 2.5rem;
    animation: floatSlow 3s ease-in-out infinite;
}

.deco-item:nth-child(2) {
    animation-delay: 0.5s;
}

.deco-item:nth-child(3) {
    animation-delay: 1s;
}

@keyframes floatSlow {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-15px) rotate(5deg);
    }
}

/* Wrong answer section */
.correct-answer-section {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 20px;
    padding: 20px;
    margin: 20px 0;
    width: 100%;
    max-width: 500px;
}

.correct-answer-section h3 {
    color: #E65100;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

/* Next button */
.btn-next-round {
    width: 100%;
    max-width: 500px;
    height: 60px;
    background: linear-gradient(135deg, #42A5F5 0%, #1E88E5 100%);
    color: white;
    border: none;
    border-radius: 40px;
    font-size: 1.7rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(30, 136, 229, 0.35);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin: 10px 0;
}

.btn-next-round:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(30, 136, 229, 0.4);
}

.btn-next-round:active {
    transform: scale(0.97);
}

/* Bottom waving characters */
.bottom-characters {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: auto;
    padding-bottom: 20px;
}

.char {
    font-size: 3rem;
    display: inline-block;
}

.wave-1 {
    animation: wave 1.5s ease-in-out infinite;
}

.wave-2 {
    animation: wave 1.5s ease-in-out infinite;
    animation-delay: 0.3s;
}

.wave-3 {
    animation: wave 1.5s ease-in-out infinite;
    animation-delay: 0.6s;
}

@keyframes wave {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(15deg);
    }

    75% {
        transform: rotate(-15deg);
    }
}

/* Legacy title and message (kept for compatibility) */
#result-title {
    /* Styles now applied via result-title-text class */
}

#result-message {
    /* Styles now applied via result-subtitle class */
}

#result-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

#result-message {
    font-size: 1.3rem;
    margin-bottom: 20px;
}

.small-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
}

.small-grid .ingredient-card {
    padding: 15px 10px;
    border: 1px solid #ddd;
    cursor: default;
    min-height: 60px;
}

.small-grid img {
    display: none;
}

.small-grid span {
    font-size: 18px;
}

/* ========== HISTORY SCREEN ========== */
#history-screen {
    background: white;
}

.history-header {
    background: var(--primary-color);
    color: white;
    padding: 20px;
    margin: -30px -30px 20px -30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-header h2 {
    margin: 0;
    font-size: 1.8rem;
}

.history-list {
    text-align: left;
    max-height: 500px;
    overflow-y: auto;
}

.history-item {
    background: #f9f9f9;
    border: 1px solid #ddd;
    margin-bottom: 10px;
    padding: 15px;
    border-radius: 10px;
    font-size: 18px;
}

.status-correct {
    color: var(--primary-color);
    font-weight: bold;
}

.status-wrong {
    color: #d32f2f;
    font-weight: bold;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .main-title {
        font-size: 2.3rem;
    }

    .food-characters span {
        font-size: 3.2rem;
    }

    animation-delay: 1s;
}

@keyframes floatSlow {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-15px) rotate(5deg);
    }
}

/* Wrong answer section */
.correct-answer-section {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 20px;
    padding: 20px;
    margin: 20px 0;
    width: 100%;
    max-width: 500px;
}

.correct-answer-section h3 {
    color: #E65100;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

/* Next button */
.btn-next-round {
    width: 100%;
    max-width: 500px;
    height: 80px;
    background: linear-gradient(135deg, #42A5F5 0%, #1E88E5 100%);
    color: white;
    border: none;
    border-radius: 40px;
    font-size: 1.7rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(30, 136, 229, 0.35);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin: 20px 0;
}

.btn-next-round:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(30, 136, 229, 0.4);
}

.btn-next-round:active {
    transform: scale(0.97);
}

/* Bottom waving characters */
.bottom-characters {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: auto;
    padding-bottom: 20px;
}

.char {
    font-size: 3rem;
    display: inline-block;
}

.wave-1 {
    animation: wave 1.5s ease-in-out infinite;
}

.wave-2 {
    animation: wave 1.5s ease-in-out infinite;
    animation-delay: 0.3s;
}

.wave-3 {
    animation: wave 1.5s ease-in-out infinite;
    animation-delay: 0.6s;
}

@keyframes wave {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(15deg);
    }

    75% {
        transform: rotate(-15deg);
    }
}

/* Legacy title and message (kept for compatibility) */
#result-title {
    /* Styles now applied via result-title-text class */
}

#result-message {
    /* Styles now applied via result-subtitle class */
}

#result-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

#result-message {
    font-size: 1.3rem;
    margin-bottom: 20px;
}

.small-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
}

.small-grid .ingredient-card {
    padding: 15px 10px;
    border: 1px solid #ddd;
    cursor: default;
    min-height: 60px;
}

.small-grid img {
    display: none;
}

.small-grid span {
    font-size: 18px;
}

/* ========== HISTORY SCREEN ========== */
#history-screen {
    background: white;
}

.history-header {
    background: var(--primary-color);
    color: white;
    padding: 20px;
    margin: -30px -30px 20px -30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-header h2 {
    margin: 0;
    font-size: 1.8rem;
}

.history-list {
    text-align: left;
    max-height: 500px;
    overflow-y: auto;
}

.history-item {
    background: #f9f9f9;
    border: 1px solid #ddd;
    margin-bottom: 10px;
    padding: 15px;
    border-radius: 10px;
    font-size: 18px;
}

.status-correct {
    color: var(--primary-color);
    font-weight: bold;
}

.status-wrong {
    color: #d32f2f;
    font-weight: bold;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .main-title {
        font-size: 2.3rem;
    }

    .food-characters span {
        font-size: 3.2rem;
    }

    .ingredient-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .large-btn {
        font-size: 22px;
        padding: 15px;
    }
}

/* ========== QUIZ AREA - WARM & FRIENDLY (RESTORED) ========== */
#quiz-area {
    text-align: center;
    padding: 20px 0;
    position: relative;
    min-height: 600px;
}

/* Quiz Header */
.quiz-header {
    margin-bottom: 30px;
    position: relative;
    z-index: 2;
}

.quiz-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 10px;
    animation: bounce 2s infinite;
}

.question-text {
    font-size: 2.5rem;
    color: #5D4037;
    margin: 0;
    font-weight: 800;
}

/* Background Decoration */
.quiz-decoration-bg {
    position: absolute;
    top: 100px;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.deco-bg-item {
    position: absolute;
    font-size: 6rem;
    opacity: 0.1;
    animation: floatSlow 4s ease-in-out infinite;
}

.item-1 {
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.item-2 {
    top: 20%;
    right: 5%;
    animation-delay: 1s;
}

/* Ingredient Grid */
.ingredient-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    margin: 0 auto 40px;
    max-width: 600px;
    position: relative;
    z-index: 2;
}

.ingredient-card {
    background: #FAFAFA;
    border: 3px solid #E0E0E0;
    border-radius: 25px;
    padding: 20px 10px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 140px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.ingredient-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    border-color: #FFCC80;
}

.ingredient-card:active {
    transform: scale(0.95);
}

.ingredient-card.selected {
    background: #E8F5E9;
    border-color: #66BB6A;
    box-shadow: 0 0 0 4px rgba(102, 187, 106, 0.2);
    animation: selectPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ingredient-card span {
    font-size: 1.6rem;
    font-weight: 700;
    color: #4E342E;
    word-break: keep-all;
}

@keyframes selectPop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* Bottom Action Area */
.quiz-bottom-area {
    position: relative;
    z-index: 2;
    padding-bottom: 60px;
}

.btn-check-answer {
    background: linear-gradient(135deg, #66BB6A 0%, #43A047 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 50px;
    font-size: 1.8rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-check-answer:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(76, 175, 80, 0.4);
}

.btn-check-answer:active {
    transform: scale(0.95);
}

/* Bottom Decorations */
.quiz-bottom-deco {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.hill-shape {
    position: absolute;
    bottom: -30px;
    left: -10%;
    width: 120%;
    height: 80px;
    background: #F1F8E9;
    border-radius: 50% 50% 0 0;
    opacity: 0.6;
}

.waving-chars {
    position: absolute;
    bottom: 10px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 40px;
}

.mini-char {
    font-size: 2.5rem;
    animation: wave 2s ease-in-out infinite;
}

.mini-char:nth-child(2) {
    animation-delay: 0.5s;
}

@keyframes wave {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-10deg);
    }

    75% {
        transform: rotate(10deg);
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes floatSlow {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* ========== FOOD DISPLAY AREA - REDESIGN (MATCHING REFERENCE) ========== */
#food-display-area {
    background: linear-gradient(180deg, #FFF9E6 0%, #FFF4CC 100%);
    /* Pale cream/yellow */
    padding: 20px;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Title Section */
.food-title-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

#food-name-display {
    font-size: 3.5rem;
    font-weight: 900;
    color: #FF7043;
    /* Warm Orange */
    margin: 0;
    text-shadow: 2px 2px 0px rgba(255, 255, 255, 0.5);
    line-height: 1.2;
}

.title-deco-icon {
    font-size: 3rem;
    transform: rotate(15deg);
    display: inline-block;
}

/* Food Card Container (The Big Peach Card) */
.food-card-container {
    width: 100%;
    max-width: 450px;
    height: 350px;
    background: linear-gradient(135deg, #FFCCBC 0%, #FFAB91 100%);
    /* Soft Peach/Orange Gradient */
    border-radius: 40px;
    box-shadow: 0 15px 35px rgba(255, 112, 67, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 30px;
    z-index: 2;
}

.card-sparkles {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.sparkle-s {
    position: absolute;
    color: #FFEB3B;
    font-size: 2rem;
    animation: twinkle 1.5s infinite;
}

.sparkle-s:nth-child(1) {
    top: 15%;
    left: 15%;
    animation-delay: 0s;
}

.sparkle-s:nth-child(2) {
    top: 20%;
    right: 15%;
    animation-delay: 0.5s;
}

.sparkle-s:nth-child(3) {
    bottom: 30%;
    left: 10%;
    animation-delay: 1s;
}

.food-image-wrapper {
    width: 220px;
    height: 220px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.5);
}

#food-image {
    width: 180px;
    height: 180px;
    object-fit: contain;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.1));
}

/* Countdown Section */
.countdown-section {
    margin-top: 10px;
}

.timer-text {
    font-size: 1.8rem;
    color: #BF360C;
    /* Deep warm red/brown */
    font-weight: 800;
    margin: 0;
    background: rgba(255, 255, 255, 0.4);
    padding: 5px 20px;
    border-radius: 20px;
}

/* Bottom Landscape Decoration */
.food-bottom-landscape {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 180px;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.landscape-hills {
    position: absolute;
    bottom: -20px;
    left: -10%;
    width: 120%;
    height: 100px;
    background: #FFF176;
    /* Soft Yellow Hill */
    border-radius: 50% 50% 0 0;
    opacity: 0.6;
}

.landscape-hills::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    width: 120%;
    height: 120px;
    background: #AED581;
    /* Soft Green Hill */
    border-radius: 50% 50% 0 0;
    z-index: -1;
}

.landscape-items {
    position: absolute;
    bottom: 10px;
    width: 100%;
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    padding: 0 20px;
}

.land-item {
    font-size: 3.5rem;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.1));
    animation: bounce 3s infinite;
}

.land-item:nth-child(2) {
    animation-delay: 0.2s;
}

.land-item:nth-child(3) {
    animation-delay: 0.4s;
}

.land-item:nth-child(4) {
    animation-delay: 0.6s;
}


/* Hide broken image icon and alt text */
img {
    text-indent: -10000px;
}

img[src=''],
img:not([src]) {
    opacity: 0;
}


/* ========== MOBILE RESPONSIVENESS (ENHANCED) ========== */
@media (max-width: 600px) {

    /* Container & Layout */
    .container {
        padding: 10px;
        max-width: 100%;
    }

    /* Intro Screen */
    .intro-illustration {
        height: 180px;
    }

    .food-characters span {
        font-size: 3rem;
    }

    .main-title {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1.1rem;
    }

    .instruction-cards {
        flex-direction: column;
        gap: 10px;
    }

    .instruction-card {
        width: 100%;
        padding: 15px;
    }

    /* Food Display Screen */
    #food-display-area {
        min-height: 500px;
        padding: 15px;
    }

    #food-name-display {
        font-size: 2.5rem;
    }

    .title-deco-icon {
        font-size: 2rem;
    }

    .food-card-container {
        width: 100%;
        height: 280px;
        /* Smaller height */
    }

    .food-image-wrapper {
        width: 160px;
        height: 160px;
    }

    #food-image {
        width: 130px;
        height: 130px;
    }

    .timer-text {
        font-size: 1.4rem;
    }

    .land-item {
        font-size: 2.5rem;
    }

    /* Quiz Screen */
    .question-text {
        font-size: 2rem;
    }

    .ingredient-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 columns for mobile */
        gap: 10px;
    }

    .ingredient-card {
        min-height: 110px;
        padding: 15px 5px;
    }

    .ingredient-card span {
        font-size: 1.3rem;
    }

    .btn-check-answer {
        padding: 12px 30px;
        font-size: 1.5rem;
        width: 90%;
    }

    /* Result Screen */
    .congratulation-card {
        padding: 20px;
    }

    .result-title-text {
        font-size: 2.2rem;
    }

    .result-subtitle {
        font-size: 1.2rem;
    }

    .btn-next-round {
        height: 60px;
        font-size: 1.4rem;
    }
}

@media (max-width: 380px) {

    /* Small Phones */
    .main-title {
        font-size: 2rem;
    }

    #food-name-display {
        font-size: 2rem;
    }

    .food-card-container {
        height: 240px;
    }

    .food-image-wrapper {
        width: 140px;
        height: 140px;
    }

    #food-image {
        width: 110px;
        height: 110px;
    }
}
/* Compact Result Screen Overrides */
.correct-answer-section {
    padding: 15px !important;
    margin: 10px 0 !important;
}


/* ========== WRONG ANSWER LAYOUT OPTIMIZATION ========== */
/* When the answer is wrong, we hide decorations to save space */
#result-screen.is-wrong .middle-decoration,
#result-screen.is-wrong .celebration-sparkles,
#result-screen.is-wrong .bottom-characters {
    display: none !important;
}

#result-screen.is-wrong .congratulation-card {
    padding: 15px !important;
    margin-bottom: 10px !important;
}

#result-screen.is-wrong .congrats-icon {
    font-size: 3rem !important;
    margin-bottom: 5px !important;
}

#result-screen.is-wrong .result-title-text {
    font-size: 2rem !important;
    margin-bottom: 5px !important;
}

#result-screen.is-wrong .result-subtitle {
    font-size: 1.2rem !important;
}

#result-screen.is-wrong .correct-answer-section {
    margin: 5px 0 !important;
    padding: 10px !important;
}

#result-screen.is-wrong .correct-answer-section h3 {
    margin-bottom: 5px !important;
    font-size: 1.3rem !important;
}

#result-screen.is-wrong .ingredient-grid {
    gap: 5px !important;
    margin-bottom: 5px !important;
}

#result-screen.is-wrong .ingredient-card {
    min-height: 80px !important;
    padding: 5px !important;
}

#result-screen.is-wrong .ingredient-card span {
    font-size: 1.2rem !important;
}

#result-screen.is-wrong .btn-next-round {
    height: 55px !important;
    font-size: 1.5rem !important;
    margin-top: 5px !important;
}


/* Home Button Styling */
.btn-home {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    color: #FF6B35;
    border: 2px solid #FF6B35;
    border-radius: 20px;
    padding: 8px 20px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
    z-index: 1000;
}

.btn-home:hover {
    background: #FF6B35;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 107, 53, 0.3);
}

.btn-home:active {
    transform: scale(0.95);
}

