* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Orbitron', 'Arial', sans-serif;
}

body {
    background: #0a0e17;
    color: #ffffff;
    overflow: hidden;
    height: 100vh;
}

/* Fond étoilé avec nébuleuse */
.space-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(31, 40, 85, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(56, 29, 89, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 40% 80%, rgba(19, 54, 84, 0.3) 0%, transparent 50%),
        linear-gradient(to bottom, #0a0e17, #0f1423, #151b30);
    z-index: -2;
}

.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.star {
    position: absolute;
    background-color: #fff;
    border-radius: 50%;
}

/* Écran d'accueil */
.welcome-screen {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    padding: 20px;
}

.title-container {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.main-title {
    font-size: 5rem;
    font-weight: 800;
    background: linear-gradient(to right, #4cc9f0, #4361ee, #7209b7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(76, 201, 240, 0.5);
    margin-bottom: 10px;
    letter-spacing: 4px;
    line-height: 1.2;
}

.subtitle {
    font-size: 1.5rem;
    color: #b8c1ec;
    letter-spacing: 2px;
    margin-bottom: 30px;
}

.mission-badge {
    display: inline-block;
    background: rgba(67, 97, 238, 0.2);
    border: 1px solid #4361ee;
    border-radius: 20px;
    padding: 8px 20px;
    font-size: 0.9rem;
    color: #b8c1ec;
    margin-top: 10px;
}

.start-button {
    background: linear-gradient(135deg, #4361ee, #3a0ca3);
    color: white;
    border: none;
    padding: 18px 50px;
    font-size: 1.3rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(67, 97, 238, 0.5);
    margin-top: 30px;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
}

.start-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(67, 97, 238, 0.7);
}

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

.start-button::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 20%;
    height: 200%;
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(30deg);
    transition: all 0.5s;
}

.start-button:hover::after {
    left: 120%;
}

.rules-container {
    background: rgba(11, 16, 30, 0.8);
    border: 1px solid rgba(67, 97, 238, 0.3);
    border-radius: 15px;
    padding: 30px;
    margin: 20px auto;
    max-width: 800px;
    max-height: 400px;
    overflow-y: auto;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #b8c1ec;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 30px rgba(0, 10, 50, 0.5);
    display: none;
}

.typewriter {
    white-space: pre-wrap;
    overflow: hidden;
}

.player-input {
    background: rgba(11, 16, 30, 0.8);
    border: 1px solid #4361ee;
    border-radius: 10px;
    padding: 15px 20px;
    color: white;
    font-size: 1.1rem;
    width: 300px;
    margin: 20px 0;
    text-align: center;
    backdrop-filter: blur(5px);
}

.player-input::placeholder {
    color: #6c757d;
}

.launch-button {
    background: linear-gradient(135deg, #f72585, #b5179e);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(247, 37, 133, 0.5);
    margin-top: 20px;
    letter-spacing: 2px;
    display: none;
}

.launch-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(247, 37, 133, 0.7);
}

.planet {
    position: absolute;
    border-radius: 50%;
    z-index: -1;
}

#planet1 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle at 30% 30%, #3a0ca3, #240046);
    top: 10%;
    left: 5%;
    box-shadow: 0 0 50px rgba(58, 12, 163, 0.5);
}

#planet2 {
    width: 150px;
    height: 150px;
    background: radial-gradient(circle at 30% 30%, #4361ee, #3a0ca3);
    bottom: 15%;
    right: 8%;
    box-shadow: 0 0 40px rgba(67, 97, 238, 0.5);
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(67, 97, 238, 0.5);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 30px rgba(67, 97, 238, 0.8);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(67, 97, 238, 0.5);
    }
}

/* Écran de jeu */
.game-screen {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 10;
    display: flex;
    flex-direction: column;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: rgba(11, 16, 30, 0.7);
    border-bottom: 1px solid rgba(67, 97, 238, 0.3);
    backdrop-filter: blur(10px);
}

.player-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.player-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #4cc9f0;
}

.timer {
    font-size: 1.5rem;
    font-weight: 800;
    color: #f72585;
    background: rgba(247, 37, 133, 0.1);
    padding: 5px 15px;
    border-radius: 10px;
    border: 1px solid #f72585;
}

.turn-indicator {
    font-size: 1.3rem;
    font-weight: 700;
    color: #b8c1ec;
    background: rgba(67, 97, 238, 0.2);
    padding: 10px 25px;
    border-radius: 50px;
    border: 1px solid #4361ee;
}

.battlefield {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px;
    position: relative;
}

.player-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.left-side {
    align-items: flex-start;
}

.right-side {
    align-items: flex-end;
}

/* Vaisseau principal */
.main-ship {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.ship-body {
    width: 120px;
    height: 180px;
    position: relative;
    display: flex;
    justify-content: center;
}

.ship-core {
    width: 80px;
    height: 120px;
    background: linear-gradient(135deg, #4361ee, #3a0ca3);
    border-radius: 40px 40px 20px 20px;
    position: relative;
    box-shadow: 0 0 20px rgba(67, 97, 238, 0.7);
}

.ship-wings {
    position: absolute;
    bottom: 0;
    width: 120px;
    height: 60px;
    background: linear-gradient(135deg, #7209b7, #560bad);
    clip-path: polygon(0% 0%, 100% 0%, 80% 100%, 20% 100%);
    border-radius: 10px;
}

.ship-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.ship-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #b8c1ec;
}

.health-bar {
    width: 120px;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(67, 97, 238, 0.5);
}

.health-fill {
    height: 100%;
    background: linear-gradient(90deg, #4cc9f0, #4361ee);
    transition: width 0.5s ease;
}

.health-text {
    font-size: 0.9rem;
    color: #b8c1ec;
}

/* Drones */
.drones-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.drone {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid;
}

.drone:hover {
    transform: scale(1.1);
}

.drone.attacker {
    background: radial-gradient(circle at 30% 30%, #f72585, #b5179e);
    border-color: #f72585;
    box-shadow: 0 0 15px rgba(247, 37, 133, 0.5);
}

.drone.protector {
    background: radial-gradient(circle at 30% 30%, #4cc9f0, #4361ee);
    border-color: #4cc9f0;
    box-shadow: 0 0 15px rgba(76, 201, 240, 0.5);
}

.drone.incendiary {
    background: radial-gradient(circle at 30% 30%, #f8961e, #f3722c);
    border-color: #f8961e;
    box-shadow: 0 0 15px rgba(248, 150, 30, 0.5);
}

.drone.toxic {
    background: radial-gradient(circle at 30% 30%, #90be6d, #43aa8b);
    border-color: #90be6d;
    box-shadow: 0 0 15px rgba(144, 190, 109, 0.5);
}

.drone.multitarget {
    background: radial-gradient(circle at 30% 30%, #ffd166, #ff9e00);
    border-color: #ffd166;
    box-shadow: 0 0 15px rgba(255, 209, 102, 0.5);
}

.drone.selected {
    border-color: #ffeb3b;
    box-shadow: 0 0 20px #ffeb3b;
}

.drone-icon {
    font-size: 1.5rem;
    color: white;
}

.drone-stats {
    position: absolute;
    bottom: -25px;
    font-size: 0.7rem;
    text-align: center;
    color: #b8c1ec;
}

/* Panneau d'action */
.action-panel {
    padding: 20px 40px;
    background: rgba(11, 16, 30, 0.7);
    border-top: 1px solid rgba(67, 97, 238, 0.3);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.action-info {
    font-size: 1.2rem;
    color: #b8c1ec;
    text-align: center;
}

.targets-container {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.target {
    padding: 10px 20px;
    background: rgba(67, 97, 238, 0.2);
    border: 1px solid #4361ee;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #b8c1ec;
}

.target:hover {
    background: rgba(67, 97, 238, 0.4);
}

.target.selected {
    background: rgba(255, 235, 59, 0.2);
    border-color: #ffeb3b;
    color: #ffeb3b;
}

.action-button {
    background: linear-gradient(135deg, #f72585, #b5179e);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(247, 37, 133, 0.5);
}

.action-button:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(247, 37, 133, 0.7);
}

.action-button:disabled {
    background: #6c757d;
    cursor: not-allowed;
    box-shadow: none;
}

/* Responsive */
@media (max-width: 768px) {
    .main-title {
        font-size: 3rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .rules-container {
        padding: 20px;
        margin: 10px;
    }
    
    .game-header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
    }
    
    .battlefield {
        padding: 20px;
        flex-direction: column;
        gap: 40px;
    }
    
    .player-side {
        align-items: center !important;
    }
}