/* Modern Terminal Interface */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a1a;
    --bg-secondary: #0f1419;
    --bg-tertiary: #1a1a2e;
    --surface: #1e2139;
    --overlay: #6c7086;
    --text-primary: #e2e8f0;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --accent-blue: #7dd3fc;
    --accent-green: #86efac;
    --accent-yellow: #fde047;
    --accent-red: #fb7185;
    --accent-purple: #c084fc;
    --accent-pink: #f472b6;
    --accent-cyan: #67e8f9;
    --neon-cyan: #00ffff;
    --neon-pink: #ff00ff;
    --neon-purple: #8a2be2;
    --border: #2a2d47;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    --neon-glow: 0 0 20px;
    --vaporwave-gradient: linear-gradient(135deg, 
        rgba(0, 255, 255, 0.15) 0%, 
        rgba(138, 43, 226, 0.15) 25%, 
        rgba(255, 0, 255, 0.15) 50%, 
        rgba(255, 20, 147, 0.15) 75%, 
        rgba(0, 255, 255, 0.15) 100%);
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'JetBrains Mono', 'SF Mono', 'Monaco', 'Cascadia Code', monospace;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 14px;
    font-weight: 400;
    position: relative;
}

/* Vaporwave Background */
.vaporwave-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.gradient-waves {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--vaporwave-gradient);
    background-size: 400% 400%;
    animation: vaporwave-flow 25s ease-in-out infinite;
}

.soft-glow {
    position: absolute;
    top: 10%;
    left: 5%;
    width: 90%;
    height: 80%;
    background: radial-gradient(
        ellipse at center,
        rgba(0, 255, 255, 0.08) 0%,
        rgba(138, 43, 226, 0.06) 30%,
        rgba(255, 0, 255, 0.04) 60%,
        transparent 100%
    );
    animation: gentle-pulse 18s ease-in-out infinite;
    border-radius: 50%;
    filter: blur(60px);
}

/* Add retro grid lines */
.vaporwave-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 80px 80px;
    animation: retro-grid 30s linear infinite;
}

@keyframes retro-grid {
    0% { transform: translate(0, 0); }
    100% { transform: translate(80px, 80px); }
}

@keyframes vaporwave-flow {
    0%, 100% {
        background-position: 0% 50%;
        transform: scale(1) rotate(0deg);
        filter: hue-rotate(0deg);
    }
    25% {
        background-position: 100% 25%;
        transform: scale(1.05) rotate(1deg);
        filter: hue-rotate(90deg);
    }
    50% {
        background-position: 100% 75%;
        transform: scale(1.02) rotate(-0.5deg);
        filter: hue-rotate(180deg);
    }
    75% {
        background-position: 0% 75%;
        transform: scale(1.03) rotate(0.5deg);
        filter: hue-rotate(270deg);
    }
}

@keyframes gentle-pulse {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    33% {
        opacity: 0.8;
        transform: scale(1.1);
    }
    66% {
        opacity: 0.9;
        transform: scale(0.95);
    }
}

/* Terminal Container */
.terminal-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    position: relative;
    z-index: 1;
    border: 1px solid rgba(0, 255, 255, 0.2);
    box-shadow: 
        inset 0 0 20px rgba(0, 255, 255, 0.1),
        0 0 40px rgba(138, 43, 226, 0.2);
}

/* Terminal Header */
.terminal-header {
    background: linear-gradient(135deg, var(--bg-secondary), rgba(0, 255, 255, 0.05));
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 255, 255, 0.3);
    font-size: 13px;
    box-shadow: 0 2px 10px rgba(0, 255, 255, 0.1);
}

.terminal-title {
    color: var(--neon-cyan);
    font-weight: 500;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    animation: title-glow 3s ease-in-out infinite alternate;
}

@keyframes title-glow {
    0% { text-shadow: 0 0 10px rgba(0, 255, 255, 0.5); }
    100% { text-shadow: 0 0 20px rgba(0, 255, 255, 0.8), 0 0 30px rgba(0, 255, 255, 0.3); }
}

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

.control-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.minimize { 
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.4);
}
.maximize { 
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}
.close { 
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

.control-btn:hover {
    transform: scale(1.2);
    opacity: 1;
}

/* Terminal Body */
.terminal-body {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    background: var(--bg-primary);
    position: relative;
}

/* Welcome Section */
.welcome-section {
    margin-bottom: 32px;
    text-align: center;
}

.logo {
    margin-bottom: 16px;
}

.logo-text {
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple), var(--neon-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: logo-glow 4s ease-in-out infinite, logo-shift 8s ease-in-out infinite;
    text-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
    position: relative;
}

.logo-text::before {
    content: 'tlr.sh';
    position: absolute;
    top: 0;
    left: 0;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple), var(--neon-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: blur(2px);
    opacity: 0.7;
    z-index: -1;
}

@keyframes logo-glow {
    0%, 100% {
        filter: drop-shadow(0 0 15px rgba(0, 255, 255, 0.4)) drop-shadow(0 0 25px rgba(138, 43, 226, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 25px rgba(255, 0, 255, 0.6)) drop-shadow(0 0 35px rgba(0, 255, 255, 0.4));
    }
}

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

.welcome-text p {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.subtitle {
    font-size: 13px;
    color: var(--text-muted);
}

.highlight {
    color: var(--neon-pink);
    background: rgba(255, 0, 255, 0.15);
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 500;
    box-shadow: 
        0 0 15px rgba(255, 0, 255, 0.3),
        inset 0 0 10px rgba(255, 0, 255, 0.1);
    border: 1px solid rgba(255, 0, 255, 0.3);
    animation: highlight-pulse 3s ease-in-out infinite;
}

@keyframes highlight-pulse {
    0%, 100% { 
        box-shadow: 0 0 15px rgba(255, 0, 255, 0.3), inset 0 0 10px rgba(255, 0, 255, 0.1);
    }
    50% { 
        box-shadow: 0 0 25px rgba(255, 0, 255, 0.5), inset 0 0 15px rgba(255, 0, 255, 0.2);
    }
}

/* Command History */
.command-history {
    margin: 24px 0;
    min-height: 200px;
}

.command-line {
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    font-size: 14px;
}

.command-prompt {
    color: var(--neon-cyan);
    margin-right: 8px;
    flex-shrink: 0;
    font-weight: 500;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.6);
    animation: prompt-pulse 2s ease-in-out infinite;
}

@keyframes prompt-pulse {
    0%, 100% { text-shadow: 0 0 10px rgba(0, 255, 255, 0.6); }
    50% { text-shadow: 0 0 15px rgba(0, 255, 255, 0.8), 0 0 25px rgba(0, 255, 255, 0.4); }
}

.command-text {
    color: var(--text-primary);
}

.command-output {
    margin-left: 16px;
    margin-bottom: 16px;
    color: var(--text-secondary);
    white-space: pre-wrap;
    line-height: 1.6;
}

.command-output.error {
    color: var(--accent-red);
}

.command-output.success {
    color: var(--accent-green);
}

.command-output.info {
    color: var(--accent-blue);
}

/* Input Line */
.input-line {
    display: flex;
    align-items: center;
    margin-top: 24px;
    position: relative;
}

.prompt {
    color: var(--neon-cyan);
    margin-right: 8px;
    flex-shrink: 0;
    font-weight: 500;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.6);
    animation: prompt-pulse 2s ease-in-out infinite;
}

.command-input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: inherit;
    flex: 1;
    caret-color: transparent;
}

.command-input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.cursor {
    color: var(--neon-cyan);
    animation: blink 1.2s infinite, cursor-glow 2s ease-in-out infinite;
    margin-left: 2px;
    font-weight: 300;
    text-shadow: 0 0 15px rgba(0, 255, 255, 0.8);
}

@keyframes cursor-glow {
    0%, 100% { 
        text-shadow: 0 0 15px rgba(0, 255, 255, 0.8);
        transform: scale(1);
    }
    50% { 
        text-shadow: 0 0 25px rgba(0, 255, 255, 1), 0 0 35px rgba(0, 255, 255, 0.5);
        transform: scale(1.1);
    }
}

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

/* Status Bar */
.status-bar {
    background: var(--bg-secondary);
    padding: 8px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    font-size: 12px;
}

.status-left, .status-right {
    display: flex;
    gap: 16px;
    align-items: center;
}

.status-item {
    color: var(--text-muted);
}

.status-left .status-item:first-child {
    color: var(--neon-cyan);
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.6);
    animation: status-pulse 3s ease-in-out infinite;
}

@keyframes status-pulse {
    0%, 100% { 
        text-shadow: 0 0 10px rgba(0, 255, 255, 0.6);
        transform: scale(1);
    }
    50% { 
        text-shadow: 0 0 20px rgba(0, 255, 255, 0.8), 0 0 30px rgba(0, 255, 255, 0.4);
        transform: scale(1.1);
    }
}

/* ASCII Idle Animation */
.ascii-idle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.ascii-idle.show {
    opacity: 0.3;
}

.idle-animation {
    animation: float 3s ease-in-out infinite;
}

.ascii-art-idle {
    font-size: 12px;
    line-height: 1;
    color: var(--text-muted);
    margin-bottom: 8px;
    animation: breathe 4s ease-in-out infinite;
}

.idle-text {
    font-size: 11px;
    color: var(--text-muted);
    animation: fade 2s ease-in-out infinite alternate;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes breathe {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

@keyframes fade {
    0% { opacity: 0.2; }
    100% { opacity: 0.5; }
}

/* Help Menu */
.help-menu {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    max-width: 500px;
    width: 90%;
    z-index: 2000;
    display: none;
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
}

.help-menu.active {
    display: block;
    animation: slideIn 0.2s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.help-content h3 {
    color: var(--text-primary);
    margin-bottom: 20px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
}

.command-list {
    margin-bottom: 20px;
}

.command-item {
    display: flex;
    margin-bottom: 12px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.command-item:hover {
    background: var(--surface);
}

.cmd {
    color: var(--accent-blue);
    font-weight: 600;
    width: 100px;
    flex-shrink: 0;
}

.desc {
    color: var(--text-secondary);
    flex: 1;
}

.help-note {
    text-align: center;
    color: var(--text-muted);
    font-size: 11px;
    font-style: italic;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--overlay);
    border-radius: 3px;
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    body {
        font-size: 13px;
    }
    
    .terminal-body {
        padding: 16px;
    }
    
    .logo-text {
        font-size: 24px;
    }
    
    .help-menu {
        width: 95%;
        padding: 20px;
    }
    
    .cmd {
        width: 80px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 12px;
    }
    
    .terminal-body {
        padding: 12px;
    }
    
    .logo-text {
        font-size: 20px;
    }
    
    .status-bar {
        padding: 6px 12px;
    }
    
    .status-left, .status-right {
        gap: 8px;
    }
    
    .terminal-header {
        padding: 8px 12px;
    }
}

/* Focus states */
.command-input:focus {
    outline: none;
}

/* Smooth transitions */
* {
    transition: color 0.2s ease, background-color 0.2s ease;
}