/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #d97706;
    --secondary-color: #92400e;
    --accent-color: #f59e0b;
    --dark-bg: #1c1917;
    --light-bg: #fef3c7;
    --text-light: #ffffff;
    --text-dark: #292524;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --glow: 0 0 20px rgba(249, 115, 22, 0.5);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #292524;
    color: var(--text-light);
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.logo h1 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.nav {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--text-light);
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

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

.nav-btn.active {
    background: var(--text-light);
    color: var(--primary-color);
    box-shadow: var(--glow);
}

/* Sections */
.section {
    display: none;
    min-height: calc(100vh - 200px);
    padding: 1.5rem;
    animation: fadeIn 0.5s ease;
}

.section.active {
    display: block;
}

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

/* Home Section */
.hero {
    background: url('bg-header.png') center/cover;
    border-radius: 20px;
    padding: 3rem 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.8), rgba(146, 64, 14, 0.8));
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.tagline {
    font-style: italic;
    opacity: 0.9;
}

.features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.feature-card {
    background: linear-gradient(135deg, #44403c, #292524);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 2px solid rgba(217, 119, 6, 0.3);
    transition: all 0.3s ease;
}

.feature-card.clickable {
    cursor: pointer;
}

.feature-card.clickable:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow), var(--glow);
}

.feature-card.clickable:active {
    transform: translateY(-2px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

/* Info Section */
.info-section {
    margin-top: 3rem;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #44403c, #292524);
    border-radius: 20px;
    box-shadow: var(--shadow);
    border: 2px solid rgba(217, 119, 6, 0.3);
}

.info-section h2 {
    text-align: center;
    color: var(--accent-color);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.info-section > p {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-item {
    background: rgba(217, 119, 6, 0.1);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(217, 119, 6, 0.2);
}

.info-icon {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
}

.info-item h4 {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.info-item p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.story {
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(217, 119, 6, 0.2);
}

.story h3 {
    color: var(--accent-color);
    text-align: center;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.story p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
    margin-bottom: 1rem;
    text-align: justify;
}

.story p:last-child {
    margin-bottom: 0;
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.section-header p {
    color: rgba(255, 255, 255, 0.8);
}

/* Menu Grid */
.menu-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.menu-item {
    background: linear-gradient(135deg, #44403c, #292524);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 2px solid rgba(217, 119, 6, 0.3);
    transition: transform 0.3s ease;
}

.menu-item:active {
    transform: scale(0.98);
}

.menu-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: #44403c;
}

.menu-item h3 {
    padding: 1rem 1rem 0.5rem;
    color: var(--accent-color);
    font-size: 1.3rem;
}

.menu-item p {
    padding: 0 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.5;
}

.price {
    display: block;
    padding: 1rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Recipes */
.recipes-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.recipe-card {
    background: linear-gradient(135deg, #44403c, #292524);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 2px solid rgba(217, 119, 6, 0.3);
}

.recipe-card h3 {
    color: var(--accent-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.recipe-content h4 {
    color: var(--primary-color);
    margin: 1rem 0 0.5rem;
}

.recipe-content ul,
.recipe-content ol {
    margin-left: 1.5rem;
    line-height: 1.8;
}

.recipe-content li {
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Quiz Section */
.quiz-container {
    max-width: 600px;
    margin: 0 auto;
}

.quiz-level-selection {
    text-align: center;
    padding: 2rem 1rem;
}

.quiz-level-selection h3 {
    color: var(--accent-color);
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.level-buttons {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.level-btn {
    background: linear-gradient(135deg, #44403c, #292524);
    border: 2px solid rgba(217, 119, 6, 0.3);
    color: var(--text-light);
    padding: 1.5rem;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.level-btn:active {
    transform: scale(0.98);
}

.level-btn.easy:hover, .level-btn.easy:active {
    border-color: #10b981;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}

.level-btn.medium:hover, .level-btn.medium:active {
    border-color: #f59e0b;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
}

.level-btn.hard:hover, .level-btn.hard:active {
    border-color: #ef4444;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
}

.level-icon {
    font-size: 3rem;
}

.level-name {
    font-size: 1.3rem;
    font-weight: bold;
}

.level-desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.quiz-game {
    padding: 1rem;
}

.quiz-progress {
    margin-bottom: 2rem;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    width: 0%;
    transition: width 0.3s ease;
}

.quiz-stats {
    display: flex;
    justify-content: space-between;
    color: var(--text-light);
    font-weight: 600;
}

.quiz-stats span {
    color: var(--accent-color);
}

.question-container {
    background: linear-gradient(135deg, #44403c, #292524);
    padding: 2rem 1.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    border: 2px solid rgba(217, 119, 6, 0.3);
    margin-bottom: 1.5rem;
}

#question-text {
    color: var(--text-light);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.answers {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.answer-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--text-light);
    padding: 1rem;
    border-radius: 12px;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.answer-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--accent-color);
}

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

.answer-btn.correct {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: #10b981;
    animation: correctPulse 0.5s ease;
}

.answer-btn.incorrect {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-color: #ef4444;
    animation: shake 0.5s ease;
}

.answer-btn.disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

@keyframes correctPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.quiz-next-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    color: var(--text-light);
    padding: 1.2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.quiz-next-btn:active {
    transform: scale(0.98);
}

.quiz-results {
    text-align: center;
    padding: 2rem 1rem;
}

.results-content {
    background: linear-gradient(135deg, #44403c, #292524);
    padding: 3rem 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    border: 2px solid rgba(217, 119, 6, 0.3);
}

#results-title {
    color: var(--accent-color);
    font-size: 2rem;
    margin-bottom: 2rem;
}

.results-score {
    margin: 2rem 0;
}

.score-circle {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    box-shadow: var(--glow);
}

#final-score {
    font-size: 3rem;
    font-weight: bold;
    color: var(--text-light);
}

.score-total {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
}

#results-message {
    font-size: 1.2rem;
    color: var(--text-light);
    margin: 1.5rem 0;
    line-height: 1.6;
}

.results-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.quiz-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    color: var(--text-light);
    padding: 1rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.quiz-btn:active {
    transform: scale(0.98);
}

.quiz-btn.change-level {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

/* Game Section */
.game-container {
    max-width: 600px;
    margin: 0 auto;
}

.game-info {
    margin-bottom: 1.5rem;
}

.score-board {
    background: linear-gradient(135deg, #44403c, #292524);
    border-radius: 15px;
    padding: 1rem;
    display: flex;
    justify-content: space-around;
    box-shadow: var(--shadow);
    border: 2px solid rgba(217, 119, 6, 0.3);
}

.score-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.score-item span:first-child {
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 600;
}

.score-item span:last-child {
    color: var(--text-light);
    font-size: 1.3rem;
    font-weight: bold;
}

.grill-area {
    margin: 2rem 0;
    perspective: 1000px;
}

.grill {
    width: 100%;
    height: 300px;
    background: url('grill-flames.png') center/cover;
    border-radius: 20px;
    position: relative;
    box-shadow: var(--shadow), inset 0 0 50px rgba(0, 0, 0, 0.5);
    border: 3px solid #78716c;
    display: flex;
    align-items: center;
    justify-content: center;
}

.grill::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.3));
    border-radius: 17px;
}

.chicken {
    width: 150px;
    height: 150px;
    background: url('raw-chicken.png') center/cover;
    border-radius: 50%;
    position: relative;
    z-index: 2;
    transition: all 0.5s ease;
    filter: brightness(0.8);
}

.chicken.flipped {
    transform: rotateY(180deg);
}

.chicken.cooking-low {
    filter: brightness(0.9);
}

.chicken.cooking-medium {
    filter: brightness(1) sepia(0.3) hue-rotate(10deg);
}

.chicken.cooking-high {
    filter: brightness(1.1) sepia(0.5) hue-rotate(20deg);
}

.chicken.perfect {
    filter: brightness(1.2) sepia(0.6) saturate(1.3) hue-rotate(25deg);
    animation: pulse 1s infinite;
}

.chicken.burned {
    filter: brightness(0.3) saturate(0);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.game-controls {
    background: linear-gradient(135deg, #44403c, #292524);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 2px solid rgba(217, 119, 6, 0.3);
}

.control-group {
    margin-bottom: 1.5rem;
}

.control-group label {
    display: block;
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-align: center;
}

#heat-slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    outline: none;
    background: linear-gradient(to right, #3b82f6, #f59e0b, #ef4444);
    -webkit-appearance: none;
    margin-bottom: 0.5rem;
}

#heat-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

#heat-slider::-moz-range-thumb {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    border: none;
}

#heat-level {
    display: block;
    text-align: center;
    color: var(--text-light);
    font-weight: bold;
    font-size: 1.1rem;
}

.button-group {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.game-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    color: var(--text-light);
    padding: 1rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

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

.game-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.game-btn span:first-child {
    font-size: 1.5rem;
}

.start-btn {
    width: 100%;
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    color: var(--text-light);
    padding: 1.2rem;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: var(--shadow), var(--glow);
    transition: all 0.3s ease;
}

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

.start-btn.stop {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.game-message {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: bold;
    display: none;
}

.game-message.show {
    display: block;
    animation: slideDown 0.5s ease;
}

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

.game-message.success {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}

.game-message.fail {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
}

.game-message.info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--secondary-color), var(--dark-bg));
    padding: 2rem 1rem;
    text-align: center;
    margin-top: 3rem;
}

.footer p {
    margin: 0.5rem 0;
    color: rgba(255, 255, 255, 0.7);
}

/* Responsive Design */
@media (min-width: 600px) {
    .features {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .button-group {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .info-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .results-buttons {
        flex-direction: row;
    }
}

/* Landscape Mode for Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: 2rem 1rem;
    }
    
    .grill {
        height: 200px;
    }
    
    .chicken {
        width: 100px;
        height: 100px;
    }
}

