:root {
    /* 60/30/10 Color Matrix */
    --color-base-dark: #124559;
    --color-base-light: #EAFBFF;
    --color-energy-cyan: #00E5FF;
    --color-energy-jade: #00C49A;
    --color-pop-red: #FF6B6B;

    --font-primary: 'Inter', sans-serif;
    --font-mono: 'Space Mono', monospace;
}

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

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #050a0d;
    font-family: var(--font-primary);
    color: var(--color-base-light);
}

/* Macro Environment - Tilt Shift */
.macro-environment {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
}

/* Background Plate with heavy bokeh */
.background-plate {
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    background-image: url('WEBSITE_MEDIA/WEBSITE_TERMINAL.jpeg');
    background-size: cover;
    background-position: center;
    filter: blur(4px) brightness(0.4);
    z-index: 0;
    transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Conduit Grid */
.conduit-grid {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1;
    pointer-events: none;
}

.conduit-line {
    position: absolute;
    background: linear-gradient(90deg, transparent, var(--color-energy-cyan), transparent);
    box-shadow: 0 0 10px var(--color-energy-cyan);
    opacity: 0.3;
}

.conduit-line.horizontal {
    height: 1px;
    width: 100%;
    animation: flowH 5s linear infinite;
}
.conduit-line.vertical {
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, transparent, var(--color-energy-cyan), transparent);
    animation: flowV 6s linear infinite;
}

.conduit-line.top { top: 20%; }
.conduit-line.bottom { bottom: 20%; }
.conduit-line.left { left: 15%; }
.conduit-line.right { right: 15%; }

@keyframes flowH {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
@keyframes flowV {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

/* Central Viewport - Crystalline Foreground Focus */
.viewport-container {
    position: relative;
    z-index: 10;
    width: 90%;
    max-width: 1000px;
    margin: 0 auto;
    transform-style: preserve-3d;
    transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.glass-panel {
    background: rgba(18, 69, 89, 0.2);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(234, 251, 255, 0.1);
    border-radius: 4px;
    padding: 40px;
    box-shadow: 
        0 20px 50px rgba(0,0,0,0.5),
        inset 0 0 0 1px rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    gap: 40px;
    position: relative;
    overflow: hidden;
}

/* Prism Refraction Edge */
.glass-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    box-shadow: inset -2px 0 0px rgba(255, 107, 107, 0.3), inset 2px 0 0px rgba(0, 229, 255, 0.3);
    pointer-events: none;
    border-radius: 4px;
}

/* Typography & Layout */
.sys-header, .sys-footer {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: rgba(234, 251, 255, 0.6);
    border-bottom: 1px solid rgba(234, 251, 255, 0.1);
    padding-bottom: 10px;
}
.sys-footer {
    border-bottom: none;
    border-top: 1px solid rgba(234, 251, 255, 0.1);
    padding-bottom: 0;
    padding-top: 10px;
}

.indicator {
    display: inline-block;
    width: 8px; height: 8px;
    background-color: var(--color-energy-jade);
    border-radius: 50%;
    margin-right: 8px;
    box-shadow: 0 0 8px var(--color-energy-jade);
}
.indicator.blink { animation: blinker 2s linear infinite; }
@keyframes blinker { 50% { opacity: 0.3; } }

.content-matrix {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

h1.chromatic-aberration {
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: 4px;
    color: var(--color-base-light);
    text-shadow: 
        3px 0 0 rgba(255, 107, 107, 0.8),
        -3px 0 0 rgba(0, 229, 255, 0.8);
    margin: 0;
}

.subtitle {
    font-size: 1.2rem;
    letter-spacing: 8px;
    color: var(--color-energy-cyan);
    font-weight: 300;
}

/* Terminal Interface */
.terminal-box {
    width: 100%;
    max-width: 600px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--color-base-dark);
    border-left: 3px solid var(--color-pop-red);
    text-align: left;
    margin-top: 20px;
    font-family: var(--font-mono);
}

.terminal-header {
    background: rgba(18, 69, 89, 0.5);
    padding: 5px 15px;
    font-size: 0.8rem;
    color: var(--color-pop-red);
}

.terminal-body {
    padding: 15px;
    font-size: 0.9rem;
    min-height: 80px;
    display: flex;
}

.typewriter-text {
    color: var(--color-base-light);
    white-space: pre-wrap;
    display: inline;
}

.cursor {
    color: var(--color-energy-cyan);
    animation: blinker 1s linear infinite;
}

/* Buttons */
.action-matrix {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.action-btn {
    background: transparent;
    border: 1px solid var(--color-energy-cyan);
    color: var(--color-energy-cyan);
    padding: 12px 30px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 100%; height: 100%;
    background: rgba(0, 229, 255, 0.2);
    transition: all 0.3s ease;
}

.action-btn:hover::before {
    left: 0;
}

.action-btn:hover {
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.4);
    text-shadow: 0 0 5px var(--color-energy-cyan);
}

.action-btn.primary {
    background: rgba(0, 229, 255, 0.1);
}

.action-btn:active {
    border-color: var(--color-pop-red);
    color: var(--color-pop-red);
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
}

.text-pop {
    color: var(--color-pop-red);
}

/* Video Modal */
.video-modal {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.video-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-backdrop {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(5, 10, 13, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.modal-content {
    width: 90%;
    max-width: 1200px;
    z-index: 101;
    padding: 20px;
}

.video-container {
    width: 100%;
    border: 1px solid var(--color-energy-cyan);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    background: #000;
}

.video-container video {
    width: 100%;
    display: block;
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--color-pop-red);
    font-family: var(--font-mono);
    cursor: pointer;
    font-size: 0.9rem;
    transition: text-shadow 0.2s;
}

.close-btn:hover {
    text-shadow: 0 0 8px var(--color-pop-red);
}



/* Extended Video Modal Layout */
.extended-modal {
    max-width: 1400px;
}

.archive-layout {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.playlist-sidebar {
    width: 250px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.playlist-btn {
    background: rgba(18, 69, 89, 0.4);
    border: 1px solid rgba(234, 251, 255, 0.1);
    color: var(--color-base-light);
    padding: 15px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.playlist-btn:hover {
    background: rgba(0, 229, 255, 0.1);
    border-color: var(--color-energy-cyan);
}

.playlist-btn.active {
    background: rgba(0, 229, 255, 0.2);
    border-color: var(--color-energy-cyan);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.2);
    color: #fff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    body, html {
        overflow-y: auto;
        height: auto;
    }
    .macro-environment {
        height: auto;
        min-height: 100vh;
        align-items: flex-start;
        padding: 20px 0;
    }
    h1.chromatic-aberration {
        font-size: 2.2rem;
        word-wrap: break-word;
        letter-spacing: 2px;
    }
    .subtitle {
        font-size: 0.8rem;
        letter-spacing: 2px;
        word-wrap: break-word;
    }
    .glass-panel {
        padding: 20px;
        width: 100%;
        overflow-x: hidden;
        overflow-y: visible;
        height: auto;
    }
    .action-matrix {
        flex-direction: column;
        width: 100%;
    }
    .action-btn {
        width: 100%;
        text-align: center;
    }
    .terminal-box {
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    .modal-content {
        max-height: 95vh;
        overflow-y: auto;
    }
    .archive-layout {
        flex-direction: column-reverse;
    }
    .playlist-sidebar {
        width: 100%;
        flex-direction: column;
        max-height: 35vh;
        overflow-y: auto;
    }
    .playlist-btn {
        width: 100%;
        text-align: center;
    }
    .video-container {
        width: 100%;
        height: auto;
    }
}

/* Deep Research Vault */
.deep-research-vault {
    border: 2px solid #00ffaa;
    background: rgba(0, 0, 0, 0.9);
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(0, 255, 170, 0.15);
    margin-top: 40px;
    text-align: left;
}

.vault-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 229, 255, 0.3);
    padding-bottom: 12px;
    margin-bottom: 16px;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--color-energy-cyan);
    letter-spacing: 2px;
}

.vault-content {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 15px;
    color: var(--color-base-light);
    font-family: var(--font-primary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.vault-content::-webkit-scrollbar {
    width: 6px;
}
.vault-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
}
.vault-content::-webkit-scrollbar-thumb {
    background: #00ffaa;
    border-radius: 4px;
}

.vault-content h1, .vault-content h2, .vault-content h3 {
    color: #00ffaa;
    margin: 20px 0 10px 0;
    letter-spacing: 1px;
}

.vault-content p {
    margin-bottom: 15px;
}
