/* Core styles and animations */
@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

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

body {
    background-color: #000;
    color: #00ff00;
    font-family: 'VT323', monospace;
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.terminal-header {
    background: linear-gradient(90deg, #001100, #002200, #001100);
    padding: 10px;
    border-bottom: 2px solid #00ff00;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: glow 2s infinite alternate;
}

@keyframes glow {
    from { box-shadow: 0 0 5px #00ff00; }
    to { box-shadow: 0 0 15px #00ff00, 0 0 25px #00ff00; }
}

.terminal-title {
    font-size: 24px;
    text-shadow: 0 0 10px #00ff00;
    letter-spacing: 2px;
}

.terminal-stats {
    display: flex;
    gap: 20px;
    font-size: 18px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-bar {
    width: 100px;
    height: 15px;
    border: 1px solid #00ff00;
    background: #001100;
    position: relative;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff00, #00aa00);
    transition: width 0.3s;
}

.terminal-body {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.sidebar {
    width: 220px;
    background: rgba(0, 20, 0, 0.8);
    border-right: 1px solid #00ff00;
    padding: 15px;
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 20px;
}

.sidebar-title {
    font-size: 20px;
    margin-bottom: 10px;
    text-decoration: underline;
    color: #00ffaa;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    overflow-y: auto;
}

.game-screen {
    display: none;
    animation: fadeIn 0.5s;
}

.game-screen.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.terminal-output {
    background: rgba(0, 10, 0, 0.7);
    border: 1px solid #00ff00;
    padding: 15px;
    margin-bottom: 20px;
    min-height: 200px;
    white-space: pre-wrap;
    line-height: 1.6;
    font-size: 18px;
}

.static-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.05;
    background-image: 
        repeating-linear-gradient(0deg, #000, #000 2px, #00ff00 2px, #00ff00 4px),
        repeating-linear-gradient(90deg, #000, #000 2px, #00ff00 2px, #00ff00 4px);
    animation: static 0.2s infinite;
    z-index: 999;
}

@keyframes static {
    0%, 100% { opacity: 0.05; }
    50% { opacity: 0.1; }
}

.glitch-text {
    animation: glitch 2s infinite;
}

@keyframes glitch {
    0%, 100% { text-shadow: 2px 2px 0 #ff0000, -2px -2px 0 #00ffff; }
    25% { text-shadow: -2px 2px 0 #ff0000, 2px -2px 0 #00ffff; }
    50% { text-shadow: 2px -2px 0 #ff0000, -2px 2px 0 #00ffff; }
    75% { text-shadow: -2px -2px 0 #ff0000, 2px 2px 0 #00ffff; }
}

.max-headroom {
    color: #ffff00;
    text-shadow: 0 0 10px #ffff00;
}

.control-buttons {
    display: flex;
    gap: 10px;
}

.control-button {
    background: rgba(0, 30, 0, 0.9);
    border: 1px solid #00ff00;
    color: #00ff00;
    padding: 8px 15px;
    cursor: pointer;
    font-family: 'VT323', monospace;
    font-size: 16px;
    transition: all 0.2s;
}

.control-button:hover {
    background: rgba(0, 100, 0, 0.7);
    box-shadow: 0 0 10px #00ff00;
}

.xp-bar {
    width: 100%;
    height: 25px;
    background: #001100;
    border: 2px solid #00ff00;
    margin: 15px 0;
    position: relative;
}

.xp-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ffff, #0099cc);
    transition: width 0.5s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-weight: bold;
}

.level-display {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #ffff00;
    font-size: 18px;
}

.episode-indicator {
    background: rgba(255, 255, 0, 0.1);
    border: 1px solid #ffff00;
    padding: 10px;
    margin-bottom: 15px;
    text-align: center;
    color: #ffff00;
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 8px;
    background: rgba(0, 30, 0, 0.5);
    border: 1px solid #00ff00;
    font-size: 16px;
}

.breadcrumb-item {
    cursor: pointer;
    transition: all 0.2s;
}

.breadcrumb-item:hover {
    color: #00ffff;
}

.breadcrumb-separator {
    color: #666;
}

.quick-travel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 30, 0, 0.9);
    border: 2px solid #00ff00;
    padding: 10px;
    z-index: 100;
}

.quick-travel-button {
    background: rgba(0, 50, 0, 0.7);
    border: 1px solid #00ff00;
    color: #00ff00;
    padding: 8px 15px;
    margin: 5px;
    cursor: pointer;
    font-family: 'VT323', monospace;
    font-size: 16px;
    transition: all 0.2s;
}

.quick-travel-button:hover {
    background: rgba(0, 100, 0, 0.7);
    box-shadow: 0 0 10px #00ff00;
}

.notification {
    position: fixed;
    top: 80px;
    right: 20px;
    background: rgba(0, 50, 0, 0.9);
    border: 2px solid #00ff00;
    padding: 15px;
    max-width: 300px;
    animation: slideIn 0.5s, slideOut 0.5s 2.5s forwards;
    z-index: 1000;
}

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@keyframes slideOut {
    from { transform: translateX(0); }
    to { transform: translateX(100%); }
}