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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #87CEEB 0%, #98FB98 50%, #90EE90 100%);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
}

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

.game-header {
    text-align: center;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.game-header h1 {
    font-size: 2.5em;
    margin-bottom: 15px;
    background: linear-gradient(45deg, #FF6B6B, #4ECDC4, #45B7D1);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.game-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.stat {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.game-area {
    width: 100%;
    height: 400px;
    background: linear-gradient(to bottom, #87CEEB 0%, #98FB98 70%, #90EE90 100%);
    border: 3px solid #4a5568;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.1);
}

.ground {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(to bottom, #8B4513 0%, #654321 100%);
    border-top: 3px solid #A0522D;
}

.ground::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 10px;
    background: repeating-linear-gradient(
        90deg,
        #228B22 0px,
        #228B22 10px,
        #32CD32 10px,
        #32CD32 20px
    );
}

.hamster {
    position: absolute;
    bottom: 60px;
    left: 100px;
    font-size: 40px;
    transition: all 0.1s ease;
    z-index: 10;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

.hamster.jumping {
    animation: jump 0.6s ease;
}

@keyframes jump {
    0% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-60px) rotate(-10deg); }
    50% { transform: translateY(-80px) rotate(0deg); }
    75% { transform: translateY(-60px) rotate(10deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

.hamster.running {
    animation: run 0.3s infinite;
}

@keyframes run {
    0% { transform: scaleX(1); }
    50% { transform: scaleX(1.1); }
    100% { transform: scaleX(1); }
}

.obstacle {
    position: absolute;
    bottom: 60px;
    width: 30px;
    height: 50px;
    background: linear-gradient(135deg, #8B0000 0%, #DC143C 100%);
    border-radius: 5px;
    border: 2px solid #654321;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    animation: moveLeft 3s linear infinite;
}

.obstacle::before {
    content: '🚧';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 20px;
}

.food {
    position: absolute;
    bottom: 80px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    animation: moveLeft 3s linear infinite, bounce 1s ease-in-out infinite;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.food.seed {
    background: linear-gradient(135deg, #DEB887 0%, #D2691E 100%);
}

.food.seed::before {
    content: '🌰';
}

.food.carrot {
    background: linear-gradient(135deg, #FF8C00 0%, #FF4500 100%);
}

.food.carrot::before {
    content: '🥕';
}

.food.apple {
    background: linear-gradient(135deg, #FF6347 0%, #DC143C 100%);
}

.food.apple::before {
    content: '🍎';
}

@keyframes moveLeft {
    from { right: -50px; }
    to { right: 100%; }
}

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

.clouds {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.cloud {
    position: absolute;
    font-size: 30px;
    opacity: 0.7;
    animation: cloudMove 15s linear infinite;
}

.cloud1 {
    top: 20px;
    animation-delay: 0s;
}

.cloud2 {
    top: 60px;
    animation-delay: -5s;
}

.cloud3 {
    top: 100px;
    animation-delay: -10s;
}

@keyframes cloudMove {
    from { right: -100px; }
    to { right: 100%; }
}

.game-controls {
    text-align: center;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.control-info {
    margin-bottom: 15px;
}

.control-info p {
    margin-bottom: 5px;
}

.game-btn {
    background: linear-gradient(135deg, #4ECDC4 0%, #44A08D 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    margin: 5px;
    font-weight: bold;
}

.game-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.game-btn:active {
    transform: translateY(0);
}

.game-over-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.game-over-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.game-over-content h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
}

.game-over-content p {
    font-size: 1.2em;
    margin-bottom: 10px;
}

#newRecord {
    color: #FFD700;
    font-weight: bold;
    animation: glow 1s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 5px #FFD700; }
    to { text-shadow: 0 0 20px #FFD700, 0 0 30px #FFD700; }
}

.instructions {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.instructions h3 {
    color: #4a5568;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.instructions ul {
    list-style: none;
    padding-left: 0;
}

.instructions li {
    margin-bottom: 8px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    border-left: 4px solid #4ECDC4;
}

.paused {
    filter: grayscale(50%);
}

.paused::after {
    content: '⏸️ PAUZA';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2em;
    color: white;
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    z-index: 100;
}

/* Przyciski mobilne */
.mobile-controls {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 20px;
    padding: 15px;
    backdrop-filter: blur(10px);
}

.mobile-controls-row {
    display: flex;
    gap: 15px;
    align-items: center;
}

.mobile-btn {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #4ECDC4 0%, #44A08D 100%);
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.mobile-btn:active {
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.mobile-btn.jump-btn {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    font-size: 30px;
}

.mobile-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Pokazuj przyciski mobilne na urządzeniach dotykowych */
@media (hover: none) and (pointer: coarse) {
    .mobile-controls {
        display: block;
    }
    
    .control-info {
        display: none;
    }
}

/* Dodatkowe style dla małych ekranów */
@media (max-width: 768px) {
    .mobile-controls {
        display: block;
    }
    
    .control-info p {
        font-size: 0.9em;
    }
    
    .mobile-btn {
        width: 55px;
        height: 55px;
        font-size: 20px;
    }
    
    .mobile-btn.jump-btn {
        width: 70px;
        height: 70px;
        font-size: 26px;
    }
}

@media (max-width: 480px) {
    .mobile-controls {
        bottom: 10px;
        padding: 10px;
    }
    
    .mobile-controls-row {
        gap: 10px;
    }
    
    .mobile-btn {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }
    
    .mobile-btn.jump-btn {
        width: 65px;
        height: 65px;
        font-size: 24px;
    }
}
@media (max-width: 768px) {
    .game-container {
        padding: 10px;
    }
    
    .game-header h1 {
        font-size: 2em;
    }
    
    .game-stats {
        gap: 15px;
    }
    
    .stat {
        padding: 8px 15px;
        font-size: 0.9em;
    }
    
    .game-area {
        height: 300px;
    }
    
    .hamster {
        font-size: 30px;
        left: 50px;
    }
    
    .instructions li {
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .game-header h1 {
        font-size: 1.5em;
    }
    
    .game-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .game-area {
        height: 250px;
    }
    
    .hamster {
        font-size: 25px;
        left: 30px;
    }
}

