/* ============================================
   TERMINAL CSS v4.0 - Integrated Cinematic & Interactive
   ============================================ */

:root {
    /* Colors - High contrast for readability */
    --term-bg: #0d1117;
    --term-text: #e6edf3;           /* High contrast white */
    --term-text-dim: #7d8590;       /* Muted gray */
    --term-accent: #f0883e;         /* Warm orange accent */
    --term-success: #3fb950;
    --term-error: #f85149;
    --term-info: #58a6ff;
    --term-border: #30363d;
    --term-header-bg: #161b22;
    
    /* Typography */
    --term-font: 'JetBrains Mono', 'SF Mono', 'Consolas', monospace;
    --term-font-size: 15px;
    --term-line-height: 1.6;
}

/* ============================================
   OVERLAY
   ============================================ */
.terminal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.terminal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

/* ============================================
   TERMINAL WINDOW
   ============================================ */
.terminal-window {
    width: 700px;
    height: 520px;
    max-width: 95vw;
    max-height: 90vh;
    background: var(--term-bg);
    border: 1px solid var(--term-border);
    border-radius: 12px;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.3s ease;
    position: relative;
    cursor: pointer;
}

.terminal-overlay.open .terminal-window {
    transform: scale(1);
}

/* Scanline effect */
.terminal-window::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
    pointer-events: none;
    z-index: 10;
}

/* ============================================
   HEADER
   ============================================ */
.terminal-header {
    background: var(--term-header-bg);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--term-border);
}

.terminal-header span {
    font-family: var(--term-font);
    font-size: 13px;
    color: var(--term-text-dim);
    font-weight: 600;
    letter-spacing: 0.05em;
}

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

.term-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}
.term-btn:hover { opacity: 1; }
.term-close { background: #f85149; }
.term-min { background: #d29922; }
.term-max { background: #3fb950; }

/* ============================================
   BODY & CONTENT
   ============================================ */
.terminal-body {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    overflow-x: hidden;
    font-family: var(--term-font);
    font-size: var(--term-font-size);
    line-height: var(--term-line-height);
    color: var(--term-text);
    scroll-behavior: smooth;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.terminal-line {
    margin-bottom: 6px;
    min-height: 1.6em;
    white-space: pre-wrap;
    word-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
}

/* Styles */
.highlight { color: #fff; background: rgba(240, 136, 62, 0.2); padding: 2px 8px; border-radius: 4px; }
.success { color: var(--term-success); }
.error { color: var(--term-error); }
.info { color: var(--term-info); }
.dim { color: var(--term-text-dim); }
.accent { color: var(--term-accent); }

/* ============================================
   LAUNCHER / MENU
   ============================================ */
.launcher-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.launcher-logo {
    font-family: var(--term-font);
    font-size: 12px;
    line-height: 1.2;
    color: var(--term-accent);
    margin-bottom: 40px;
    white-space: pre;
}

.launcher-options {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

.launcher-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--term-border);
    padding: 20px 40px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

.launcher-btn:hover {
    background: rgba(240, 136, 62, 0.1);
    border-color: var(--term-accent);
    transform: translateY(-2px);
}

.btn-icon {
    display: block;
    font-size: 24px;
    margin-bottom: 10px;
}

.btn-label {
    display: block;
    font-family: var(--term-font);
    font-size: 14px;
    font-weight: 700;
    color: var(--term-text);
    letter-spacing: 0.1em;
}

.btn-sub {
    display: block;
    font-size: 11px;
    color: var(--term-text-dim);
    margin-top: 5px;
}

.launcher-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.launcher-btn.disabled:hover {
    transform: none;
    border-color: var(--term-border);
    background: rgba(255,255,255,0.05);
}

/* ============================================
   CINEMATIC CAPTIONS (Bottom Bar) - REMOVED
   ============================================ */

/* ============================================
   INTERACTIVE PROMPT - REMOVED
   ============================================ */

/* Realistic Mechanical Keycap */
.keycap-container {
    margin-top: 2rem;
    text-align: center;
    padding-bottom: 20px;
    perspective: 500px;
    width: 100%;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Invisible larger hit area around button */
.keycap-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 60px;
    height: 50px;
    background: linear-gradient(to bottom, #ffffff 0%, #e6e6e6 100%);
    border-radius: 6px;
    box-shadow:
        0 4px 0 #bbb,
        0 5px 10px rgba(0,0,0,0.2),
        inset 0 1px 0 rgba(255,255,255,1),
        inset 0 -1px 0 rgba(255,255,255,0.5);
    color: #333;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 700;
    line-height: 50px;
    text-align: center;
    text-transform: uppercase;
    cursor: pointer;
    user-select: none;
    transition: all 0.05s ease-out;
    transform-style: preserve-3d;
    border: 1px solid #d4d4d4;
}

/* Larger invisible clickable area */
.keycap-btn::after {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    cursor: pointer;
}

/* The top face of the key (concave effect) */
.keycap-btn::before {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 6px;
    border-radius: 4px;
    background: linear-gradient(to bottom, #f9f9f9 0%, #ffffff 100%);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
    z-index: 1;
}

/* The text label */
.keycap-btn span {
    position: relative;
    z-index: 2;
    display: block;
    transform: translateY(-1px);
    color: #555;
    text-shadow: 0 1px 0 rgba(255,255,255,1);
}

/* Active State (Pressed) */
.keycap-btn:active {
    transform: translateY(4px);
    box-shadow: 
        0 0 0 #bbb, 
        0 0 2px rgba(0,0,0,0.2),
        inset 0 1px 0 rgba(255,255,255,0.8);
}

/* Audience Selection Grid */
.audience-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 40px;
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeIn 1s forwards;
    width: 100%;
}

.audience-col {
    border: 1px solid var(--term-border);
    padding: 20px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    flex-direction: column;
}

.audience-header {
    color: var(--term-accent);
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.audience-text {
    color: var(--term-text);
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 15px;
    flex-grow: 1;
}

.audience-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.audience-list li {
    color: var(--term-text-dim);
    font-size: 12px;
    margin-bottom: 8px;
    padding-left: 15px;
    position: relative;
}

.audience-list li::before {
    content: "›";
    position: absolute;
    left: 0;
    color: var(--term-info);
}

.audience-btn {
    background: transparent;
    border: 1px solid var(--term-info);
    color: var(--term-info);
    padding: 10px 15px;
    font-family: var(--term-font);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    text-align: center;
    text-decoration: none;
    display: block;
    margin-top: auto;
}

.audience-btn:hover {
    background: rgba(88, 166, 255, 0.1);
    box-shadow: 0 0 10px rgba(88, 166, 255, 0.2);
}

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

/* ============================================
   MOBILE STYLES
   ============================================ */
@media (max-width: 768px) {
    .terminal-window {
        width: 95%;
        height: 480px;
    }

    .terminal-body {
        padding: 20px;
        font-size: 14px;
    }

    .terminal-line {
        white-space: normal;
        word-break: break-word;
        overflow-wrap: break-word;
    }
}

@media (max-width: 600px) {
    .terminal-overlay {
        padding: 10px;
        align-items: center;
    }

    .terminal-window {
        width: 100%;
        height: 85vh;
        max-height: 600px;
        border-radius: 12px;
        margin: 0;
    }

    .terminal-header {
        padding: 10px 15px;
    }

    .terminal-header span {
        font-size: 10px;
        letter-spacing: 0.02em;
    }

    .terminal-body {
        padding: 16px;
        font-size: 12px;
        line-height: 1.8;
    }

    .terminal-line {
        margin-bottom: 10px;
        white-space: normal;
        word-break: break-word;
        text-indent: 0;
    }

    /* Fix highlight on mobile */
    .highlight {
        display: inline;
        padding: 2px 6px;
        font-size: 11px;
    }

    /* Fix info/success/accent labels */
    .info, .success, .accent {
        display: block;
        margin-top: 12px;
        font-size: 11px;
    }

    .keycap-container {
        margin-top: 1rem;
    }

    .keycap-btn {
        width: 50px;
        height: 40px;
        line-height: 40px;
        font-size: 12px;
    }

    .audience-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-top: 20px;
        margin-bottom: 20px;
    }
}

/* Extra small screens */
@media (max-width: 380px) {
    .terminal-body {
        padding: 12px;
        font-size: 11px;
    }

    .terminal-header span {
        font-size: 9px;
    }

    .highlight, .info, .success, .accent {
        font-size: 10px;
    }
}