/* StreamGuide Pro - Base Styling & Custom Design System */
:root {
    --color-bg-main: #0f172a;
    /* Slate 900 */
    --color-card: #1e293b;
    /* Slate 800 */
    --color-primary: #6366f1;
    /* Indigo 500 */
    --color-primary-hover: #4f46e5;
    /* Indigo 600 */
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--color-bg-main);
}

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

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Navigation Styles */
.nav-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.25rem;
    color: #94a3b8;
    background: transparent;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item:hover {
    color: #ffffff;
    background-color: rgba(30, 41, 59, 0.6);
}

.nav-item.active {
    color: #ffffff;
    background-color: rgba(99, 102, 241, 0.12);
}

.nav-item.active .nav-indicator {
    opacity: 1;
}

/* Typography Headings */
.font-display {
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Component Styles */
.card {
    background-color: rgba(15, 23, 42, 0.85);
    border: 1px solid #1e293b;
    border-radius: 0.75rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.stat-card {
    background-color: rgba(15, 23, 42, 0.85);
    border: 1px solid #1e293b;
    border-radius: 0.75rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.stat-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
}

.icon-box {
    width: 3rem;
    height: 3rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--color-primary);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.25);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 12px 20px -3px rgba(99, 102, 241, 0.35);
}

.btn-primary:active {
    transform: scale(0.98);
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    margin-left: 0.25rem;
}

.form-input {
    width: 100%;
    background-color: #0f172a;
    border: 1px solid #334155;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    color: #f1f5f9;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 1px #6366f1;
}

.form-input option {
    background-color: #0f172a;
    color: #f1f5f9;
}

/* Filter Buttons (Analytics) */
.filter-button {
    padding: 0.375rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    background: transparent;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-button.active {
    background-color: #334155;
    color: #ffffff;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.15);
}

.filter-button:hover:not(.active) {
    color: #e2e8f0;
    background-color: rgba(51, 65, 85, 0.4);
}

/* Code Viewer & Tabs */
.code-tab-btn {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.code-tab-btn:hover {
    color: #ffffff;
}

.code-tab-btn.active {
    color: #818cf8;
    border-bottom-color: #6366f1;
    background-color: rgba(99, 102, 241, 0.08);
}

.code-container {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.8125rem;
    line-height: 1.5;
    white-space: pre;
    overflow-x: auto;
}

/* Animated SVG Flow Connectors */
.flow-line {
    stroke-dasharray: 6 6;
    animation: flowDash 1.2s linear infinite;
}

@keyframes flowDash {
    to {
        stroke-dashoffset: -12;
    }
}

/* Terminal Window for Live Simulator */
.terminal-window {
    background-color: #030712;
    border: 1px solid #1f2937;
    border-radius: 0.75rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.75rem;
    line-height: 1.6;
    color: #38bdf8;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.6);
}

/* Markdown Content Styling */
.prose-invert strong {
    color: #818cf8;
}

.prose ul>li::marker {
    color: #6366f1;
}

/* Animations */
.animate-fade-in {
    animation: fadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.loader-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(99, 102, 241, 0.25);
    border-radius: 50%;
    border-top-color: #6366f1;
    animation: spin 0.9s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}