* {
    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 25%, #f093fb 50%, #4facfe 75%, #00f2fe 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.game-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 30px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 100%;
    text-align: center;
}

header h1 {
    color: #ff6b6b;
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 3px 3px 0px #ffd93d;
}

.subtitle {
    color: #4ecdc4;
    font-size: 1.2em;
    margin-bottom: 30px;
}

.game-area {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.dragon-container {
    position: relative;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.dragon {
    font-size: 8em;
    position: relative;
    display: inline-block;
}

.dragon.happy {
    animation: dragonBounce 0.8s ease 0.1s;
}

.dragon.sad {
    animation: dragonShake 0.6s ease 0.1s;
}

/* Dragon health states */
.dragon-weak .dragon-body {
    filter: brightness(0.7) saturate(0.6) grayscale(0.3);
}

.dragon-ok .dragon-body {
    filter: brightness(0.85) saturate(0.8);
}

.dragon-strong .dragon-body {
    filter: brightness(1.1) saturate(1.2);
}

.dragon-very-strong .dragon-body {
    filter: brightness(1.2) saturate(1.3) drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
    animation: dragonIdle 3s ease-in-out infinite, dragonGlow 2s ease-in-out infinite;
}

@keyframes dragonGlow {
    0%, 100% {
        filter: brightness(1.2) saturate(1.3) drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
    }
    50% {
        filter: brightness(1.3) saturate(1.4) drop-shadow(0 0 20px rgba(255, 215, 0, 0.8));
    }
}

.dragon-body {
    display: inline-block;
    animation: dragonIdle 3s ease-in-out infinite;
    transform-origin: center center;
    transition: transform 0.5s ease-out, filter 0.5s ease-out;
}

@keyframes dragonIdle {
    0%, 100% { 
        transform: translateY(0) rotate(0deg) scale(1);
    }
    25% { 
        transform: translateY(-10px) rotate(-2deg) scale(1.03);
    }
    50% { 
        transform: translateY(-5px) rotate(0deg) scale(1.06);
    }
    75% { 
        transform: translateY(-10px) rotate(2deg) scale(1.03);
    }
}

@keyframes dragonBounce {
    0% { transform: translateY(0) scale(1); }
    30% { transform: translateY(-25px) scale(1.15); }
    60% { transform: translateY(-8px) scale(1.08); }
    100% { transform: translateY(0) scale(1); }
}

@keyframes dragonShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50% { transform: translateX(-15px); }
    20%, 40%, 60% { transform: translateX(15px); }
    70% { transform: translateX(-8px); }
    80% { transform: translateX(8px); }
    90% { transform: translateX(0); }
}

.expression {
    font-size: 0.3em;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 1s ease infinite, expressionFloat 2.5s ease-in-out infinite;
}

@keyframes expressionFloat {
    0%, 100% { 
        transform: translate(-50%, -50%) translateY(0);
    }
    50% { 
        transform: translate(-50%, -50%) translateY(-5px);
    }
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
}

.feedback {
    margin-top: 20px;
    font-size: 1.5em;
    font-weight: bold;
    min-height: 40px;
    transition: all 0.3s ease;
}

.feedback.correct {
    color: #51cf66;
    animation: slideIn 0.5s ease;
}

.feedback.incorrect {
    color: #ff6b6b;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.score-board {
    display: flex;
    justify-content: space-around;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    border-radius: 20px;
    color: white;
    font-size: 1.3em;
}

.score-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.score-item .label {
    font-size: 0.8em;
    opacity: 0.9;
}

.score-item span:last-child {
    font-size: 1.5em;
    font-weight: bold;
}

.food-selection h2 {
    color: #4ecdc4;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.food-options {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.food-btn {
    background: linear-gradient(135deg, #ffd93d 0%, #ff6b6b 100%);
    border: none;
    border-radius: 20px;
    padding: 30px 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    min-width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    font-family: inherit;
}

.food-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.food-btn:active {
    transform: translateY(-2px) scale(1.02);
}

.food-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.food-emoji {
    font-size: 4em;
    display: block;
}

.food-name {
    font-size: 1.3em;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.food-btn.correct {
    background: linear-gradient(135deg, #51cf66 0%, #40c057 100%);
    animation: correctPulse 0.5s ease;
}

.food-btn.incorrect {
    background: linear-gradient(135deg, #ff6b6b 0%, #fa5252 100%);
    animation: incorrectShake 0.5s ease;
}

@keyframes correctPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes incorrectShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.countdown {
    font-size: 4em;
    font-weight: bold;
    color: #ff6b6b;
    text-shadow: 3px 3px 0px #ffd93d, 6px 6px 10px rgba(0, 0, 0, 0.3);
    margin: 20px auto;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s ease;
    pointer-events: none;
}

.countdown.show {
    opacity: 1;
    transform: scale(1);
    animation: countdownPulse 0.5s ease;
}

@keyframes countdownPulse {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Animacja serduszek */
.hearts-animation {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.heart {
    position: absolute;
    font-size: 2em;
    animation: heartFloat 2s ease-out forwards;
    opacity: 0;
}

@keyframes heartFloat {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0.5);
    }
    20% {
        opacity: 1;
        transform: translateY(-20px) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-150px) scale(1.5);
    }
}

/* Animacja płaczu smoka */
.dragon-crying {
    filter: brightness(0.8) saturate(0.7);
}

.tears-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
    overflow: visible;
}

.tear {
    position: absolute;
    font-size: 1.5em;
    opacity: 0;
    animation: tearFall 1.5s ease-out forwards;
}

@keyframes tearFall {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0.5);
    }
    20% {
        opacity: 1;
        transform: translateY(10px) scale(1);
    }
    100% {
        opacity: 0.3;
        transform: translateY(200px) scale(0.8);
    }
}

@keyframes dragonCrying {
    0%, 100% {
        transform: translateX(0) rotate(0deg);
    }
    25% {
        transform: translateX(-3px) rotate(-1deg);
    }
    75% {
        transform: translateX(3px) rotate(1deg);
    }
}

@media (max-width: 600px) {
    header h1 {
        font-size: 1.8em;
    }
    
    .dragon {
        font-size: 5em;
    }
    
    .food-btn {
        min-width: 150px;
        padding: 20px 30px;
    }
    
    .food-emoji {
        font-size: 3em;
    }
}

