/* Styles for the space battle modal with fullscreen Phaser.js integration */
/* Following the same visual direction as modalProfile.css */

:root {
    --battle-primary-font: 'Roboto Mono', monospace;
    --battle-accent-font: 'Press Start 2P', cursive;
    --battle-glow-color: #00FFDC;
    --battle-text-primary: #E0F0FF;
    --battle-text-secondary: #A0C0E0;
}

.battle-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.85); /* Match profile modal */
    backdrop-filter: blur(6px); /* Match profile modal */
    transition: opacity 0.4s ease, visibility 0s linear 0.4s; /* Match profile modal */
    opacity: 0;
    visibility: hidden;
}

.battle-modal.visible {
    display: flex;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease; /* Match profile modal */
}

.battle-modal.hidden {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0s linear 0.4s; /* Match profile modal */
}

.battle-modal-content {
    margin: auto;
    width: 95%;
    height: 95%;
    max-width: none;
    max-height: none;
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: 15px; /* Match profile modal */
    overflow: hidden;
    background: linear-gradient(145deg, rgba(10, 25, 40, 0.97), rgba(20, 35, 55, 0.97)); /* Match profile modal */
    border: 1px solid rgba(0, 255, 220, 0.6); /* Match profile modal */
    box-shadow: 0 10px 50px rgba(0, 255, 220, 0.7), 0 0 20px rgba(0,0,0,0.4); /* Match profile modal */
    color: var(--battle-text-primary);
    font-family: var(--battle-primary-font);
}

.battle-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px; /* Match profile modal */
    background-color: rgba(0,0,0,0.3); /* Match profile modal */
    border-bottom: 1px solid rgba(0, 255, 220, 0.4); /* Match profile modal */
    min-height: 60px;
}

.battle-modal-header h3 {
    font-family: var(--battle-accent-font);
    color: var(--battle-glow-color);
    margin: 0;
    font-size: 1.4em; /* Match profile modal */
    font-weight: normal; /* Press Start 2P is already bold */
    text-shadow: 0 0 6px rgba(0, 255, 220, 0.8); /* Match profile modal */
}

.battle-modal-close-button {
    background: none;
    border: none;
    color: var(--battle-text-secondary); /* Match profile modal */
    font-size: 2.2em; /* Match profile modal */
    font-weight: bold;
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
    transition: color 0.2s ease, transform 0.2s ease; /* Match profile modal */
}

.battle-modal-close-button:hover {
    color: var(--battle-glow-color); /* Match profile modal */
    transform: scale(1.1);
}

.battle-modal-close-button:active {
    transform: scale(0.95);
}

.battle-modal-body {
    flex: 1;
    padding: 0;
    position: relative;
    overflow: hidden;
    background: #000;
}

/* Styles pour le jeu Phaser intégré directement */
#game-container {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10, 25, 40, 0.95), rgba(20, 35, 55, 0.95));
    font-family: var(--battle-primary-font);
    position: relative;
}

/* Loading state pour le jeu Phaser */
.battle-modal-body .loading-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--battle-glow-color);
    font-family: var(--battle-accent-font);
    font-size: 14px;
    z-index: 1;
    text-shadow: 0 0 6px rgba(0, 255, 220, 0.8);
    animation: pulse 2s infinite;
}

/* Note: Phaser utilise son propre système de rendu (WebGL/Canvas) */
/* Les styles CSS ne s'appliquent pas aux éléments Phaser dans le jeu */
/* Seuls les éléments DOM externes au canvas Phaser peuvent utiliser CSS */

/* JWT Status indicator */
.jwt-status-indicator {
    position: absolute;
    top: 20px;
    left: 20px;
    background: linear-gradient(145deg, rgba(10, 25, 40, 0.9), rgba(20, 35, 55, 0.9));
    border: 1px solid var(--battle-glow-color);
    border-radius: 20px;
    padding: 8px 16px;
    color: var(--battle-glow-color);
    font-family: var(--battle-primary-font);
    font-size: 0.8em;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(3px);
}

.jwt-status-icon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--battle-glow-color);
    box-shadow: 0 0 6px var(--battle-glow-color);
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Mobile responsiveness - match profile modal */
@media (max-width: 480px) {
    .battle-modal-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
        border: none;
        margin: 0; /* Remove margin on mobile */
    }
    
    .battle-modal-header {
        padding: 15px 20px 20px; /* Match profile modal */
    }
    
    .battle-modal-header h3 {
        font-size: 1.2em; /* Match profile modal */
    }
    
    .battle-modal-close-button {
        font-size: 2em; /* Match profile modal */
    }
    
    .battle-modal-body::before {
        font-size: 12px;
    }

    .ship-selection-panel {
        width: 250px;
        top: 10px;
        right: 10px;
        padding: 12px;
    }

    .jwt-status-indicator {
        font-size: 0.7em;
        padding: 6px 12px;
    }
}

/* Tablet responsiveness */
@media (max-width: 1024px) and (min-width: 481px) {
    .battle-modal-content {
        width: 98%;
        height: 98%;
    }

    .battle-modal-header h3 {
        font-size: 1.3em;
    }

    .ship-selection-panel {
        width: 260px;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .battle-modal-header h3 {
        text-shadow: 0 0 6px rgba(0, 255, 220, 0.8), 0 0 12px rgba(0, 255, 220, 0.4); /* Match profile modal */
    }
}

/* Focus states for accessibility */
.battle-modal-close-button:focus {
    outline: 2px solid var(--battle-glow-color); /* Match profile modal */
    outline-offset: 2px;
}

/* Ensure the modal is above everything else */
.battle-modal {
    z-index: 10000;
}

/* Override any conflicting styles */
.battle-modal * {
    box-sizing: border-box;
} 