@import url('https://cdn.jsdelivr.net/npm/hack-font@3.3.0/build/web/hack.css');

:root {
    --terminal-bg: #1a1b26;
    --terminal-header: #24283b;
    --terminal-border: #414868;
    --text-primary: #c0caf5;
    --text-dim: #565f89;
    --text-cyan: #7dcfff;
    --text-green: #9ece6a;
    --text-magenta: #bb9af7;
    --text-orange: #ff9e64;
    --text-red: #f7768e;
    --text-yellow: #e0af68;
    --btn-close: #ff5f57;
    --btn-minimize: #febc2e;
    --btn-maximize: #28c840;
    --glow-cyan: rgba(125, 207, 255, 0.15);
}

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

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Hack', 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 25%, #16213e 50%, #1a1a2e 75%, #0f0f1a 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    overflow: hidden;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(125, 207, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(125, 207, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

.terminal-window {
    width: 90%;
    max-width: 800px;
    background: var(--terminal-bg);
    border-radius: 12px;
    box-shadow: 
        0 0 0 1px var(--terminal-border),
        0 25px 50px -12px rgba(0, 0, 0, 0.6),
        0 0 100px -20px var(--glow-cyan);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.terminal-header {
    background: var(--terminal-header);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--terminal-border);
    user-select: none;
}

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

.window-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: relative;
    transition: all 0.15s ease;
}

.window-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.15s ease;
}

.terminal-window:hover .btn-close::before {
    content: '×';
    font-size: 10px;
    color: rgba(0,0,0,0.5);
    opacity: 1;
}

.terminal-window:hover .btn-minimize::before {
    content: '−';
    font-size: 10px;
    color: rgba(0,0,0,0.5);
    opacity: 1;
}

.terminal-window:hover .btn-maximize::before {
    content: '+';
    font-size: 9px;
    color: rgba(0,0,0,0.5);
    opacity: 1;
}

.btn-close { background: var(--btn-close); }
.btn-minimize { background: var(--btn-minimize); }
.btn-maximize { background: var(--btn-maximize); }

.terminal-title {
    flex: 1;
    text-align: center;
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 500;
    margin-right: 52px;
}

.terminal-body {
    height: 420px;
    padding: 20px;
    padding-top: 21px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
}

.terminal-body::-webkit-scrollbar {
    width: 8px;
}

.terminal-body::-webkit-scrollbar-track {
    background: var(--terminal-bg);
}

.terminal-body::-webkit-scrollbar-thumb {
    background: var(--terminal-border);
    border-radius: 4px;
}

.ascii-art {
    color: var(--text-cyan);
    white-space: pre;
    font-size: 18px;
    line-height: 1.15;
    margin-bottom: 8px;
    text-shadow: 0 0 10px var(--glow-cyan);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ascii-art-inner {
    display: inline-block;
    text-align: left;
}

.ascii-tagline {
    color: var(--text-dim);
    font-size: 13px;
    letter-spacing: 0.5px;
    margin-top: 6px;
    margin-bottom: 16px;
    text-shadow: none;
}

.ascii-tagline .word-wrapper {
    display: inline-block;
    margin: 0 12px;
}

.ascii-tagline .word-never {
    color: var(--text-cyan);
}

.ascii-tagline .word-concede {
    color: var(--text-magenta);
}

.ascii-tagline .word-quality {
    color: var(--text-green);
}

@keyframes dotMatrixChar {
    0% {
        opacity: 0;
        color: var(--text-dim);
    }
    30% {
        opacity: 1;
        color: #fff;
        text-shadow: 0 0 8px #fff, 0 0 15px var(--text-cyan);
    }
    100% {
        opacity: 1;
        color: var(--text-cyan);
        text-shadow: 0 0 10px var(--glow-cyan);
    }
}

.dot-matrix-char {
    opacity: 0;
    animation: dotMatrixChar 0.15s ease-out forwards;
}

@keyframes printHeadJitter {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-0.5px); }
    75% { transform: translateX(0.5px); }
}

.ascii-art-inner.printing {
    animation: printHeadJitter 0.05s linear infinite;
}

.output-line {
    margin: 4px 0;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}

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

.p10k-block {
    margin: 10px 0;
}

.p10k-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.p10k-left {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
}

.p10k-right {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: end;
    -webkit-justify-content: flex-end;
    justify-content: flex-end;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
}

.p10k-powerline {
    display: -webkit-box;
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    font-size: 13px;
    margin-right: 8px;
}

.p10k-segment {
    display: -webkit-box;
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
    padding: 3px 8px;
    height: 22px;
}

.p10k-segment-icon {
    background: #414868;
    background: -webkit-linear-gradient(315deg, #414868 0%, #363b54 100%);
    background: -webkit-gradient(linear, left top, right bottom, from(#414868), to(#363b54));
    background: linear-gradient(135deg, #414868 0%, #363b54 100%);
    color: #c0caf5;
    padding: 3px 8px 3px 8px;
    border-radius: 4px 0 0 4px;
}

.p10k-segment-icon svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
    display: block;
}

.p10k-separator {
    display: -webkit-box;
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
    background: #7aa2f7;
    background: -webkit-linear-gradient(315deg, #7aa2f7 0%, #3d59a1 100%);
    background: -webkit-gradient(linear, left top, right bottom, from(#7aa2f7), to(#3d59a1));
    background: linear-gradient(135deg, #7aa2f7 0%, #3d59a1 100%);
    color: #414868;
    font-size: 16px;
    font-weight: bold;
    padding: 3px 4px 3px 2px;
    height: 22px;
}

.p10k-segment-dir {
    background: #7aa2f7;
    background: -webkit-linear-gradient(315deg, #7aa2f7 0%, #3d59a1 100%);
    background: -webkit-gradient(linear, left top, right bottom, from(#7aa2f7), to(#3d59a1));
    background: linear-gradient(135deg, #7aa2f7 0%, #3d59a1 100%);
    color: #1a1b26;
    font-weight: 600;
    padding: 3px 6px 3px 4px;
    border-radius: 0;
    position: relative;
}

.p10k-segment-dir::after {
    content: '';
    position: absolute;
    right: -11px;
    top: 0;
    width: 0;
    height: 0;
    border-top: 11px solid transparent;
    border-bottom: 11px solid transparent;
    border-left: 11px solid #3d59a1;
    border-top-right-radius: 3px;
    border-bottom-right-radius: 3px;
}

.p10k-command {
    color: var(--text-yellow);
    margin-left: 12px;
    -webkit-flex: 1;
    flex: 1;
}

.p10k-status {
    background: var(--terminal-bg);
    border: 1px solid var(--terminal-border);
    border-radius: 3px;
    padding: 2px 5px;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.p10k-status.success {
    color: var(--text-green);
    border-color: var(--text-green);
}

.p10k-status.error {
    color: var(--text-red);
    border-color: var(--text-red);
}

.p10k-status svg {
    width: 10px;
    height: 10px;
    fill: currentColor;
}

.ssh-block {
    margin: 12px 0;
    padding: 8px 0;
    border-left: 2px solid var(--text-magenta);
    padding-left: 12px;
}

.ssh-command-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.ssh-icon {
    color: var(--text-magenta);
    font-size: 12px;
}

.ssh-icon svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.ssh-cmd {
    color: var(--text-yellow);
}

.ssh-host {
    color: var(--text-cyan);
}

.ssh-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.ssh-status-icon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-green);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.ssh-status-text {
    color: var(--text-green);
}

.ssh-welcome {
    color: var(--text-dim);
    font-size: 12px;
    margin-top: 4px;
}

.p10k-response-line {
    color: var(--text-primary);
    padding-left: 4px;
    margin-top: 2px;
}

.p10k-response-line.error-text {
    color: var(--text-red);
}

.creepy-response {
    font-family: inherit;
    font-size: 11px;
    line-height: 1.3;
    color: var(--text-red);
    background: rgba(247, 118, 142, 0.05);
    border-left: 2px solid var(--text-red);
    padding: 8px 12px;
    margin: 8px 0;
    white-space: pre;
    overflow-x: auto;
    animation: creepyGlow 2s ease-in-out infinite alternate;
}

@keyframes creepyGlow {
    from {
        box-shadow: 0 0 5px rgba(247, 118, 142, 0.2);
    }
    to {
        box-shadow: 0 0 15px rgba(247, 118, 142, 0.4);
    }
}

.stealth-link {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.stealth-link:hover {
    color: var(--text-cyan);
    text-decoration: underline;
    cursor: pointer;
}

.prompt {
    color: var(--text-green);
}

.ssh-line {
    color: var(--text-magenta);
}

.connected {
    color: var(--text-green);
}

.cursor-blink {
    display: inline-block;
    width: 8px;
    height: 18px;
    background: var(--text-green);
    vertical-align: middle;
    margin-left: 2px;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.input-line {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    margin-top: 10px;
}

.input-line .p10k-left {
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
}

#user-input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-yellow);
    font-family: inherit;
    font-size: inherit;
    -webkit-flex: 1;
    flex: 1;
    caret-color: var(--text-green);
    margin-left: 12px;
}

#user-input::placeholder {
    color: var(--text-dim);
}

.hidden {
    display: none !important;
}

.typing-cursor {
    display: inline-block;
    width: 8px;
    height: 16px;
    background: var(--text-green);
    vertical-align: middle;
    animation: blink 0.7s step-end infinite;
}

.inline-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--text-yellow);
    vertical-align: text-bottom;
    margin-left: 1px;
    animation: blink 0.6s step-end infinite;
}

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

@media (max-width: 600px) {
    .terminal-window {
        width: 95%;
        min-height: 400px;
        border-radius: 8px;
    }

    .ascii-art {
        font-size: 10px;
    }

    .terminal-body {
        font-size: 12px;
        padding: 15px;
    }
}

@media (max-width: 400px) {
    .ascii-art {
        font-size: 8px;
    }
}
