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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.game-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 20px;
    max-width: 600px;
    width: 100%;
}

.header {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.boss-fight-button {
    padding: 8px 20px;
    font-size: 0.95em;
    background: linear-gradient(135deg, #FF4444 0%, #8B0000 100%);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(139, 0, 0, 0.3);
}

.boss-fight-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 68, 68, 0.5);
}

.boss-fight-button:active {
    transform: translateY(0);
}

.shop-button {
    position: absolute;
    top: 0;
    right: 0;
    padding: 8px 20px;
    font-size: 1em;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #333;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-weight: bold;
}

.shop-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

.header h1 {
    color: #333;
    font-size: 2.5em;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.stats {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.stat .label {
    font-size: 0.9em;
    color: #666;
    font-weight: bold;
}

.stat span:last-child {
    font-size: 1.5em;
    color: #667eea;
    font-weight: bold;
}

.game-area {
    position: relative;
    width: 100%;
    background: #87CEEB;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.1);
}

#gameCanvas {
    display: block;
    width: 100%;
    height: auto;
    background: linear-gradient(to bottom, #87CEEB 0%, #98D8C8 50%, #87CEEB 100%);
}

.start-screen,
.game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 10;
    min-width: 250px;
}

.start-screen h2,
.game-over h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 2em;
}

.start-screen p,
.game-over p {
    color: #666;
    margin: 10px 0;
    font-size: 1.1em;
}

.hint {
    color: #ff6b6b !important;
    font-weight: bold;
    font-size: 1em !important;
}

.start-screen button,
.game-over button {
    margin-top: 20px;
    padding: 12px 30px;
    font-size: 1.1em;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-weight: bold;
}

.start-screen button:hover,
.game-over button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.start-screen button:active,
.game-over button:active {
    transform: translateY(0);
}

.hidden {
    display: none !important;
}

.controls {
    margin-top: 15px;
    text-align: center;
}

.instructions {
    color: #666;
    font-size: 0.95em;
}

#finalScore,
#finalHighScore {
    color: #667eea;
    font-weight: bold;
    font-size: 1.2em;
}

/* Shop Styles */
.shop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.shop-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1002;
}

.shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
    position: relative;
}

.shop-header h2 {
    color: #333;
    font-size: 2em;
}

.shop-header p {
    color: #667eea;
    font-size: 1.2em;
    font-weight: bold;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #ff6b6b;
    color: white;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
    z-index: 1001;
}

.close-btn:hover {
    transform: scale(1.1);
}

.shop-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.shop-item {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    border: 3px solid #e0e0e0;
    transition: transform 0.2s, box-shadow 0.2s;
}

.shop-item.unlocked {
    border-color: #4CAF50;
}

.shop-item.equipped {
    border-color: #667eea;
    background: #e8f0fe;
}

.shop-item.locked {
    opacity: 0.7;
}

.shop-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.shop-animal-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 10px;
    border: 3px solid #333;
}

.shop-item h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.shop-item .price {
    color: #FFD700;
    font-weight: bold;
    font-size: 1.1em;
    margin: 10px 0;
}

.shop-item button {
    padding: 8px 20px;
    font-size: 0.9em;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.2s;
    width: 100%;
}

.buy-btn {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #333;
}

.buy-btn:hover {
    transform: scale(1.05);
}

.equip-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.equip-btn:hover {
    transform: scale(1.05);
}

.shop-item.equipped .equip-btn {
    background: #4CAF50;
    cursor: default;
}

