* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Comic Sans MS', 'Chalkboard SE', 'Comic Neue', cursive, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.game-container {
    max-width: 1200px;
    margin: 0 auto;
}

.game-header {
    background: white;
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.game-header h1 {
    color: #4A90E2;
    font-size: 2rem;
}

.score-display {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

.game-main {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    min-height: 600px;
    max-height: 80vh;
    overflow-y: auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.game-main::-webkit-scrollbar {
    width: 12px;
}

.game-main::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.game-main::-webkit-scrollbar-thumb {
    background: #4A90E2;
    border-radius: 10px;
}

.game-main::-webkit-scrollbar-thumb:hover {
    background: #357abd;
}

.stage-content {
    text-align: center;
    width: 100%;
    max-width: 800px;
}

.success-with-education {
    max-width: 700px;
}

.success-education-section {
    margin-top: 40px;
    max-height: none;
    text-align: center;
}

.success-education-section .edu-section {
    margin: 25px 0;
    text-align: left;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #4A90E2;
    animation: slideInLeft 0.5s ease-out;
}

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

.success-education-section .edu-section h3 {
    color: #4A90E2;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.success-education-section .edu-section p {
    color: #666;
    line-height: 1.6;
    font-size: 1rem;
    margin: 8px 0;
}

.success-education-section .edu-section ul {
    color: #666;
    line-height: 1.8;
}

.success-education-section .edu-section ul li {
    margin: 8px 0;
}

.next-level-btn {
    position: relative;
    animation: pulseButton 2s infinite;
}

@keyframes pulseButton {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 5px 15px rgba(74, 144, 226, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 25px rgba(74, 144, 226, 0.5);
    }
}

.character {
    font-size: 120px;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

.character.eating {
    animation: eating 0.5s infinite;
}

.character.energetic {
    animation: celebrate 0.5s infinite;
}

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

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

@keyframes celebrate {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

h2 {
    color: #4A90E2;
    font-size: 2rem;
    margin-bottom: 15px;
}

.story-text {
    font-size: 1.2rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 30px;
}

.primary-btn {
    background: #4A90E2;
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.3rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    margin: 10px;
}

.primary-btn:hover {
    background: #357abd;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.3);
}

.secondary-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 10px;
}

.secondary-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.food-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.food-card {
    background: #f8f9fa;
    border: 3px solid transparent;
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.food-card:hover {
    border-color: #4A90E2;
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.food-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.marble-count {
    font-size: 1rem;
    margin: 10px 0;
}

.food-desc {
    color: #666;
    font-size: 0.9rem;
}

.digestion-visual {
    margin: 40px 0;
}

.stomach {
    display: inline-block;
    font-size: 100px;
    position: relative;
    margin: 20px;
}

.organ-label {
    display: block;
    font-size: 1.5rem;
    color: #4A90E2;
    font-weight: bold;
    margin-top: 10px;
}

.sparkles {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
}

.pulse {
    animation: pulse 1s infinite;
}

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

.process-text {
    font-size: 1.5rem;
    color: #4A90E2;
    font-weight: bold;
    margin-top: 20px;
}

.body-diagram {
    margin: 40px 0;
}

.blood-vessel {
    background: linear-gradient(90deg, #ff6b6b, #ffd700);
    height: 40px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 30px 0;
    overflow: hidden;
}

.marble-flow {
    font-size: 1.5rem;
    animation: flow 2s linear infinite;
}

@keyframes flow {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.pancreas-block {
    background: #fff3cd;
    border: 3px solid #ffc107;
    border-radius: 20px;
    padding: 30px;
    margin: 20px auto;
    max-width: 400px;
}

.organ-emoji {
    font-size: 80px;
    display: block;
    margin-bottom: 10px;
}

.warning-box {
    background: #f8d7da;
    border: 2px solid #dc3545;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    font-size: 1.3rem;
    color: #721c24;
    font-weight: bold;
}

.zoom-text {
    font-size: 1.2rem;
    color: #4A90E2;
    font-style: italic;
    margin-top: 20px;
}

.unlock-header {
    margin-bottom: 20px;
}

.stats-bar {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 15px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
}

.pancreas-view {
    position: relative;
    margin: 20px auto;
    max-width: 600px;
}

.pancreas-bg {
    text-align: center;
    margin-bottom: 20px;
    opacity: 0.5;
}

.pancreas-emoji {
    font-size: 80px;
}

.pancreas-label {
    display: block;
    font-size: 1.3rem;
    color: #4A90E2;
    font-weight: bold;
}

.marble-canvas {
    border: 3px solid #4A90E2;
    border-radius: 15px;
    cursor: crosshair;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: block;
    margin: 0 auto;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
}

.marble-canvas:hover {
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1), 0 0 20px rgba(74, 144, 226, 0.3);
}

.instructions {
    margin-top: 20px;
}

.tip {
    background: #d1ecf1;
    border: 2px solid #0c5460;
    border-radius: 10px;
    padding: 15px;
    font-size: 1.1rem;
    color: #0c5460;
    display: inline-block;
}

.success-message {
    margin: 30px 0;
}

.big-text {
    font-size: 2rem;
    color: #4A90E2;
    font-weight: bold;
    margin: 20px 0;
}

.energy-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
}

.energy-icon {
    font-size: 2rem;
}

.energy-bar {
    width: 300px;
    height: 30px;
    background: #e9ecef;
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid #4A90E2;
}

.energy-fill {
    height: 100%;
    background: linear-gradient(90deg, #51cf66, #2f9e44);
    transition: width 0.5s ease;
}

.final-score-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

.final-score-display .trophy {
    font-size: 2.5rem;
}

.final-score {
    font-size: 2rem;
}

.button-group {
    margin-top: 30px;
}

.education-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.education-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #dc3545;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
}

.close-btn:hover {
    background: #c82333;
}

.edu-section {
    margin: 25px 0;
    text-align: left;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #4A90E2;
}

.edu-section h3 {
    color: #4A90E2;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.edu-section p {
    color: #666;
    line-height: 1.6;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .game-header h1 {
        font-size: 1.3rem;
    }

    .character {
        font-size: 80px;
    }

    h2 {
        font-size: 1.5rem;
    }

    .food-grid {
        grid-template-columns: 1fr 1fr;
    }

    .marble-canvas {
        width: 100%;
        max-width: 400px;
    }

    .energy-bar {
        width: 200px;
    }

    .game-main {
        padding: 20px;
    }
}