/* ============================================
   CRYSTAL CODE - TERMINAL LAUNCHER (HACKER STYLE)
   Emerald Green / Retro CRT Aesthetic
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');

.launcher-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    font-family: 'Share Tech Mono', monospace;
    color: #10b981;
    overflow: hidden;
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1), visibility 1s;
}

.launcher-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* --- CRT Effects --- */
.launcher-overlay::before {
    content: " ";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), 
                linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
    z-index: 10001;
}

.launcher-overlay::after {
    content: " ";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(16, 185, 129, 0.03);
    pointer-events: none;
    z-index: 10002;
    animation: flicker 0.15s infinite;
}

@keyframes flicker {
    0% { opacity: 0.27861; }
    5% { opacity: 0.34769; }
    10% { opacity: 0.23604; }
    15% { opacity: 0.90626; }
    20% { opacity: 0.18128; }
    25% { opacity: 0.83891; }
    30% { opacity: 0.65583; }
    35% { opacity: 0.67807; }
    40% { opacity: 0.26559; }
    45% { opacity: 0.84693; }
    50% { opacity: 0.96019; }
    55% { opacity: 0.08594; }
    60% { opacity: 0.20313; }
    65% { opacity: 0.71988; }
    70% { opacity: 0.53455; }
    75% { opacity: 0.37288; }
    80% { opacity: 0.71428; }
    85% { opacity: 0.70419; }
    90% { opacity: 0.7003; }
    95% { opacity: 0.36108; }
    100% { opacity: 0.24387; }
}

.terminal-header {
    border-bottom: 2px solid #10b981;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.7);
}

.terminal-header h1 {
    font-size: 1.5rem;
    margin: 0;
}

.terminal-content {
    flex: 1;
    font-size: 1.1rem;
    line-height: 1.5;
    text-shadow: 0 0 5px rgba(16, 185, 129, 0.5);
}

.log-line {
    margin: 0.2rem 0;
    opacity: 0;
    animation: fadeInLog 0.1s forwards;
}

@keyframes fadeInLog {
    from { opacity: 0; transform: translateX(-5px); }
    to { opacity: 1; transform: translateX(0); }
}

.log-line .timestamp { color: rgba(16, 185, 129, 0.5); margin-right: 1rem; }
.log-line.success { color: #34d399; }
.log-line.warning { color: #f59e0b; }
.log-line.error { color: #ef4444; }

.terminal-menu {
    margin-top: 3rem;
    border-top: 1px solid rgba(16, 185, 129, 0.3);
    padding-top: 2rem;
}

.menu-item {
    padding: 0.5rem 1rem;
    margin: 0.5rem 0;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    width: fit-content;
}

.menu-item:hover, .menu-item.active {
    background: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
    padding-left: 2rem;
}

.menu-item .key-num {
    display: inline-block;
    width: 1.5rem;
    color: #fff;
    font-weight: bold;
    margin-right: 1rem;
}

/* SCANLINE animation */
.scanline {
    width: 100%;
    height: 100px;
    z-index: 10003;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0) 0%, rgba(16, 185, 129, 0.05) 50%, rgba(0, 0, 0, 0) 100%);
    opacity: 0.1;
    position: absolute;
    bottom: 100%;
    animation: scanline 10s linear infinite;
}

@keyframes scanline {
    0% { bottom: 100%; }
    80% { bottom: 100%; }
    100% { bottom: -100px; }
}

.glitch-text {
    position: relative;
    display: inline-block;
}

.glitch-text::before, .glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
}

.glitch-text::before {
    left: 2px;
    text-shadow: -2px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch-text::after {
    left: -2px;
    text-shadow: -2px 0 #00fff9, 2px 2px #ff00c1;
    animation: glitch-anim2 1s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(31px, 9999px, 94px, 0); transform: skew(0.85deg); }
    5% { clip: rect(70px, 9999px, 71px, 0); transform: skew(0.01deg); }
    /* ... shortened for brevity, I'll provide full version in file write ... */
    100% { clip: rect(67px, 9999px, 62px, 0); transform: skew(0.04deg); }
}
