* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Minecraft', monospace;
    background: linear-gradient(to bottom, #87CEEB 0%, #98D8E8 100%);
    overflow: hidden;
    height: 100vh;
}

.game-container {
    width: 100vw;
    height: 100vh;
    position: relative;
}

/* HUD */
.hud {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
    display: flex;
    gap: 30px;
    font-size: 24px;
    color: white;
    text-shadow: 2px 2px 0px #000;
}

.score, .lives, .level {
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 15px;
    border-radius: 5px;
    border: 2px solid #555;
}

/* Game Area */
.game-area {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

/* Sky */
.sky {
    width: 100%;
    height: 70%;
    background: linear-gradient(to bottom, #87CEEB 0%, #98D8E8 50%, #B0E0E6 100%);
    position: relative;
}

.clouds {
    position: absolute;
    width: 100px;
    height: 40px;
    background: white;
    border-radius: 20px;
    opacity: 0.8;
    animation: float 20s infinite linear;
}

.clouds:nth-child(1) {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.clouds:nth-child(2) {
    top: 20%;
    left: 60%;
    animation-delay: -7s;
}

.clouds:nth-child(3) {
    top: 15%;
    left: 80%;
    animation-delay: -14s;
}

@keyframes float {
    0% { transform: translateX(-120px); }
    100% { transform: translateX(calc(100vw + 120px)); }
}

/* Background Trees */
.background-trees {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 20;
    top: 0;
    left: 0;
}

.tree {
    position: absolute;
    bottom: 30%;
    width: 60px;
    height: 120px;
    z-index: 25;
}

.tree::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 40px;
    background: #8B4513;
    border: 2px solid #654321;
    z-index: 25;
    /* Blocky trunk */
    border-radius: 0;
}

.tree::after {
    content: '';
    position: absolute;
    bottom: 35px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    background: #228B22;
    border: 3px solid #006400;
    z-index: 25;
    /* Blocky foliage */
    border-radius: 0;
}

/* Tree variations */
.tree1 { left: 5%; animation: treeSway 8s ease-in-out infinite; }
.tree2 { left: 20%; animation: treeSway 6s ease-in-out infinite reverse; }
.tree3 { left: 65%; animation: treeSway 7s ease-in-out infinite; }
.tree4 { left: 80%; animation: treeSway 9s ease-in-out infinite reverse; }
.tree5 { left: 40%; animation: treeSway 5s ease-in-out infinite; }
.tree6 { left: 90%; animation: treeSway 10s ease-in-out infinite; }
.tree7 { left: 15%; animation: treeSway 7s ease-in-out infinite reverse; }
.tree8 { left: 75%; animation: treeSway 8s ease-in-out infinite; }

/* Tree style variations */
.tree1, .tree3, .tree5, .tree7 {
    /* Standard tree style */
}

.tree2, .tree6 {
    /* Taller, thinner trees */
    height: 140px;
}

.tree2::before, .tree6::before {
    height: 50px;
    width: 16px;
    border-radius: 0;
}

.tree2::after, .tree6::after {
    width: 70px;
    height: 90px;
    bottom: 45px;
    border-radius: 0;
}

.tree4, .tree8 {
    /* Wider, bushier trees */
    width: 80px;
}

.tree4::before, .tree8::before {
    width: 24px;
    height: 35px;
    border-radius: 0;
}

.tree4::after, .tree8::after {
    width: 100px;
    height: 90px;
    bottom: 30px;
    border-radius: 0;
}

@keyframes treeSway {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(2deg); }
}

/* Background Animals */
.background-animals {
    position: absolute;
    width: 100%;
    height: 30%;
    bottom: 0;
    pointer-events: none;
    z-index: 15;
}

.animal {
    position: absolute;
    bottom: 0;
    width: 40px;
    height: 30px;
}

.cow {
    background: #8B7355;
    border-radius: 20px 20px 10px 10px;
    border: 2px solid #654321;
}

.cow::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 15px;
    background: #8B7355;
    border-radius: 10px 10px 5px 5px;
    border: 2px solid #654321;
}

.cow::after {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: #654321;
    border-radius: 50%;
}

.pig {
    background: #FFB6C1;
    border-radius: 20px 20px 10px 10px;
    border: 2px solid #FF69B4;
}

.pig::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 12px;
    background: #FFB6C1;
    border-radius: 8px 8px 4px 4px;
    border: 2px solid #FF69B4;
}

.pig::after {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: #FF69B4;
    border-radius: 50%;
}

.sheep {
    background: #F5F5DC;
    border-radius: 20px 20px 10px 10px;
    border: 2px solid #D2B48C;
}

.sheep::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 18px;
    height: 14px;
    background: #F5F5DC;
    border-radius: 9px 9px 5px 5px;
    border: 2px solid #D2B48C;
}

.sheep::after {
    content: '';
    position: absolute;
    top: -7px;
    left: 50%;
    transform: translateX(-50%);
    width: 7px;
    height: 7px;
    background: #D2B48C;
    border-radius: 50%;
}

.chicken {
    background: #FFD700;
    border-radius: 15px 15px 8px 8px;
    border: 2px solid #FFA500;
}

.chicken::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 8px;
    background: #FFD700;
    border-radius: 6px 6px 3px 3px;
    border: 2px solid #FFA500;
}

.chicken::after {
    content: '';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: #FFA500;
    border-radius: 50%;
}

.cow1 { left: 10%; animation: animalWalk 15s linear infinite; }
.pig1 { left: 30%; animation: animalWalk 12s linear infinite reverse; }
.sheep1 { left: 60%; animation: animalWalk 18s linear infinite; }
.chicken1 { left: 85%; animation: animalWalk 8s linear infinite reverse; }

@keyframes animalWalk {
    0% { transform: translateX(-50px); }
    100% { transform: translateX(calc(100vw + 50px)); }
}

/* Ground */
.ground {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 30%;
}

.grass {
    height: 60%;
    background: linear-gradient(to bottom, #7CB342 0%, #8BC34A 100%);
    position: relative;
}

.grass::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 10px;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 20px,
        rgba(0, 0, 0, 0.1) 20px,
        rgba(0, 0, 0, 0.1) 40px
    );
}

.dirt {
    height: 40%;
    background: linear-gradient(to bottom, #8D6E63 0%, #795548 100%);
}

/* Player (Steve) */
.player {
    position: absolute;
    bottom: 30%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

.steve {
    width: 40px;
    height: 80px;
    position: relative;
    animation: steveIdle 3s ease-in-out infinite;
}

.steve.mining {
    animation: steveMining 0.5s ease-in-out;
}

.steve.jumping {
    animation: steveJump 0.8s ease-out;
}

.steve.celebrating {
    animation: steveCelebrate 1s ease-in-out;
}

@keyframes steveIdle {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-2px); }
}

@keyframes steveMining {
    0% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-5px) rotate(-5deg); }
    50% { transform: translateY(-8px) rotate(5deg); }
    75% { transform: translateY(-5px) rotate(-3deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes steveJump {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

@keyframes steveCelebrate {
    0% { transform: translateY(0px) scale(1); }
    25% { transform: translateY(-10px) scale(1.1); }
    50% { transform: translateY(-15px) scale(1.2); }
    75% { transform: translateY(-10px) scale(1.1); }
    100% { transform: translateY(0px) scale(1); }
}

.head {
    width: 32px;
    height: 32px;
    background: #C68642;
    position: absolute;
    top: 0;
    left: 4px;
    border: 2px solid #8B4513;
}

.body {
    width: 24px;
    height: 32px;
    background: #4A90E2;
    position: absolute;
    top: 32px;
    left: 8px;
    border: 2px solid #2E5C8A;
}

.arm {
    width: 8px;
    height: 24px;
    background: #C68642;
    position: absolute;
    top: 36px;
    border: 1px solid #8B4513;
}

.arm.left {
    left: 0;
}

.arm.right {
    right: 0;
}

.leg {
    width: 12px;
    height: 24px;
    background: #4A90E2;
    position: absolute;
    top: 64px;
    border: 1px solid #2E5C8A;
}

.leg.left {
    left: 6px;
}

.leg.right {
    right: 6px;
}

/* Falling Letters */
.falling-letters {
    position: absolute;
    width: 100%;
    height: 100vh;
    pointer-events: none;
    top: 0;
    left: 0;
}

.letter {
    position: absolute;
    font-size: 48px;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 2px 2px 0px #000, -2px -2px 0px #000, 2px -2px 0px #000, -2px 2px 0px #000;
    background: rgba(255, 255, 255, 0.9);
    border: 3px solid #8B4513;
    border-radius: 10px;
    padding: 10px;
    min-width: 60px;
    text-align: center;
    animation: fall 3s linear;
    z-index: 50;
}

.letter.correct {
    animation: mineBreak 0.6s ease-out;
    background: #4CAF50;
    color: white;
}

.letter.incorrect {
    animation: shake 0.3s ease-in-out;
    background: #F44336;
    color: white;
}

.letter.breaking {
    animation: mineBreak 0.6s ease-out;
}

@keyframes fall {
    0% { transform: translateY(-100px); }
    100% { transform: translateY(calc(100vh - 100px)); }
}

@keyframes mineBreak {
    0% { 
        transform: scale(1) rotate(0deg); 
        opacity: 1; 
        filter: brightness(1);
    }
    20% { 
        transform: scale(1.1) rotate(5deg); 
        opacity: 0.9; 
        filter: brightness(1.2);
    }
    40% { 
        transform: scale(0.9) rotate(-5deg); 
        opacity: 0.8; 
        filter: brightness(0.8);
    }
    60% { 
        transform: scale(0.7) rotate(10deg); 
        opacity: 0.6; 
        filter: brightness(0.6);
    }
    80% { 
        transform: scale(0.4) rotate(-10deg); 
        opacity: 0.3; 
        filter: brightness(0.4);
    }
    100% { 
        transform: scale(0.1) rotate(15deg); 
        opacity: 0; 
        filter: brightness(0.2);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Game Over Screen */
.game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    z-index: 2000;
    border: 3px solid #FFD700;
}

.game-over h2 {
    font-size: 36px;
    margin-bottom: 20px;
    color: #FFD700;
}

.game-over p {
    font-size: 24px;
    margin-bottom: 30px;
}

.game-over button {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 20px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Minecraft', monospace;
    transition: background 0.3s;
}

.game-over button:hover {
    background: #45a049;
}

/* Instructions */
.instructions {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px;
    border-radius: 10px;
    font-size: 14px;
    max-width: 250px;
    border: 2px solid #555;
}

.instructions h3 {
    color: #FFD700;
    margin-bottom: 10px;
}

.instructions p {
    margin-bottom: 5px;
    line-height: 1.4;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hud {
        font-size: 18px;
        gap: 15px;
    }
    
    .letter {
        font-size: 36px;
        min-width: 50px;
        padding: 8px;
    }
    
    .instructions {
        font-size: 12px;
        max-width: 200px;
    }
} 