* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
    color: #fff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    max-width: 900px;
    width: 100%;
    background: rgba(25, 25, 35, 0.9);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #3498db;
}

header h1 {
    font-size: 2.8rem;
    color: #3498db;
    text-shadow: 0 0 10px rgba(52, 152, 219, 0.7);
    margin-bottom: 10px;
}

header .subtitle {
    font-size: 1.1rem;
    color: #bdc3c7;
    font-style: italic;
}

.game-area {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 25px;
}

.stats-container {
    display: flex;
    justify-content: space-around;
    background: rgba(0, 0, 0, 0.4);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.stat-label {
    font-size: 1rem;
    color: #95a5a6;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #2ecc71;
}

.canvas-container {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    border: 3px solid #2c3e50;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.7);
    background: #0c2461;
}

#gameCanvas {
    display: block;
    width: 100%;
}

.game-over, .start-screen, .pause-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 10;
    padding: 20px;
}

.game-over h2, .start-screen h2, .pause-screen h2 {
    font-size: 2.5rem;
    color: #e74c3c;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(231, 76, 60, 0.7);
}

.start-screen h2 {
    color: #3498db;
    text-shadow: 0 0 10px rgba(52, 152, 219, 0.7);
}

.pause-screen h2 {
    color: #f39c12;
    text-shadow: 0 0 10px rgba(243, 156, 18, 0.7);
}

.btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    margin: 10px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.btn:hover {
    background: linear-gradient(135deg, #2980b9 0%, #1f6396 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.btn:active {
    transform: translateY(1px);
}

.start-btn {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    padding: 15px 30px;
    font-size: 1.3rem;
    margin-top: 20px;
}

.start-btn:hover {
    background: linear-gradient(135deg, #27ae60 0%, #219653 100%);
}

.player-name-input {
    margin: 20px 0;
    text-align: left;
    width: 100%;
    max-width: 400px;
}

.player-name-input label {
    display: block;
    margin-bottom: 10px;
    font-size: 1.2rem;
    color: #ecf0f1;
}

.player-name-input input {
    width: 100%;
    padding: 12px 15px;
    font-size: 1.1rem;
    border: 2px solid #3498db;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    outline: none;
}

.player-name-input input:focus {
    border-color: #2ecc71;
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.5);
}

.name-error {
    color: #e74c3c;
    margin-top: 8px;
    font-size: 0.9rem;
    display: none;
}

.controls {
    background: rgba(0, 0, 0, 0.4);
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.controls h3 {
    color: #3498db;
    margin-bottom: 10px;
}

.controls p {
    margin: 8px 0;
    color: #bdc3c7;
}

.controls-info {
    background: rgba(0, 0, 0, 0.4);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.controls-info h3 {
    color: #3498db;
    margin-bottom: 15px;
    font-size: 1.3rem;
    text-align: center;
}

.airplanes-preview {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 10px;
}

@media (min-width: 768px) {
    .airplanes-preview {
        grid-template-columns: repeat(4, 1fr);
    }
}

.airplane-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.airplane-icon {
    width: 60px;
    height: 70px;
    position: relative;
}

.player-plane::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;/* Dodatkowe style dla wyników */
.scores-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.refresh-btn {
    background: transparent;
    color: #3498db;
    border: 2px solid #3498db;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.refresh-btn:hover {
    background: #3498db;
    color: white;
    transform: rotate(90deg);
}

.refresh-btn.refreshing {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.airplane-desc {
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-top: 5px;
}

.game-over-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Responsywność dla telefonów */
@media (max-width: 600px) {
    .airplanes-preview {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .game-over-buttons {
        flex-direction: column;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 1rem;
    }
}
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    clip-path: polygon(50% 0%, 100% 33%, 100% 67%, 50% 100%, 0% 67%, 0% 33%);
}

.enemy-red::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    clip-path: polygon(50% 100%, 100% 67%, 100% 33%, 50% 0%, 0% 33%, 0% 67%);
}

.enemy-blue::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    clip-path: polygon(50% 100%, 100% 67%, 100% 33%, 50% 0%, 0% 33%, 0% 67%);
}

.enemy-green::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    clip-path: polygon(50% 100%, 100% 67%, 100% 33%, 50% 0%, 0% 33%, 0% 67%);
}

.airplane-preview p {
    font-size: 0.9rem;
    color: #bdc3c7;
    text-align: center;
}

.scores-container {
    background: rgba(0, 0, 0, 0.4);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(52, 152, 219, 0.3);
    margin-bottom: 25px;
}

.scores-container h3 {
    color: #f1c40f;
    margin-bottom: 15px;
    font-size: 1.5rem;
    text-align: center;
}

#highScores {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.score-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
    background: rgba(44, 62, 80, 0.6);
    border-radius: 5px;
    border-left: 4px solid #3498db;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.score-name {
    font-weight: bold;
    color: #ecf0f1;
}

.score-value {
    color: #2ecc71;
    font-weight: bold;
}

.no-scores {
    text-align: center;
    color: #95a5a6;
    font-style: italic;
    padding: 20px;
}

footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #95a5a6;
    font-size: 0.9rem;
}

/* Responsywność */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .stats-container {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .canvas-container {
        border-width: 2px;
    }
    
    .game-over h2, .start-screen h2, .pause-screen h2 {
        font-size: 1.8rem;
    }
}/* Responsywność dla gry */
@media (max-width: 768px) {
    .container {
        padding: 15px;
        margin: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .stats-container {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .stat {
        min-width: 45%;
    }
    
    .enemy-stats {
        grid-template-columns: 1fr;
    }
    
    .difficulty-options {
        flex-direction: column;
    }
    
    .difficulty-option {
        min-width: 100%;
    }
    
    .level-desc {
        flex-direction: column;
        gap: 5px;
    }
    
    .game-over-buttons,
    .level-complete-buttons,
    .pause-buttons {
        flex-direction: column;
    }
    
    .level-complete h2,
    .start-screen h2,
    .game-over h2,
    .pause-screen h2 {
        font-size: 1.8rem;
    }
    
    .level-bonus {
        font-size: 1.2rem;
        padding: 10px 20px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }
    
    .stat-value {
        font-size: 1.2rem;
    }
    
    .level-info {
        min-width: 80px;
        font-size: 0.9rem;
    }
}