/* ================================================================
   AETHERNODE CONNECTOR - TERMINAL DESIGN SYSTEM
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;700&display=swap');

:root {
    --bg-primary: #020608;
    --bg-secondary: #080f14;
    --bg-tertiary: #0d1a22;
    --text-primary: #b8f0c8;
    --text-secondary: #4a8a5e;
    --text-dim: #2a4a35;
    --accent: #00ff88;
    --accent-dim: rgba(0, 255, 136, 0.12);
    --accent-glow: rgba(0, 255, 136, 0.35);
    --accent-border: rgba(0, 255, 136, 0.22);
    
    --danger: #ff3355;
    --warn: #f0a020;
    --success: #00ff88;
    --mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    --scanline: repeating-linear-gradient(0deg, transparent, transparent 2px,
            rgba(0, 0, 0, 0.03) 2px, rgba(0, 0, 0, 0.03) 4px);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
::selection { background: var(--accent-dim); color: var(--accent); }

body {
    background: var(--bg-primary);
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(0, 40, 25, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(0, 20, 40, 0.1) 0%, transparent 50%);
    color: var(--text-primary);
    font-family: var(--mono);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

body::after {
    content: ''; position: fixed; inset: 0; background: var(--scanline);
    pointer-events: none; z-index: 9999; opacity: 0.4;
}

/* ======================================================
   BOOT SEQUENCE
   ====================================================== */
.boot-sequence {
    position: fixed; inset: 0; background: var(--bg-primary);
    z-index: 2000; display: none; padding: 40px; font-family: var(--mono);
    font-size: 0.8rem; color: var(--accent); white-space: pre-wrap;
    text-shadow: 0 0 5px var(--accent-glow); flex-direction: column;
}
.boot-sequence.active { display: flex; }
.cursor { display: inline-block; animation: blink 1s step-end infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ======================================================
   MAIN TERMINAL
   ====================================================== */
.terminal-container {
    width: 90%; max-width: 800px; height: 80vh; max-height: 700px;
    background: var(--bg-secondary); border: 1px solid var(--accent-border);
    box-shadow: 0 0 0 1px rgba(0, 255, 136, .05), 0 0 60px rgba(0, 0, 0, .8), 0 0 30px rgba(0, 20, 10, .5);
    display: flex; flex-direction: column; animation: turnOn 0.5s ease-out forwards;
}

@keyframes turnOn {
    0% { transform: scale(0.98) perspective(1000px) rotateX(2deg); opacity: 0; filter: brightness(2) contrast(1.5); }
    100% { transform: scale(1) perspective(1000px) rotateX(0deg); opacity: 1; filter: brightness(1) contrast(1); }
}

.terminal-header {
    padding: 10px 20px; background: rgba(0, 255, 136, .04); border-bottom: 1px solid var(--accent-border);
    display: flex; justify-content: space-between; align-items: center; flex-shrink: 0;
}

.logo {
    font-size: .8rem; font-weight: 700; color: var(--accent); text-transform: uppercase;
    letter-spacing: 3px; text-shadow: 0 0 10px var(--accent-glow);
}
.logo::before { content: '> '; opacity: .5; }

.terminal-controls { display: flex; gap: 8px; align-items: center; }
.control { width: 11px; height: 11px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .1); }
.red { background: #ff5f56; }
.yellow { background: #ffbd2e; }
.green { background: #27c93f; }

/* ======================================================
   HUB LAYOUT
   ====================================================== */
.hub-layout { flex: 1; display: flex; flex-direction: column; padding: 25px 40px; overflow: hidden; gap: 15px; }

.hub-header { text-align: center; margin-bottom: 5px; }
.hub-header h2 { font-size: 1.5rem; color: var(--text-primary); margin-bottom: 10px; letter-spacing: 4px; text-shadow: 0 0 15px rgba(0,255,136,0.3); }
.hub-subtitle { font-size: 0.75rem; color: var(--text-secondary); letter-spacing: 2px; margin-bottom: 10px; }
.sys-status { font-size: 0.65rem; color: var(--text-dim); }
.status-ok { color: var(--success); text-shadow: 0 0 5px var(--accent-glow); }

.service-grid { display: flex; flex-direction: column; gap: 10px; }

.service-card {
    display: flex; align-items: center; padding: 15px 20px;
    background: rgba(0, 255, 136, 0.02); border: 1px solid var(--accent-border);
    text-decoration: none; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative; overflow: hidden; cursor: crosshair;
}

.service-card::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: var(--accent); transform: scaleY(0); transition: transform 0.3s ease;
    transform-origin: bottom;
}

.service-card:hover {
    background: var(--accent-dim); border-color: var(--accent);
    transform: translateX(10px); box-shadow: 0 0 20px rgba(0, 255, 136, 0.15);
}

.service-card:hover::before { transform: scaleY(1); }

.service-icon {
    font-size: 1.5rem; color: var(--accent); width: 60px; text-align: center;
    font-weight: bold; text-shadow: 0 0 10px var(--accent-glow);
}

.service-info { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.service-info h3 { font-size: 1rem; color: var(--text-primary); letter-spacing: 1px; }
.service-info p { font-size: 0.7rem; color: var(--text-secondary); }

.service-status { font-size: 0.65rem; color: var(--success); padding-right: 20px; }

.service-action {
    font-size: 0.75rem; color: var(--accent); opacity: 0; transform: translateX(-10px); transition: all 0.3s ease;
}
.service-card:hover .service-action { opacity: 1; transform: translateX(0); }

.terminal-logs {
    margin-top: auto; border-top: 1px dashed var(--accent-border); padding-top: 15px;
    font-size: 0.65rem; color: var(--text-dim); display: flex; flex-direction: column; gap: 5px;
}
.log-line { opacity: 0.8; }

/* ======================================================
   FOOTER
   ====================================================== */
footer {
    padding: 10px 20px; background: rgba(0, 255, 136, .03); border-top: 1px solid var(--accent-border);
    display: flex; justify-content: space-between; align-items: center; flex-shrink: 0;
}
.stats { font-size: .62rem; color: var(--text-secondary); letter-spacing: 1px; flex: 1; }
.stat-vault { font-size: .62rem; color: var(--text-secondary); letter-spacing: 1px; }
.stat-id { color: var(--text-primary); }

/* ======================================================
   CONNECTION OVERLAY
   ====================================================== */
.connection-overlay {
    position: fixed; inset: 0; background: rgba(2, 6, 8, 0.9); z-index: 1000;
    display: flex; justify-content: center; align-items: center; backdrop-filter: blur(5px);
}
.connection-box {
    width: 400px; border: 1px solid var(--accent); background: var(--bg-secondary);
    padding: 30px; display: flex; flex-direction: column; gap: 15px;
    box-shadow: 0 0 30px var(--accent-glow), inset 0 0 20px rgba(0,255,136,0.1);
}
.conn-title { color: var(--accent); font-size: 1.2rem; text-align: center; letter-spacing: 3px; animation: blink 1s infinite alternate;}
.conn-target { color: var(--text-primary); font-size: 0.8rem; text-align: center; }
.progress-bar { width: 100%; height: 4px; background: var(--bg-tertiary); border: 1px solid var(--accent-border); overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); width: 0%; box-shadow: 0 0 10px var(--accent); transition: width 0.1s linear;}
.conn-logs { font-size: 0.6rem; color: var(--text-secondary); height: 60px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end;}
