body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: url('war ship.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
}

.missile {
    transition: none;
    transform-origin: center;
    filter: drop-shadow(0 0 3px rgba(255, 255, 0, 0.8));
}

#game-area {
    position: relative;
    overflow: visible;
}

@keyframes explode {
    0% {
        transform: scale(0.5);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.8;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

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

header {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}

header h1 {
    margin: 0 0 10px 0;
    color: #2c3e50;
}

#resources {
    display: flex;
    justify-content: center;
    gap: 30px;
    font-size: 16px;
    font-weight: bold;
}

#resources span {
    padding: 5px 10px;
    background: rgba(52, 152, 219, 0.2);
    border-radius: 5px;
}

main {
    display: flex;
    gap: 20px;
}

#buildings-panel {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 10px;
    width: 300px;
    height: fit-content;
}

#buildings-panel h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
}

#buildings-panel button {
    display: block;
    width: 100%;
    padding: 10px;
    margin: 5px 0;
    border: none;
    border-radius: 5px;
    background: #3498db;
    color: white;
    cursor: pointer;
    font-size: 14px;
}

#buildings-panel button:hover {
    background: #2980b9;
}

#buildings-panel button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

#game-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#land-area, #sea-area, #enemy-area, #land-defense, #enemy-dock-area, #air-force {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 10px;
}

#land-area {
    background: url('dock.png') center/cover;
}

#sea-area {
    background: url('your fleat.png') center/cover;
}

#land-defense {
    background: url('yourtanks.png') center/cover;
}

#air-force {
    background: url('yourairforce.png') center/cover;
}

#enemy-area {
    background: url('yourenemy.png') center/cover;
    border: 2px solid #e74c3c;
}

#enemy-dock-area {
    background: url('enemydock.png') center/cover;
    border: 2px solid #e74c3c;
}

#land-area h3, #sea-area h3, #enemy-area h3, #land-defense h3, #enemy-dock-area h3, #air-force h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
}

#enemy-area h3, #enemy-dock-area h3 {
    color: #c0392b;
}

#buildings-grid, #ships-grid, #enemy-grid, #tanks-grid, #planes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    min-height: 150px;
    border: 2px dashed #bdc3c7;
    padding: 10px;
    border-radius: 5px;
}

#enemy-grid {
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.05);
}

.building, .ship, .enemy, .tank, .plane {
    width: 60px;
    height: 60px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    position: relative;
}

.building {
    background: rgba(46, 204, 113, 0.2);
    border: 2px solid #27ae60;
}

.ship {
    background: rgba(52, 152, 219, 0.2);
    border: 2px solid #2980b9;
}

.tank {
    background: rgba(155, 89, 182, 0.2);
    border: 2px solid #8e44ad;
}

.plane {
    background: rgba(241, 196, 15, 0.2);
    border: 2px solid #f39c12;
}

.enemy {
    background: rgba(231, 76, 60, 0.2);
    border: 2px solid #e74c3c;
}

#attack-button {
    margin-top: 10px;
    padding: 10px 20px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
}

#attack-button:hover {
    background: #c0392b;
}

#attack-button:disabled, #attack-dock-button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

#attack-dock-button {
    margin-top: 10px;
    padding: 10px 20px;
    background: #e67e22;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
}

#attack-dock-button:hover {
    background: #d35400;
}

#enemy-dock {
    background: rgba(231, 76, 60, 0.2);
    border: 2px solid #c0392b;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 10px;
}

#enemy-dock div {
    margin: 5px 0;
    font-weight: bold;
}

.building:hover, .ship:hover, .enemy:hover, .tank:hover, .plane:hover {
    transform: scale(1.1);
    transition: transform 0.2s;
}

.production-counter {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#status {
    background: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
    text-align: center;
    color: #2c3e50;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #27ae60;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    animation: slideIn 0.3s ease-in;
    z-index: 1000;
}

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@keyframes explosion {
    0% { 
        transform: scale(0.5);
        opacity: 1;
        background: radial-gradient(circle, #ff4444 0%, #ff6600 30%, #ffaa00 60%, #ffff00 100%);
        box-shadow: 0 0 30px #ff4444, 0 0 60px #ff6600, 0 0 90px #ffaa00;
    }
    25% {
        transform: scale(1.2);
        opacity: 0.9;
        background: radial-gradient(circle, #ff6600 0%, #ffaa00 40%, #ffff00 70%, #ffffff 100%);
        box-shadow: 0 0 40px #ff6600, 0 0 80px #ffaa00, 0 0 120px #ffff00;
    }
    50% { 
        transform: scale(1.8);
        opacity: 0.8;
        background: radial-gradient(circle, #ffaa00 0%, #ffff00 50%, #ffffff 80%, #ffcccc 100%);
        box-shadow: 0 0 50px #ffaa00, 0 0 100px #ffff00, 0 0 150px #ffffff;
    }
    75% {
        transform: scale(2.2);
        opacity: 0.4;
        background: radial-gradient(circle, #ffff00 0%, #ffffff 40%, #cccccc 70%, #999999 100%);
        box-shadow: 0 0 30px #ffff00, 0 0 60px #ffffff, 0 0 90px #cccccc;
    }
    100% { 
        transform: scale(2.5);
        opacity: 0;
        background: radial-gradient(circle, #cccccc 0%, #999999 50%, #666666 100%);
        box-shadow: 0 0 10px #cccccc;
    }
}

@keyframes muzzleFlash {
    0% { 
        opacity: 1;
        transform: scale(1);
        background: radial-gradient(circle, #ffffff 0%, #ffff00 20%, #ff6600 50%, #ff4444 80%);
        box-shadow: 0 0 20px #ffffff, 0 0 40px #ffff00, 0 0 60px #ff6600;
    }
    50% {
        opacity: 0.8;
        transform: scale(1.3);
        background: radial-gradient(circle, #ffff00 0%, #ff6600 30%, #ff4444 60%, #cc0000 90%);
        box-shadow: 0 0 30px #ffff00, 0 0 50px #ff6600, 0 0 70px #ff4444;
    }
    100% { 
        opacity: 0;
        transform: scale(1.8);
        background: radial-gradient(circle, #ff6600 0%, #ff4444 40%, #cc0000 70%, #990000 100%);
        box-shadow: 0 0 10px #ff6600;
    }
}

@keyframes projectile {
    0% { 
        transform: translateX(0) translateY(0) scale(1);
        opacity: 1;
        background: radial-gradient(circle, #ffffff 0%, #ffff00 30%, #ff6600 70%);
        box-shadow: 0 0 15px #ffffff, 0 0 25px #ffff00, 0 0 35px #ff6600;
    }
    50% {
        transform: translateX(calc(var(--deltaX) * 0.5)) translateY(calc(var(--deltaY) * 0.5)) scale(1.2);
        opacity: 0.8;
        background: radial-gradient(circle, #ffff00 0%, #ff6600 40%, #ff4444 80%);
        box-shadow: 0 0 20px #ffff00, 0 0 30px #ff6600, 0 0 40px #ff4444;
    }
    100% { 
        transform: translateX(var(--deltaX)) translateY(var(--deltaY)) scale(0.8);
        opacity: 0;
        background: radial-gradient(circle, #ff6600 0%, #ff4444 50%, #cc0000 100%);
        box-shadow: 0 0 10px #ff6600;
    }
}

.explosion-effect {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    animation: explosion 0.8s ease-out;
    pointer-events: none;
    z-index: 1000;
}

.muzzle-flash {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    animation: muzzleFlash 0.3s ease-out;
    pointer-events: none;
    z-index: 999;
}

.projectile-effect {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: projectile 0.8s linear;
    pointer-events: none;
    z-index: 998;
}

.battle-shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-2px); }
    20%, 40%, 60%, 80% { transform: translateX(2px); }
}