/* Pixel Art Restaurant Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

body {
    font-family: 'Press Start+2P', cursive;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('bg-restaurant.png') center/cover;
    opacity: 0.15;
    z-index: -1;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15) 0px,
        transparent 1px,
        transparent 2px,
        rgba(0, 0, 0, 0.15) 3px
    );
    pointer-events: none;
    z-index: 1000;
    animation: scanlines 8s linear infinite;
}

@keyframes scanlines {
    0% { transform: translateY(0); }
    100% { transform: translateY(4px); }
}

/* Screen Management */
.screen {
    display: none;
    min-height: 100vh;
    padding: 20px;
    animation: fadeIn 0.3s ease-in;
}

.screen.active {
    display: block;
}

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

/* Header */
.header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    animation: slideDown 0.5s ease;
}

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

.pixel-title {
    font-size: 22px;
    color: #FFD700;
    text-shadow: 
        3px 3px 0px #FF6B6B,
        6px 6px 0px #4ECDC4,
        9px 9px 0px #45B7D1,
        12px 12px 20px rgba(0,0,0,0.5);
    margin-bottom: 15px;
    line-height: 1.6;
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

.subtitle {
    font-size: 11px;
    color: #FFE66D;
    text-shadow: 
        2px 2px 0px #FF6B6B,
        4px 4px 10px rgba(0,0,0,0.5);
    animation: pulse 2s ease-in-out infinite;
}

.back-btn {
    position: absolute;
    top: 0;
    left: 0;
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
    color: white;
    border: 5px solid #4834A1;
    border-radius: 10px;
    padding: 12px 18px;
    font-family: 'Press Start+2P', cursive;
    font-size: 11px;
    cursor: pointer;
    box-shadow: 
        0 6px 0 #2C1A5E,
        0 10px 20px rgba(0,0,0,0.4);
    image-rendering: pixelated;
    transition: all 0.2s;
}

.back-btn:active {
    transform: translateY(4px);
    box-shadow: 
        0 2px 0 #2C1A5E,
        0 4px 10px rgba(0,0,0,0.4);
}

.back-btn:hover {
    filter: brightness(1.1);
}

/* Buttons */
.pixel-btn {
    background: linear-gradient(180deg, #FF6B6B 0%, #E74C3C 100%);
    color: white;
    border: 5px solid #C0392B;
    border-radius: 8px;
    padding: 18px 25px;
    font-family: 'Press Start+2P', cursive;
    font-size: 13px;
    cursor: pointer;
    display: block;
    width: 100%;
    margin: 18px 0;
    box-shadow: 
        0 8px 0 #8B2E16,
        0 12px 20px rgba(0,0,0,0.4);
    text-align: center;
    image-rendering: pixelated;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.pixel-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.pixel-btn:hover::before {
    left: 100%;
}

.pixel-btn:active {
    transform: translateY(6px);
    box-shadow: 
        0 2px 0 #8B2E16,
        0 4px 10px rgba(0,0,0,0.4);
}

.pixel-btn.big {
    font-size: 15px;
    padding: 25px 30px;
    margin: 25px 0;
    box-shadow: 
        0 10px 0 #8B2E16,
        0 15px 25px rgba(0,0,0,0.5);
}

/* Menu Buttons Container */
.menu-buttons {
    max-width: 400px;
    margin: 0 auto;
}

/* Menu & Recipes */
.menu-content {
    max-width: 500px;
    margin: 0 auto;
    animation: fadeIn 0.5s ease;
}

.menu-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    background: linear-gradient(180deg, #4ECDC4 0%, #45B7D1 100%);
    color: white;
    border: 5px solid #2C3E50;
    border-radius: 12px;
    padding: 15px;
    font-family: 'Press Start+2P', cursive;
    font-size: 11px;
    cursor: pointer;
    box-shadow: 
        0 6px 0 #1A5490,
        0 10px 20px rgba(0,0,0,0.3);
    transition: all 0.3s;
}

.tab-btn:active {
    transform: translateY(4px);
    box-shadow: 
        0 2px 0 #1A5490,
        0 4px 10px rgba(0,0,0,0.3);
}

.tab-btn.active {
    background: linear-gradient(180deg, #FFD93D 0%, #FFA500 100%);
    border-color: #FF6B6B;
    box-shadow: 
        0 6px 0 #C0392B,
        0 10px 20px rgba(255,107,107,0.5);
    transform: scale(1.05);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.menu-item {
    background: linear-gradient(135deg, #FFF 0%, #F8F9FA 100%);
    border: 6px solid #FF6B6B;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 
        0 10px 0 #C0392B,
        0 15px 30px rgba(0,0,0,0.3);
    position: relative;
    transition: all 0.3s;
    animation: slideUp 0.5s ease;
}

.menu-item:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 15px 0 #C0392B,
        0 20px 40px rgba(0,0,0,0.4);
}

.menu-item::before {
    content: '⭐';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    animation: rotate 4s linear infinite;
}

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

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

.item-image {
    width: 150px;
    height: 150px;
    object-fit: contain;
    display: block;
    margin: 0 auto 20px;
    image-rendering: pixelated;
    filter: drop-shadow(5px 5px 10px rgba(0,0,0,0.3));
    transition: transform 0.3s;
    animation: bounce 2s ease-in-out infinite;
}

.item-image:hover {
    transform: scale(1.1) rotate(5deg);
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.menu-item h3 {
    font-size: 16px;
    color: #2C3E50;
    margin-bottom: 12px;
    text-align: center;
    text-shadow: 2px 2px 0px rgba(255,107,107,0.2);
}

.price {
    font-size: 20px;
    color: #27AE60;
    text-align: center;
    margin-bottom: 18px;
    text-shadow: 
        2px 2px 0px #1E8449,
        4px 4px 0px rgba(0,0,0,0.2);
    animation: priceGlow 2s ease-in-out infinite;
}

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

.recipe {
    font-size: 9px;
    line-height: 1.8;
    color: #2C3E50;
    background: rgba(255,235,205,0.5);
    padding: 15px;
    border-radius: 8px;
    border: 3px dashed #FF6B6B;
}

.recipe h4 {
    font-size: 11px;
    color: #E74C3C;
    margin: 12px 0;
    text-shadow: 1px 1px 0px rgba(0,0,0,0.1);
}

.recipe ul {
    margin-left: 25px;
    margin-bottom: 12px;
}

.recipe li {
    margin: 7px 0;
    position: relative;
}

.recipe li::marker {
    color: #FF6B6B;
}

.recipe p {
    margin-top: 10px;
    background: rgba(255,255,255,0.8);
    padding: 10px;
    border-radius: 6px;
    border-left: 4px solid #4ECDC4;
}

/* Games */
.games-menu {
    max-width: 400px;
    margin: 0 auto;
}

.game-screen {
    background: linear-gradient(135deg, #F093FB 0%, #F5576C 100%);
}

.game-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('game-bg.png') center/cover;
    opacity: 0.2;
    z-index: 0;
}

.game-screen .game-area {
    position: relative;
    z-index: 1;
}

.game-area {
    max-width: 500px;
    margin: 0 auto;
}

.score-board {
    display: flex;
    justify-content: space-around;
    background: linear-gradient(135deg, #2C3E50 0%, #34495E 100%);
    color: #FFD93D;
    padding: 18px;
    border: 6px solid #FFD93D;
    border-radius: 12px;
    margin-bottom: 25px;
    font-size: 11px;
    box-shadow: 
        0 8px 0 #C0392B,
        0 12px 25px rgba(0,0,0,0.5);
    text-shadow: 2px 2px 0px rgba(0,0,0,0.5);
}

.game-canvas {
    background: linear-gradient(135deg, #FFF 0%, #F0F0F0 100%);
    border: 8px solid #FF6B6B;
    border-radius: 16px;
    min-height: 350px;
    margin-bottom: 25px;
    position: relative;
    box-shadow: 
        0 10px 0 #C0392B,
        inset 0 0 30px rgba(0,0,0,0.1),
        0 15px 30px rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pizza-base {
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, #F4A460 0%, #D2691E 100%);
    border-radius: 50%;
    border: 10px solid #8B4513;
    position: relative;
    box-shadow: 
        inset 0 0 30px rgba(0,0,0,0.3),
        0 10px 20px rgba(0,0,0,0.3);
}

.instruction {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 8px;
    text-align: center;
    color: #8B4513;
}

.pizza-topping {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    animation: plop 0.3s ease;
}

@keyframes plop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.ingredients-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.ingredient-btn {
    flex: 1;
    min-width: 90px;
    background: linear-gradient(180deg, #FFD93D 0%, #FFA500 100%);
    color: white;
    border: 4px solid #FF6B6B;
    border-radius: 10px;
    padding: 12px 10px;
    font-family: 'Press Start+2P', cursive;
    font-size: 9px;
    cursor: pointer;
    box-shadow: 
        0 5px 0 #C0392B,
        0 8px 15px rgba(0,0,0,0.3);
    transition: all 0.2s;
    text-shadow: 1px 1px 0px rgba(0,0,0,0.3);
}

.ingredient-btn:active {
    transform: translateY(4px);
    box-shadow: 
        0 1px 0 #C0392B,
        0 3px 8px rgba(0,0,0,0.3);
}

.ingredient-btn:hover {
    filter: brightness(1.1);
}

/* Chicken Game */
.chicken-piece {
    position: relative;
    width: 180px;
    height: 180px;
    transition: transform 0.3s;
}

.chicken-piece img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
}

.chicken-piece.flipping {
    animation: flip 0.6s;
}

@keyframes flip {
    0%, 100% { transform: rotateY(0deg); }
    50% { transform: rotateY(180deg); }
}

.grill-indicator {
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 20px;
    background: repeating-linear-gradient(
        90deg,
        #8B4513 0px,
        #8B4513 10px,
        transparent 10px,
        transparent 20px
    );
}

.controls-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.control-btn {
    flex: 1;
    background: linear-gradient(180deg, #A29BFE 0%, #6C5CE7 100%);
    color: white;
    border: 5px solid #4834A1;
    border-radius: 10px;
    padding: 14px;
    font-family: 'Press Start+2P', cursive;
    font-size: 10px;
    cursor: pointer;
    box-shadow: 
        0 6px 0 #2C1A5E,
        0 10px 20px rgba(0,0,0,0.3);
    transition: all 0.2s;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.3);
}

.control-btn:active {
    transform: translateY(4px);
    box-shadow: 
        0 2px 0 #2C1A5E,
        0 4px 10px rgba(0,0,0,0.3);
}

.control-btn:hover {
    filter: brightness(1.15);
}

.progress-bar {
    background: #34495e;
    height: 30px;
    border: 4px solid #2c3e50;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.cooking-progress {
    height: 100%;
    background: linear-gradient(90deg, #27ae60, #2ecc71);
    width: 0%;
    transition: width 0.3s;
}

.cook-btn {
    background: linear-gradient(180deg, #e74c3c 0%, #c0392b 100%);
    border-color: #a93226;
}

/* Quiz */
.quiz-menu {
    max-width: 450px;
    margin: 0 auto;
    background: linear-gradient(135deg, #FFF 0%, #F8F9FA 100%);
    padding: 30px;
    border: 8px solid #4ECDC4;
    border-radius: 20px;
    box-shadow: 
        0 12px 0 #2C7A7B,
        0 18px 35px rgba(0,0,0,0.4);
    animation: slideUp 0.5s ease;
}

.quiz-menu h3 {
    font-size: 14px;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 20px;
}

.high-scores {
    margin-top: 30px;
    padding: 20px;
    border-top: 5px dashed #FF6B6B;
    background: rgba(255,235,205,0.3);
    border-radius: 12px;
}

.high-scores h4 {
    font-size: 13px;
    color: #E74C3C;
    margin-bottom: 18px;
    text-align: center;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.1);
}

.high-scores p {
    font-size: 11px;
    color: #2C3E50;
    margin: 10px 0;
    text-align: center;
    background: white;
    padding: 8px;
    border-radius: 8px;
    border: 3px solid #4ECDC4;
}

.high-scores p span {
    color: #FFD93D;
    text-shadow: 1px 1px 0px #FFA500;
    font-size: 13px;
}

.quiz-game {
    max-width: 500px;
    margin: 0 auto;
}

.quiz-header {
    display: flex;
    justify-content: space-around;
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
    color: #FFD93D;
    padding: 18px;
    border: 6px solid #FFD93D;
    border-radius: 12px;
    margin-bottom: 25px;
    font-size: 10px;
    box-shadow: 
        0 8px 0 #4834A1,
        0 12px 25px rgba(0,0,0,0.5);
    text-shadow: 2px 2px 0px rgba(0,0,0,0.5);
}

.question-card {
    background: linear-gradient(135deg, #FFF 0%, #F0F8FF 100%);
    border: 8px solid #FFD93D;
    padding: 30px;
    margin-bottom: 25px;
    border-radius: 16px;
    box-shadow: 
        0 10px 0 #FFA500,
        0 15px 30px rgba(0,0,0,0.4);
    animation: slideUp 0.5s ease;
}

.question-card h3 {
    font-size: 12px;
    color: #2c3e50;
    margin-bottom: 25px;
    line-height: 1.6;
}

.answers-grid {
    display: grid;
    gap: 12px;
}

.answer-btn {
    background: linear-gradient(180deg, #A29BFE 0%, #6C5CE7 100%);
    color: white;
    border: 5px solid #4834A1;
    border-radius: 12px;
    padding: 18px;
    font-family: 'Press Start+2P', cursive;
    font-size: 11px;
    cursor: pointer;
    text-align: left;
    box-shadow: 
        0 6px 0 #2C1A5E,
        0 10px 20px rgba(0,0,0,0.3);
    transition: all 0.3s;
    line-height: 1.6;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.3);
}

.answer-btn:active {
    transform: translateY(4px);
    box-shadow: 
        0 2px 0 #2C1A5E,
        0 4px 10px rgba(0,0,0,0.3);
}

.answer-btn:hover {
    filter: brightness(1.1);
    transform: translateX(5px);
}

.answer-btn.correct {
    background: linear-gradient(180deg, #55EFC4 0%, #00B894 100%);
    border-color: #00704A;
    box-shadow: 
        0 6px 0 #00704A,
        0 10px 20px rgba(0,184,148,0.5);
    animation: correctPulse 0.5s ease;
}

.answer-btn.wrong {
    background: linear-gradient(180deg, #FF7675 0%, #D63031 100%);
    border-color: #A01F1F;
    box-shadow: 
        0 6px 0 #A01F1F,
        0 10px 20px rgba(214,48,49,0.5);
    animation: shake 0.5s ease;
}

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

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

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

.result-message {
    background: linear-gradient(135deg, #2C3E50 0%, #34495E 100%);
    color: white;
    padding: 22px;
    border: 6px solid #FFD93D;
    border-radius: 12px;
    text-align: center;
    font-size: 12px;
    margin-bottom: 22px;
    box-shadow: 
        0 8px 0 #C0392B,
        0 12px 25px rgba(0,0,0,0.4);
    line-height: 1.7;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.5);
    animation: slideUp 0.3s ease;
}

.result-message.correct {
    background: linear-gradient(135deg, #00B894 0%, #00D9A5 100%);
    border-color: #00B894;
    box-shadow: 
        0 8px 0 #00704A,
        0 12px 25px rgba(0,184,148,0.5);
}

.result-message.wrong {
    background: linear-gradient(135deg, #E74C3C 0%, #FF6B6B 100%);
    border-color: #E74C3C;
    box-shadow: 
        0 8px 0 #C0392B,
        0 12px 25px rgba(231,76,60,0.5);
}

.hidden {
    display: none !important;
}

.quiz-results {
    max-width: 450px;
    margin: 0 auto;
    background: linear-gradient(135deg, #FFF 0%, #FFF5E6 100%);
    padding: 40px;
    border: 8px solid #FFD93D;
    border-radius: 20px;
    text-align: center;
    box-shadow: 
        0 12px 0 #FFA500,
        0 18px 35px rgba(0,0,0,0.4);
    animation: slideUp 0.5s ease;
}

.quiz-results h2 {
    font-size: 18px;
    color: #FF6B6B;
    margin-bottom: 25px;
    text-shadow: 
        2px 2px 0px #FFD93D,
        4px 4px 10px rgba(0,0,0,0.2);
    animation: glow 2s ease-in-out infinite;
}

.final-score {
    font-size: 28px;
    color: #00B894;
    margin: 25px 0;
    text-shadow: 
        3px 3px 0px #00704A,
        6px 6px 15px rgba(0,0,0,0.3);
    animation: priceGlow 2s ease-in-out infinite;
}

#result-comment {
    font-size: 10px;
    color: #34495e;
    margin: 20px 0;
    line-height: 1.6;
}

/* Responsive adjustments */
@media (max-width: 400px) {
    .pixel-title {
        font-size: 16px;
    }
    
    .pixel-btn {
        font-size: 10px;
        padding: 12px 15px;
    }
    
    .menu-item h3 {
        font-size: 12px;
    }
    
    .recipe {
        font-size: 7px;
    }
}

/* Loading animation */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading {
    animation: pulse 1s infinite;
}

