/* Jurassic Escape 2 - Enhanced Terminal Game Styling */

/* Game wrapper - fits within Apollo theme layout */
.jurassic-escape2-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: 'Courier New', monospace;
    padding: 20px;
    border: 1px solid #444444;
    border-radius: 4px;
    position: relative;
}

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

/* Game screen with enhanced terminal aesthetic */
.game-screen2 {
    color: #ffffff;
    font-family: 'Courier New', 'Lucida Console', monospace;
    font-size: 12px;
    line-height: 1.1;
    white-space: pre;
    margin: 0;
    padding: 10px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #333333;
    box-shadow: 
        0 0 20px rgba(255, 255, 255, 0.1),
        inset 0 0 20px rgba(0, 0, 0, 0.5);
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.8);
    position: relative;
    max-width: 100%;
    overflow: auto;
}

/* Story screen specific styling */
.story-screen {
    color: #27c3b8;
    font-family: 'Courier New', 'Lucida Console', monospace;
    font-size: 13px;
    line-height: 1.3;
    white-space: pre;
    margin: 0;
    padding: 20px;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #27c3b8;
    box-shadow: 
        0 0 30px rgba(39, 195, 184, 0.3),
        inset 0 0 20px rgba(0, 0, 0, 0.8);
    text-shadow: 0 0 3px rgba(39, 195, 184, 0.7);
    position: relative;
    max-width: 100%;
    overflow: auto;
}

/* Enhanced character colors */
.player-char {
    color: #27c3b8;
    text-shadow: 0 0 5px #27c3b8;
}

.enemy-char {
    color: #ff6666;
    text-shadow: 0 0 3px #ff6666;
}

.boss-char {
    color: #ff4444;
    text-shadow: 0 0 5px #ff4444;
    font-weight: bold;
}

.tranquilized-char {
    color: #888888;
    text-shadow: 0 0 2px #888888;
}

.weapon-char {
    color: #ffdd44;
    text-shadow: 0 0 3px #ffdd44;
}

.health-char {
    color: #44ff44;
    text-shadow: 0 0 3px #44ff44;
}

.story-highlight {
    color: #ffaa00;
    text-shadow: 0 0 4px #ffaa00;
}

/* CRT effect overlay */
.game-screen2::before,
.story-screen::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.03) 2px,
            rgba(255, 255, 255, 0.03) 4px
        );
    pointer-events: none;
    z-index: 1;
}

/* Phosphor glow effect */
.game-screen2::after,
.story-screen::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        ellipse at center,
        transparent 0%,
        rgba(0, 0, 0, 0.4) 100%
    );
    pointer-events: none;
    z-index: 2;
}

/* Enhanced flicker animation */
@keyframes enhanced-flicker {
    0% { opacity: 0.98; }
    2% { opacity: 1; }
    4% { opacity: 0.97; }
    6% { opacity: 1; }
    8% { opacity: 0.99; }
    10% { opacity: 1; }
    12% { opacity: 0.98; }
    14% { opacity: 1; }
    16% { opacity: 0.96; }
    18% { opacity: 1; }
    20% { opacity: 0.99; }
    100% { opacity: 0.98; }
}

.game-screen2,
.story-screen {
    animation: enhanced-flicker 12s infinite;
}

/* Typing effect for story text */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

.typing-text {
    overflow: hidden;
    border-right: 2px solid #27c3b8;
    white-space: nowrap;
    animation: typing 3s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: #27c3b8; }
}

/* Enhanced scanline animation */
@keyframes advanced-scanlines {
    0% {
        background-position: 0 0;
        opacity: 0.1;
    }
    50% {
        opacity: 0.15;
    }
    100% {
        background-position: 0 20px;
        opacity: 0.1;
    }
}

.jurassic-escape2-wrapper::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(39, 195, 184, 0.02) 25%,
        transparent 50%,
        rgba(39, 195, 184, 0.02) 75%,
        transparent 100%
    );
    background-size: 100% 8px;
    animation: advanced-scanlines 10s linear infinite;
    pointer-events: none;
    z-index: 1;
}

/* Status bar enhancements */
.status-bar {
    background: rgba(39, 195, 184, 0.1);
    border: 1px solid #27c3b8;
    padding: 2px;
    margin: 2px 0;
}

.health-bar {
    color: #44ff44;
    text-shadow: 0 0 3px #44ff44;
}

.ammo-bar {
    color: #ffdd44;
    text-shadow: 0 0 3px #ffdd44;
}

.danger-bar {
    color: #ff6666;
    text-shadow: 0 0 3px #ff6666;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .game-screen2,
    .story-screen {
        font-size: 9px;
        padding: 5px;
        line-height: 1.0;
    }
    
    .jurassic-escape2-wrapper {
        padding: 10px;
        min-height: 50vh;
    }
}

/* Special level transition effects */
.level-transition {
    background: linear-gradient(
        45deg,
        rgba(39, 195, 184, 0.1) 0%,
        transparent 50%,
        rgba(39, 195, 184, 0.1) 100%
    );
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* Boss battle screen effects */
.boss-screen {
    border: 2px solid #ff4444;
    box-shadow: 
        0 0 40px rgba(255, 68, 68, 0.5),
        inset 0 0 20px rgba(0, 0, 0, 0.8);
    animation: enhanced-flicker 3s infinite, pulse 1.5s ease-in-out infinite;
}

/* Hide scrollbars */
.jurassic-escape2-wrapper,
#game-console2,
.game-screen2,
.story-screen {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.jurassic-escape2-wrapper::-webkit-scrollbar,
#game-console2::-webkit-scrollbar,
.game-screen2::-webkit-scrollbar,
.story-screen::-webkit-scrollbar {
    display: none;
}