/* DataFence DLP Hacking Game Styles */

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --text-primary: #00ff00;
    --text-secondary: #00cc00;
    --text-dim: #008800;
    --accent: #ff0066;
    --warning: #ffaa00;
    --terminal-bg: #000000;
    --border-color: #00ff00;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
    background-image: 
        repeating-linear-gradient(
            0deg,
            rgba(0, 255, 0, 0.03),
            rgba(0, 255, 0, 0.03) 1px,
            transparent 1px,
            transparent 2px
        );
}

.game-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: var(--bg-secondary);
    border-bottom: 2px solid var(--border-color);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
}

.logo {
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 0 10px var(--text-primary);
    animation: glitch 2s infinite;
}

.stats {
    display: flex;
    gap: 30px;
}

.stats > div {
    font-size: 18px;
    text-shadow: 0 0 5px var(--text-secondary);
}

/* Life Bar */
.life-bar-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.life-bar-container label {
    font-size: 14px;
}

.life-bar {
    position: relative;
    width: 200px;
    height: 20px;
    background-color: #1a1a1a;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.life-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #ff0000 0%, #ffaa00 50%, #00ff00 100%);
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.life-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: bold;
    color: #000;
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.8);
}

.life-bar-fill.critical {
    animation: pulse 0.5s infinite;
}

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

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    padding: 20px;
    gap: 20px;
    overflow: hidden;
}

/* Terminal */
.terminal-container {
    flex: 2;
    background-color: var(--terminal-bg);
    border: 2px solid var(--border-color);
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.2);
}

.terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.terminal-title {
    font-size: 14px;
}

.terminal-controls {
    display: flex;
    gap: 10px;
}

.control {
    cursor: pointer;
    font-size: 16px;
    transition: color 0.2s;
}

.control:hover {
    color: var(--accent);
}

.terminal-body {
    flex: 1;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.6;
    scroll-behavior: smooth;
}

#terminal-output {
    padding: 20px;
}

.terminal-input-line {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background-color: var(--terminal-bg);
    border-top: 1px solid var(--border-color);
}

.prompt {
    color: var(--text-secondary);
}

.terminal-input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    outline: none;
}

.terminal-input::placeholder {
    color: #ffff00;
    opacity: 1;
    font-style: normal;
    font-weight: bold;
    font-size: 16px;
    text-shadow: 0 0 10px #ffff00, 0 0 20px #ffff00;
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Terminal text effects */
.success {
    color: var(--text-primary);
}

.error {
    color: var(--accent);
}

.warning {
    color: var(--warning);
}

.info {
    color: var(--text-secondary);
}

/* Side Panel */
.side-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mission-briefing, .video-briefing-inline {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 15px;
}

.inventory {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 15px;
    height: 150px;  /* Reduced height to show only 2 items */
    display: flex;
    flex-direction: column;
}

.mission-briefing h3, .inventory h3, .video-briefing-inline h3 {
    margin-bottom: 10px;
    color: var(--text-primary);
    text-shadow: 0 0 5px var(--text-primary);
}

.inventory h3 {
    flex-shrink: 0;  /* Don't let the header shrink */
}

#mission-text {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary);
}


#inventory-list {
    flex: 1;  /* Take remaining space */
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
    min-height: 0;  /* Allow it to shrink */
}

/* Custom scrollbar for inventory list */
#inventory-list::-webkit-scrollbar {
    width: 8px;
}

#inventory-list::-webkit-scrollbar-track {
    background: rgba(0, 255, 0, 0.05);
    border-radius: 4px;
}

#inventory-list::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 0, 0.3);
    border-radius: 4px;
}

#inventory-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 0, 0.5);
}

.inventory-item {
    padding: 8px 10px;
    margin: 4px 0;
    background-color: rgba(0, 255, 0, 0.1);
    border-left: 3px solid var(--text-primary);
    font-size: 13px;
    flex-shrink: 0;  /* Prevent items from shrinking */
}


/* Game Over Modal */
.game-over-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 0 50px rgba(0, 255, 0, 0.5);
}

.modal-content h2 {
    font-size: 36px;
    margin-bottom: 20px;
    text-shadow: 0 0 20px var(--text-primary);
}

.final-stats {
    margin-bottom: 30px;
}

.final-stats p {
    font-size: 20px;
    margin: 10px 0;
}

.leaderboard-form {
    margin-bottom: 20px;
}

.leaderboard-form h3 {
    margin-bottom: 15px;
}

.leaderboard-form input {
    display: block;
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    background-color: var(--terminal-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: inherit;
    border-radius: 5px;
}

.btn-submit, .btn-play-again, .btn-leaderboard {
    padding: 12px 30px;
    margin: 10px;
    background-color: var(--terminal-bg);
    border: 2px solid var(--text-primary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
}

.btn-submit:hover, .btn-play-again:hover, .btn-leaderboard:hover {
    background-color: var(--text-primary);
    color: var(--terminal-bg);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.8);
}

/* Video Briefing Inline */
.video-briefing-inline {
    width: 100%;
}

.video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background-color: #000;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
}

#briefingVideo {
    width: 100%;
    height: 100%;
    display: none;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
}

.static-noise {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(
            0deg,
            rgba(0, 255, 0, 0.1),
            rgba(0, 255, 0, 0.1) 1px,
            transparent 1px,
            transparent 2px
        );
    animation: static 0.2s infinite;
}

@keyframes static {
    0% { transform: translateY(0); }
    100% { transform: translateY(2px); }
}

.video-status {
    font-size: 14px;
    color: var(--text-primary);
    text-shadow: 0 0 10px var(--text-primary);
    z-index: 1;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

.video-caption {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
    padding: 5px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 3px;
}

/* Animations */
@keyframes glitch {
    0% {
        text-shadow: 0 0 10px var(--text-primary);
    }
    25% {
        text-shadow: -2px 0 var(--accent), 2px 0 var(--text-secondary);
    }
    50% {
        text-shadow: 2px 0 var(--accent), -2px 0 var(--text-secondary);
    }
    75% {
        text-shadow: 0 0 10px var(--text-primary);
    }
    100% {
        text-shadow: 0 0 10px var(--text-primary);
    }
}

.typing-effect {
    overflow: hidden;
    white-space: nowrap;
    animation: typing 0.5s steps(40, end);
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes pulse-glow {
    0%, 100% {
        opacity: 1;
        text-shadow: 0 0 10px #ffff00, 0 0 20px #ffff00;
    }
    50% {
        opacity: 0.7;
        text-shadow: 0 0 20px #ffff00, 0 0 40px #ffff00, 0 0 60px #ffff00;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--terminal-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--text-dim);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Screen Size Warning */
body.screen-too-small .game-container {
    display: none !important;
}

.screen-size-warning {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.warning-content {
    background-color: var(--bg-secondary);
    border: 2px solid var(--accent);
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 0 50px rgba(255, 0, 102, 0.5);
    animation: warningPulse 2s infinite;
}

@keyframes warningPulse {
    0% { box-shadow: 0 0 30px rgba(255, 0, 102, 0.5); }
    50% { box-shadow: 0 0 50px rgba(255, 0, 102, 0.8); }
    100% { box-shadow: 0 0 30px rgba(255, 0, 102, 0.5); }
}

.warning-icon {
    font-size: 48px;
    margin-bottom: 20px;
    animation: shake 0.5s infinite;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.warning-content h2 {
    color: var(--accent);
    font-size: 28px;
    margin-bottom: 20px;
    text-shadow: 0 0 10px var(--accent);
}

.warning-content p {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.warning-content strong {
    color: var(--text-primary);
    text-shadow: 0 0 5px var(--text-primary);
}

.current-size {
    color: var(--warning);
    font-weight: bold;
}

.size-requirements {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    gap: 40px;
}

.size-requirements div {
    color: var(--text-primary);
    font-size: 14px;
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background-color: rgba(0, 255, 0, 0.05);
}