:root {
    --bg-color: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent-1: #38bdf8;
    --accent-2: #10b981;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Effects */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: var(--accent-1);
}

.orb-2 {
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: var(--accent-2);
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(5%, 5%); }
}

/* Typography & Utilities */
h1, h2, h3 {
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(15, 23, 42, 0.8);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 800;
    font-size: 1.2rem;
}

.links a {
    color: var(--text-main);
    text-decoration: none;
    margin-left: 2rem;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.3s;
}

.links a:hover {
    color: var(--accent-1);
}

.github-btn {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    padding: 0.5rem 1rem;
    border-radius: 8px;
    color: #fff !important;
}

/* Layout */
main {
    max-width: 1200px;
    margin: 100px auto 0;
    padding: 0 2rem;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 100px 2rem;
    margin-bottom: 4rem;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

/* Content Sections */
.content-section {
    margin-bottom: 6rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

/* Glass Cards */
.glass-panel, .glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--glass-shadow);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.full-width {
    grid-column: 1 / -1;
}

/* Code & Consoles */
pre {
    background: #000;
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    margin-top: 1.5rem;
    border: 1px solid #333;
}

code {
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent-1);
}

pre code {
    color: #e2e8f0;
}

.console-card {
    display: flex;
    flex-direction: column;
}

.params {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.console {
    background: #000;
    padding: 1rem;
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: #10b981;
    white-space: pre-wrap;
    flex-grow: 1;
}

.error-console {
    color: #ef4444;
}

.prompt {
    color: #64748b;
    display: block;
    margin-bottom: 0.5rem;
}

/* Analysis */
.analysis-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    border-top: 1px solid var(--glass-border);
    margin-top: 4rem;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .links a {
        margin-left: 1rem;
        margin-right: 1rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .analysis-grid {
        grid-template-columns: 1fr;
    }
}

/* Trace Components */
.trace-container {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.trace-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0;
}

.trace-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.trace-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
}

.trace-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.trace-step-indicator {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.trace-explanation {
    background: rgba(16, 185, 129, 0.1);
    border-left: 4px solid var(--accent-2);
    padding: 0.8rem 1rem;
    border-radius: 0 4px 4px 0;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    min-height: 3.5rem;
    display: flex;
    align-items: center;
}

.trace-state {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
}

.trace-row {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.trace-label {
    color: var(--accent-1);
    min-width: 80px;
}

.array-container {
    display: flex;
    gap: 0.2rem;
    flex-wrap: wrap;
}

.array-box {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
    min-width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s;
}

.array-box.highlight {
    background: rgba(56, 189, 248, 0.2);
    border-color: var(--accent-1);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

.array-index {
    position: absolute;
    top: -15px;
    font-size: 0.6rem;
    color: #64748b;
}
