/* Stellar Pursuit - Vector Graphics Space Combat Game */

/* Game wrapper - fits within Apollo theme layout */
.stellar-pursuit-wrapper {
    background: #000000;
    background-image:
        repeating-linear-gradient(
            0deg,
            rgba(0, 0, 0, 0.95) 0px,
            rgba(0, 0, 0, 0.95) 2px,
            rgba(32, 32, 32, 0.2) 2px,
            rgba(32, 32, 32, 0.2) 4px
        );
    font-family: 'VT323', 'Courier New', monospace;
    padding: 20px;
    border: 1px solid #444444;
    border-radius: 4px;
    position: relative;
    min-height: 600px;
}

/* Game console container */
#stellar-game-console {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Canvas element for vector graphics */
#game-canvas {
    background: #000000;
    border: 2px solid #27c3b8;
    box-shadow:
        0 0 20px rgba(39, 195, 184, 0.3),
        inset 0 0 30px rgba(0, 0, 0, 0.8);
    display: block;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

/* Title screen styling */
.title-screen {
    color: #ffffff;
    font-family: 'VT323', 'Courier New', monospace;
    font-size: 16px;
    line-height: 1.2;
    white-space: pre;
    margin: 0;
    padding: 20px;
    text-align: center;
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.8);
    position: relative;
    z-index: 3;
}

.title-screen h1 {
    color: #27c3b8;
    font-size: 24px;
    text-shadow:
        0 0 5px #27c3b8,
        0 0 10px #27c3b8,
        0 0 15px #27c3b8;
    margin-bottom: 20px;
    letter-spacing: 4px;
}

.title-screen .subtitle {
    color: #ffffff;
    font-size: 14px;
    margin-bottom: 30px;
    opacity: 0.8;
}

.title-screen .controls {
    color: #27c3b8;
    font-size: 12px;
    margin-top: 30px;
    line-height: 1.6;
}

.title-screen .highlight {
    color: #27c3b8;
    text-shadow: 0 0 5px #27c3b8;
}

/* HUD overlay for in-game UI */
.game-hud {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    color: #27c3b8;
    font-family: 'VT323', 'Courier New', monospace;
    font-size: 14px;
    text-shadow: 0 0 3px #27c3b8;
    pointer-events: none;
    z-index: 10;
}

.hud-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.hud-shields,
.hud-hull,
.hud-torpedoes {
    background: rgba(0, 0, 0, 0.7);
    padding: 5px 10px;
    border: 1px solid #27c3b8;
}

.hud-bottom {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
}

.hud-score,
.hud-sector {
    background: rgba(0, 0, 0, 0.7);
    padding: 5px 10px;
    border: 1px solid #27c3b8;
}

/* Game over / Victory screens */
.game-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #27c3b8;
    padding: 30px;
    text-align: center;
    color: #ffffff;
    font-family: 'VT323', 'Courier New', monospace;
    font-size: 18px;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
    z-index: 20;
    min-width: 400px;
}

.game-message h2 {
    color: #27c3b8;
    font-size: 28px;
    text-shadow: 0 0 10px #27c3b8;
    margin-bottom: 20px;
    letter-spacing: 3px;
}

.game-message.game-over h2 {
    color: #ff6666;
    text-shadow: 0 0 10px #ff6666;
}

.game-message .stats {
    margin: 20px 0;
    font-size: 14px;
    line-height: 1.8;
}

.game-message .instructions {
    margin-top: 20px;
    font-size: 12px;
    color: #27c3b8;
}

/* CRT scanline effect */
.stellar-pursuit-wrapper::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(255, 255, 255, 0.01) 50%,
        transparent 100%
    );
    background-size: 100% 4px;
    animation: scanlines 8s linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes scanlines {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 0 10px;
    }
}

/* Flicker animation for CRT authenticity */
@keyframes flicker {
    0% { opacity: 0.97; }
    5% { opacity: 1; }
    10% { opacity: 0.98; }
    50% { opacity: 0.99; }
    100% { opacity: 0.97; }
}

.stellar-pursuit-wrapper {
    animation: flicker 8s infinite;
}

/* Phosphor glow effect on canvas */
#game-canvas {
    filter: brightness(1.05) contrast(1.1);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .stellar-pursuit-wrapper {
        padding: 10px;
        min-height: 400px;
    }

    #game-canvas {
        max-width: 100%;
        height: auto;
    }

    .title-screen {
        font-size: 12px;
        padding: 10px;
    }

    .title-screen h1 {
        font-size: 18px;
    }

    .game-hud {
        font-size: 11px;
    }

    .game-message {
        min-width: 280px;
        padding: 20px;
        font-size: 14px;
    }

    .game-message h2 {
        font-size: 20px;
    }
}

/* Hide scrollbars */
.stellar-pursuit-wrapper,
#stellar-game-console {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.stellar-pursuit-wrapper::-webkit-scrollbar,
#stellar-game-console::-webkit-scrollbar {
    display: none;
}

/* Starfield background animation (optional subtle effect) */
@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Loading indicator */
.loading {
    color: #27c3b8;
    font-family: 'VT323', 'Courier New', monospace;
    font-size: 18px;
    text-align: center;
    padding: 50px;
    text-shadow: 0 0 5px #27c3b8;
}

.loading::after {
    content: '...';
    animation: loading-dots 1.5s infinite;
}

@keyframes loading-dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}
