/* Terminal Styles - Main Theme */

:root {
    /* Color Themes */
    --bg-primary: #0a0a0a;
    --text-primary: #00ff00;
    --text-glow: #00ff00;
    --text-secondary: #00cc00;
    --accent: #00ff00;
    --error: #ff0000;
    --warning: #ffff00;
    --ok: #00ff88;

    /* Fonts */
    --font-mono: 'VT323', 'Share Tech Mono', monospace;

    /* Effects */
    --glow-size: 0 0 5px var(--text-glow), 0 0 10px var(--text-glow);
    --scan-speed: 8s;
}

/* Alternative Themes */
body.theme-amber {
    --bg-primary: #1a1000;
    --text-primary: #ff9900;
    --text-glow: #ff9900;
    --text-secondary: #cc7700;
    --accent: #ffcc00;
}

body.theme-matrix {
    --bg-primary: #000000;
    --text-primary: #00ff41;
    --text-glow: #00ff41;
    --text-secondary: #008f11;
    --accent: #00ff41;
}

/* Base Styles */
html {
    height: 100%;
    overflow-x: hidden;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 1.2rem;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* CRT Effects Base Layers */
.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 9998;
}

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0),
        rgba(255, 255, 255, 0.03)
    );
    background-size: 100% 3px;
    animation: scanline var(--scan-speed) linear infinite;
    pointer-events: none;
    z-index: 9997;
}

.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        ellipse at center,
        transparent 0%,
        rgba(0, 0, 0, 0.3) 70%,
        rgba(0, 0, 0, 0.7) 100%
    );
    pointer-events: none;
    z-index: 9996;
}

/* Matrix Rain Canvas */
#matrix-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.1;
}

/* Code Stream Background */
#code-stream {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    opacity: 0.05;
    overflow: hidden;
    pointer-events: none;
}

/* Terminal Container */
#terminal-container {
    position: relative;
    z-index: 100;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    padding-top: 2rem;
    min-height: 100vh;
    top: 0;
}

/* Boot Sequence */
#boot-sequence {
    animation: fadeIn 0.5s ease-in;
}

.boot-line {
    margin: 0.5rem 0;
    opacity: 0;
    animation: fadeInLine 0.3s ease-in forwards;
    font-size: 1.1rem;
}

.boot-line:nth-child(1) { animation-delay: 0.2s; }
.boot-line:nth-child(2) { animation-delay: 0.6s; }
.boot-line:nth-child(3) { animation-delay: 1.0s; }
.boot-line:nth-child(4) { animation-delay: 1.4s; }
.boot-line:nth-child(5) { animation-delay: 1.8s; }
.boot-line:nth-child(6) { animation-delay: 2.2s; }
.boot-line:nth-child(7) { animation-delay: 2.6s; }
.boot-line:nth-child(8) { animation-delay: 3.2s; }
.boot-line:nth-child(9) { animation-delay: 3.8s; }

.boot-ok {
    color: var(--ok);
    text-shadow: var(--glow-size);
}

.boot-progress .dots::after {
    content: '...';
    animation: dots 1s steps(3, end) infinite;
}

.boot-ready {
    color: var(--accent);
    text-shadow: var(--glow-size);
    font-weight: bold;
}

/* Terminal */
#terminal {
    animation: fadeIn 0.8s ease-in;
}

/* ASCII Logo */
.ascii-art {
    color: var(--text-primary);
    text-shadow: var(--glow-size);
    font-size: 0.6rem;
    line-height: 1.2;
    margin: 1rem 0;
    animation: glitchText 0.3s ease-in;
    overflow-x: auto;
}

.tagline {
    color: var(--accent);
    text-shadow: var(--glow-size);
    font-size: 1.3rem;
    text-align: center;
    margin: 1rem 0;
    letter-spacing: 0.1em;
    animation: flicker 2s infinite alternate;
}

.subtitle {
    color: var(--text-secondary);
    text-align: center;
    font-size: 1rem;
    margin-bottom: 2rem;
    opacity: 0.8;
}

/* Output Area */
#output {
    margin: 2rem 0;
    min-height: 200px;
    padding-bottom: 120px; /* Extra space to avoid footer overlap */
}

.output-line {
    margin: 0.5rem 0;
    animation: typeIn 0.05s steps(1);
}

.command-echo {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.command-echo .prompt {
    color: var(--accent);
}

.error-msg {
    color: var(--error);
    text-shadow: 0 0 5px var(--error);
}

.success-msg {
    color: var(--ok);
    text-shadow: 0 0 5px var(--ok);
}

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

/* AI Messages */
.ai-message {
    position: fixed;
    bottom: 80px;
    right: 20px;
    max-width: 400px;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid var(--accent);
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1000;
    pointer-events: none;
}

.ai-message.show {
    opacity: 1;
}

.ai-message::before {
    content: '[AI_CORE]: ';
    color: var(--accent);
    font-weight: bold;
}

/* Input Line */
.input-line {
    display: flex;
    align-items: center;
    margin-top: 2rem;
    margin-bottom: 3rem;
    position: relative;
}

.prompt {
    color: var(--accent);
    text-shadow: var(--glow-size);
    margin-right: 0.5rem;
    white-space: nowrap;
}

#terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 1.2rem;
    caret-color: transparent;
}

.cursor {
    color: var(--accent);
    animation: blink 1s step-end infinite;
    margin-left: 0.2rem;
}

/* Content Sections */
.section-header {
    color: var(--accent);
    text-shadow: var(--glow-size);
    font-size: 1.4rem;
    margin: 1rem 0;
    border-bottom: 1px solid var(--accent);
    padding-bottom: 0.5rem;
}

/* Operator Profiles */
.operator {
    margin: 1rem 0;
    padding: 1rem;
    border-left: 2px solid var(--accent);
    padding-left: 1rem;
}

.operator-header {
    color: var(--accent);
    font-size: 1.3rem;
    text-shadow: var(--glow-size);
    margin-bottom: 0.5rem;
}

.operator-info {
    color: var(--text-primary);
    margin: 0.3rem 0;
    padding-left: 1rem;
}

.operator-quote {
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 0.5rem;
    padding-left: 1rem;
}

.combined-stats {
    padding: 1rem;
    background: rgba(0, 255, 0, 0.05);
    border: 1px solid var(--accent);
    margin-top: 1rem;
}

.combined-stats div {
    margin: 0.3rem 0;
}

/* Service Modules */
.service-module {
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid var(--text-secondary);
    background: rgba(0, 255, 0, 0.02);
}

.module-name {
    color: var(--accent);
    font-size: 1.2rem;
    text-shadow: var(--glow-size);
    margin-bottom: 0.5rem;
}

.module-desc {
    color: var(--text-primary);
    font-style: italic;
    margin: 0.5rem 0;
    opacity: 0.9;
}

.module-features {
    color: var(--text-secondary);
    margin-top: 0.8rem;
    line-height: 1.8;
    padding-left: 1rem;
}

/* Portfolio */
.portfolio-notice {
    color: var(--warning);
    text-shadow: 0 0 5px var(--warning);
    font-style: italic;
}

.project-file {
    margin: 1rem 0;
    padding: 1rem;
    border-left: 3px solid var(--accent);
    padding-left: 1rem;
    transition: all 0.3s ease;
}

.project-file:hover {
    background: rgba(0, 255, 0, 0.05);
    border-left-width: 5px;
}

.file-name {
    color: var(--accent);
    font-size: 1.2rem;
    text-shadow: var(--glow-size);
    margin-bottom: 0.3rem;
}

.file-meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0.3rem 0;
}

.file-desc {
    color: var(--text-primary);
    margin-top: 0.5rem;
}

/* Contact Form */
.contact-intro {
    color: var(--text-primary);
    margin: 0.5rem 0;
}

.form-group {
    margin: 1.5rem 0;
}

.form-label {
    color: var(--accent);
    display: block;
    margin-bottom: 0.5rem;
    text-shadow: var(--glow-size);
}

.form-input,
.form-textarea {
    width: 100%;
    background: rgba(0, 255, 0, 0.05);
    border: 1px solid var(--accent);
    color: var(--text-primary);
    padding: 0.8rem;
    font-family: var(--font-mono);
    font-size: 1.1rem;
    outline: none;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
    background: rgba(0, 255, 0, 0.1);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
    border-color: var(--text-primary);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-submit {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-family: var(--font-mono);
    text-shadow: var(--glow-size);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.form-submit:hover {
    background: rgba(0, 255, 0, 0.1);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
    transform: scale(1.05);
}

.form-submit:active {
    transform: scale(0.98);
}

#form-response {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid var(--ok);
    display: none;
}

#form-response.show {
    display: block;
    animation: fadeIn 0.5s ease;
}

.contact-alt {
    margin-top: 2rem;
    padding: 1rem;
    border-top: 1px solid var(--text-secondary);
    color: var(--text-secondary);
}

.contact-alt div {
    margin: 0.5rem 0;
}

/* Scroll Bar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--accent);
    box-shadow: inset 0 0 5px rgba(0, 255, 0, 0.5);
}

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

/* Selection */
::selection {
    background: var(--accent);
    color: var(--bg-primary);
}

::-moz-selection {
    background: var(--accent);
    color: var(--bg-primary);
}

/* ═══════════════════════════════════════════════════════════════ */
/* UNDERGROUND ASCII ART STYLES */
/* ═══════════════════════════════════════════════════════════════ */

.underground-art {
    font-family: 'Share Tech Mono', monospace;
    color: var(--accent);
    text-shadow: 0 0 5px var(--text-glow);
    line-height: 1.2;
    margin: 1em 0;
    padding: 1em;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--accent);
    border-radius: 3px;
    overflow-x: auto;
    white-space: pre;
}

/* Ambient messages container */
#ambient-messages {
    transition: opacity 0.5s ease;
}

/* Floating characters */
.floating-char {
    animation: float-up 3s ease-out forwards;
}

@keyframes float-up {
    from {
        transform: translateY(0);
        opacity: 0.2;
    }
    to {
        transform: translateY(-100px);
        opacity: 0;
    }
}
