/* Custom Typography and Root Styling */
:root {
    --terminal-bg: #0d1117;
    --editor-bg: #1e1e1e;
    --border-color: #2e2e38;
}

body {
    background-color: #121217;
    color: #e4e4e7;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #18181b; 
}
::-webkit-scrollbar-thumb {
    background: #3f3f46; 
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #52525b; 
}

/* Hide scrollbar for tabs navigation */
.scrollbar-none::-webkit-scrollbar {
    display: none;
}
.scrollbar-none {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Editor & Terminal Font */
.font-mono, #terminalBody, .code-area {
    font-family: 'JetBrains Mono', 'Consolas', 'Courier New', monospace;
    font-variant-ligatures: normal;
}

/* Terminal Styling */
#terminalBody {
    background-color: var(--terminal-bg);
}

.terminal-stdout {
    color: #e6edf3;
}
.terminal-stderr {
    color: #f87171;
}
.terminal-compile-error {
    color: #fb923c;
    background: rgba(239, 68, 68, 0.1);
    padding: 8px;
    border-radius: 6px;
    border-left: 3px solid #ef4444;
    margin-bottom: 8px;
    display: block;
}
.terminal-info {
    color: #38bdf8;
}
.terminal-success {
    color: #4ade80;
}
.terminal-time {
    color: #94a3b8;
    font-size: 0.75rem;
}

/* Monaco Editor Container */
#monaco-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Modals Animation */
.animate-in {
    animation: fadeInScale 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(-8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Toast styling */
.toast {
    pointer-events: auto;
    animation: toastSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Web Development Code Editors */
.web-code-container textarea {
    background-color: #1e1e1e;
    line-height: 1.6;
    tab-size: 4;
}

/* Running Pulse Glow */
.running-pulse {
    animation: pulseGlow 1.5s infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
    }
    50% {
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
    }
}

/* Screen Reader and Search Engine Crawler Accessibility (SEO) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ============================================
   STDIN MISSING — INTERACTIVE BANNER STYLES
   ============================================ */
.stdin-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: linear-gradient(135deg, rgba(6,182,212,0.12), rgba(37,99,235,0.1));
    border: 1px solid rgba(6,182,212,0.4);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 12px;
    animation: bannerSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes bannerSlideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.stdin-banner-icon {
    font-size: 1.25rem;
    color: #22d3ee;
    padding-top: 2px;
    flex-shrink: 0;
}

.stdin-banner-body {
    flex: 1;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.72rem;
    line-height: 1.5;
    color: #cbd5e1;
}

.stdin-banner-body strong {
    display: block;
    color: #e2e8f0;
    font-size: 0.78rem;
    margin-bottom: 3px;
}

.stdin-banner-body p {
    margin: 0;
    color: #94a3b8;
}

.stdin-banner-body strong + p strong {
    display: inline;
    color: #22d3ee;
}

.stdin-banner-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.stdin-fill-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    background: #0e7490;
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}
.stdin-fill-btn:hover {
    background: #0891b2;
}

.stdin-dismiss-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: transparent;
    border: 1px solid rgba(148,163,184,0.3);
    border-radius: 6px;
    color: #64748b;
    cursor: pointer;
    font-size: 0.7rem;
    transition: all 0.2s;
}
.stdin-dismiss-btn:hover {
    background: rgba(255,255,255,0.05);
    color: #cbd5e1;
}



/* ============================================
   INTERACTIVE INLINE TERMINAL INPUT STYLES
   ============================================ */
.terminal-input-line {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 2px 0;
    padding: 0;
    background: transparent;
    border: none;
    font-family: 'JetBrains Mono', Consolas, monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

.terminal-prompt-text {
    color: #e2e8f0;
    font-weight: 500;
    white-space: pre-wrap;
    user-select: text;
}

.terminal-inline-input {
    flex: 1;
    min-width: 140px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(56, 189, 248, 0.4);
    border-radius: 4px;
    outline: none;
    color: #38bdf8;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 1px 6px;
    caret-color: #38bdf8;
    transition: all 0.15s ease-in-out;
}

.terminal-inline-input:focus {
    border-color: #38bdf8;
    background: rgba(15, 23, 42, 0.9);
    box-shadow: 0 0 6px rgba(56, 189, 248, 0.3);
}

.terminal-inline-input::placeholder {
    color: #64748b;
    font-size: 0.75rem;
    font-style: italic;
    font-weight: 400;
}

.terminal-input-submitted {
    display: block;
    background: transparent;
    border: none;
    padding: 0;
    margin: 2px 0;
    line-height: 1.6;
}

.terminal-input-submitted .terminal-prompt-text {
    color: #e2e8f0;
    font-weight: 500;
}

.terminal-user-answer {
    color: #38bdf8;
    font-weight: 600;
    margin-left: 2px;
}

#fallback-code-area {
    width: 100%;
    height: 100%;
    background-color: #1e1e1e;
    color: #f1f5f9;
    font-family: 'JetBrains Mono', Consolas, 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    padding: 16px;
    border: none;
    outline: none;
    resize: none;
    tab-size: 4;
}


/* ============================================
   3D UI / UX & HOME PAGE LANDING STYLES
   ============================================ */

.perspective-1000 {
    perspective: 1000px;
}

.perspective-1500 {
    perspective: 1500px;
}

.preserve-3d {
    transform-style: preserve-3d;
}

.translate-z-10 {
    transform: translateZ(10px);
}

.translate-z-20 {
    transform: translateZ(20px);
}

.translate-z-30 {
    transform: translateZ(30px);
}

/* Glassmorphism Panels */
.glass-panel {
    background: rgba(18, 24, 38, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-card {
    background: rgba(22, 27, 34, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.glass-card:hover {
    border-color: rgba(59, 130, 246, 0.45);
    box-shadow: 0 15px 35px -10px rgba(59, 130, 246, 0.3), 0 0 20px rgba(59, 130, 246, 0.12);
}

/* 3D Tilt Card Base */
.tilt-card {
    transform-style: preserve-3d;
    transition: transform 0.15s ease-out, box-shadow 0.25s ease-out, border-color 0.25s ease;
    will-change: transform;
}

/* Glowing Background Orbs */
.glow-orb {
    position: absolute;
    border-radius: 9999px;
    filter: blur(100px);
    pointer-events: none;
    z-index: 0;
}

/* Hero 3D Mockup */
.hero-mockup-3d {
    transform: perspective(1200px) rotateY(-7deg) rotateX(5deg);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
    box-shadow: 0 25px 60px -15px rgba(59, 130, 246, 0.35), 0 0 35px rgba(99, 102, 241, 0.15);
}

.hero-mockup-3d:hover {
    transform: perspective(1200px) rotateY(-1deg) rotateX(1deg) scale3d(1.02, 1.02, 1.02);
    box-shadow: 0 35px 80px -15px rgba(59, 130, 246, 0.5), 0 0 45px rgba(99, 102, 241, 0.25);
}

/* Floating Animations */
@keyframes float3d {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-8px) rotate(0.5deg);
    }
}

.animate-float-3d {
    animation: float3d 6s ease-in-out infinite;
}

@keyframes pulseBorder {
    0%, 100% {
        border-color: rgba(59, 130, 246, 0.4);
    }
    50% {
        border-color: rgba(147, 51, 234, 0.6);
    }
}

.pulse-border-glow {
    animation: pulseBorder 4s infinite;
}

/* 3D Gradient Text */
.gradient-text-3d {
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 50%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.gradient-blue-3d {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 50%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gradient-cyan-3d {
    background: linear-gradient(135deg, #38bdf8 0%, #06b6d4 50%, #0891b2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Interactive Card Spotlight Glare */
.card-glare {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    border-radius: inherit;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.08), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
}

.tilt-card:hover .card-glare {
    opacity: 1;
}

/* Home Page Scrollbar */
#homeView::-webkit-scrollbar {
    width: 10px;
}
#homeView::-webkit-scrollbar-track {
    background: #090d16;
}
#homeView::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 5px;
}
#homeView::-webkit-scrollbar-thumb:hover {
    background: #334155;
}
