/* * Fenrir Documentation Portal - Glassmorphic Dark Design System
 * Curated for a modern, high-tech, and responsive experience.
 */

:root {
    --bg-color: #060913;
    --bg-card: rgba(13, 20, 38, 0.45);
    --bg-card-hover: rgba(20, 30, 58, 0.6);
    --border-color: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(6, 182, 212, 0.35);
    --border-active: rgba(99, 102, 241, 0.5);
    
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    --color-primary: #6366f1;
    --color-cyan: #06b6d4;
    --color-emerald: #10b981;
    --color-rose: #f43f5e;
    --color-amber: #f59e0b;
    
    --grad-primary: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
    --grad-hover: linear-gradient(135deg, #4f46e5 0%, #0891b2 100%);
    --grad-emerald: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --grad-rose: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    --grad-dark: linear-gradient(135deg, #111827 0%, #0b0f19 100%);
    
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --shadow-neon-cyan: 0 0 20px rgba(6, 182, 212, 0.25);
    --shadow-neon-indigo: 0 0 20px rgba(99, 102, 241, 0.25);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --header-height: 70px;
    --sidebar-width: 280px;
}

/* =====================================================================
 * KEYFRAMES LIBRARY (New Animations)
 * ===================================================================== */
@keyframes pulseLogo {
    0% { filter: drop-shadow(0 0 4px rgba(6, 182, 212, 0.4)); }
    100% { filter: drop-shadow(0 0 12px rgba(6, 182, 212, 0.8)); }
}

@keyframes floatAnim {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.02); }
}

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

@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 15px rgba(6, 182, 212, 0.3); }
    50% { box-shadow: 0 0 25px rgba(6, 182, 212, 0.6), 0 0 10px rgba(99, 102, 241, 0.4); }
}

@keyframes floatBlobLeft {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -40px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

@keyframes floatBlobRight {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-40px, 30px) scale(0.95); }
    66% { transform: translate(20px, -20px) scale(1.1); }
}

@keyframes shimmerEffect {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.08) 0%, transparent 40%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    position: relative;
}

/* Glass panel baseline */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-glass), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 16px 40px 0 rgba(0, 0, 0, 0.5), 0 0 20px rgba(6, 182, 212, 0.1);
}

/* Floating background blobs — with ultra-smooth floating physics */
.bg-blob {
    position: fixed;
    width: clamp(200px, 40vw, 400px);
    height: clamp(200px, 40vw, 400px);
    border-radius: 50%;
    filter: blur(90px);
    z-index: 0;
    pointer-events: none;
    opacity: 0.14;
}

.bg-blob-indigo {
    background: radial-gradient(circle, var(--color-primary) 0%, transparent 70%);
    top: 10%;
    left: -5%;
    animation: floatBlobLeft 20s ease-in-out infinite;
}

.bg-blob-cyan {
    background: radial-gradient(circle, var(--color-cyan) 0%, transparent 70%);
    bottom: 10%;
    right: -5%;
    animation: floatBlobRight 25s ease-in-out infinite;
}

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

::-webkit-scrollbar-track {
    background: rgba(6, 9, 19, 0.5);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    transition: background 0.3s;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-cyan);
}

/* Global layout safety rules */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Headings */
h1, h2, h3, h4, h5 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.5px;
    word-break: break-word;
    overflow-wrap: break-word;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.8rem; margin-top: 2rem; margin-bottom: 1rem; border-bottom: 1px solid var(--border-color); padding-bottom: 0.5rem; }
h3 { font-size: 1.4rem; margin-top: 1.5rem; margin-bottom: 0.75rem; }
h4 { font-size: 1.1rem; margin-top: 1rem; margin-bottom: 0.5rem; }

/* Links */
a {
    color: var(--color-cyan);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

a:hover {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.6);
}

/* Header & Navbar */
header {
    height: var(--header-height);
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
    background: rgba(6, 9, 19, 0.75);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    height: 100%;
    margin: 0 auto;
    padding: 0 2rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.4rem;
    color: #ffffff;
    text-decoration: none;
}

.brand-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    filter: drop-shadow(0 0 6px var(--color-cyan));
    animation: pulseLogo 3s ease-in-out infinite alternate;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
}

.nav-item a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid transparent;
}

.nav-item a:hover, .nav-item.active a {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-item.active a {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.1);
}

/* Hamburger button for mobile menu */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 101;
    transition: transform 0.2s;
}

.menu-toggle:active {
    transform: scale(0.9);
}

/* Page containers */
.main-wrapper {
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
    position: relative;
    z-index: 1;
    overflow-x: clip;
    width: 100%;
}

/* 1. HOME LANDING PAGE STYLES */
.hero-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 80px 20px 60px 20px;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.floating-logo-wrapper {
    position: relative;
    margin-bottom: 30px;
    animation: floatAnim 6s ease-in-out infinite;
}

.hero-logo {
    width: 260px;
    height: 260px;
    object-fit: contain;
    filter: drop-shadow(0 0 25px rgba(6, 182, 212, 0.45));
}

.badge-version {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding: 4px 12px;
    border-radius: 50px;
    margin-bottom: 20px;
    display: inline-block;
    letter-spacing: 0.5px;
    transition: all 0.3s;
}

.badge-version:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--color-primary);
    transform: scale(1.05);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    background: linear-gradient(135deg, #ffffff 30%, #a5b4fc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 650px;
    margin-bottom: 35px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 50px;
}

/* Button style system */
.btn {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    padding: 12px 28px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--grad-primary);
    color: #060913;
    animation: glowPulse 4s infinite;
}

.btn-primary:hover {
    background: var(--grad-hover);
    transform: translateY(-3px);
    color: #060913;
    animation-play-state: paused;
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.7), 0 0 15px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* Installation bar */
.install-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    padding: 12px 20px;
    border-radius: 12px;
    font-family: var(--font-mono);
    max-width: 480px;
    width: 100%;
    margin-bottom: 60px;
    transition: border-color 0.3s;
}

.install-box:hover {
    border-color: var(--border-hover);
}

.install-cmd {
    color: #a5b4fc;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.install-cmd::before {
    content: "$ ";
    color: var(--color-cyan);
}

.btn-copy {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-copy:hover {
    color: var(--color-cyan);
    background: rgba(255, 255, 255, 0.05);
    transform: scale(1.1);
}

/* Feature grid */
.feature-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 80px 2rem;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    font-family: var(--font-heading);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.feature-card {
    padding: 30px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.feature-icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-cyan);
    font-size: 1.5rem;
    border: 1px solid rgba(99, 102, 241, 0.15);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
    box-shadow: 0 15px 35px rgba(6, 182, 212, 0.1);
}

.feature-card:hover .feature-icon-wrapper {
    background: var(--grad-primary);
    color: #060913;
    box-shadow: var(--shadow-neon-cyan);
    border-color: transparent;
    transform: scale(1.1) rotate(5deg);
}

.feature-card h3 {
    margin: 0;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Interactive terminal scaffold demo */
.terminal-demo {
    max-width: 800px;
    margin: 0 auto 80px auto;
    padding: 2px;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.01) 100%);
}

.terminal-header {
    background: #0b0f19;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.td-red { background: #f43f5e; }
.td-yellow { background: #eab308; }
.td-green { background: #10b981; }

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.terminal-body {
    background: #060913;
    padding: 24px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    text-align: left;
    color: #d1d5db;
    overflow-x: auto;
    min-height: 250px;
}

/* 2. DOCUMENTATION BROWSER STYLES */
.docs-container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
    min-height: calc(100vh - var(--header-height));
}

/* Sidebar navigation */
.docs-sidebar {
    width: var(--sidebar-width);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: var(--header-height);
    bottom: 0;
    left: 0;
    z-index: 10;
    background: rgba(6, 9, 19, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    overflow-y: auto;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.search-box {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    padding: 10px 15px 10px 35px;
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.search-input:focus {
    border-color: var(--color-cyan);
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.25);
    outline: none;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.nav-section-title {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--color-primary);
    font-weight: 700;
    margin-bottom: 10px;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-item a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    border-left: 2px solid transparent;
}

.sidebar-item a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.03);
    border-left-color: var(--border-hover);
    padding-left: 16px; /* Smooth slide effect */
}

.sidebar-item.active a {
    color: var(--color-cyan);
    font-weight: 600;
    background: rgba(6, 182, 212, 0.08);
    border-left-color: var(--color-cyan);
    box-shadow: inset 4px 0 10px rgba(6, 182, 212, 0.05);
}

/* Documentation Content panel */
.docs-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 3rem 4rem 4rem 4rem;
    max-width: 900px;
    min-width: 0;
}

.doc-section {
    display: none;
}

.doc-section.active {
    display: block;
    animation: fadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.docs-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    line-height: 1.7;
}

.docs-content ul, .docs-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
    color: var(--text-secondary);
}

.docs-content li {
    margin-bottom: 0.5rem;
}

/* Code Snippets & Syntax blocks + Animated Shimmer Stream Line */
pre {
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    overflow-x: auto;
    margin-bottom: 2rem;
    position: relative;
    max-width: 100%;
    box-sizing: border-box;
    word-break: normal;
    white-space: pre;
    background-image: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.02) 50%, rgba(255,255,255,0) 100%);
    background-size: 200% 100%;
    animation: shimmerEffect 6s infinite linear;
}

code {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: #e5e7eb;
    word-break: break-word;
}

p code, li code {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #a5b4fc;
}

.code-container {
    position: relative;
}

.btn-code-copy {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(13, 20, 38, 0.8);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-code-copy:hover {
    color: var(--color-cyan);
    border-color: var(--border-hover);
    background: rgba(13, 20, 38, 0.95);
    transform: scale(1.03);
}

/* Table styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

th {
    font-family: var(--font-heading);
    font-weight: 700;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.02);
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Alert Boxes in docs */
.alert-box {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border-left: 4px solid;
    display: flex;
    gap: 15px;
    transition: transform 0.3s;
}

.alert-box:hover {
    transform: translateX(4px);
}

.alert-box-icon {
    font-size: 1.25rem;
    margin-top: 2px;
}

.alert-box-content h5 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.alert-box-content p {
    font-size: 0.95rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
}

.alert-info {
    background: rgba(59, 130, 246, 0.06);
    border-color: #3b82f6;
    color: #93c5fd;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.06);
    border-color: #f59e0b;
    color: #fde047;
}

.alert-danger {
    background: rgba(244, 63, 94, 0.06);
    border-color: #f43f5e;
    color: #fca5a5;
}

/* Right scroll spy table of contents (TOC) */
.docs-toc {
    width: 200px;
    position: fixed;
    top: calc(var(--header-height) + 3rem);
    right: 2rem;
    display: none;
    list-style: none;
    border-left: 1px solid var(--border-color);
    padding-left: 1rem;
}

.toc-item {
    margin-bottom: 10px;
}

.toc-link {
    color: var(--text-secondary);
    font-size: 0.85rem;
    transition: all 0.2s;
}

.toc-link:hover, .toc-item.active .toc-link {
    color: var(--color-cyan);
    padding-left: 4px;
}

/* 3. PLAYGROUND PORTAL STYLES */
.playground-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - var(--header-height));
}

.playground-sidebar {
    border-right: 1px solid var(--border-color);
    background: rgba(6, 9, 19, 0.6);
    backdrop-filter: blur(15px);
    padding: 2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.paradigm-selector {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-paradigm {
    width: 100%;
    padding: 14px 18px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: left;
}

.btn-paradigm:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateX(4px);
}

.btn-paradigm.active {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.4);
    color: #ffffff;
    box-shadow: inset 0 0 10px rgba(99, 102, 241, 0.15), 0 0 15px rgba(99, 102, 241, 0.1);
}

.btn-paradigm .badge-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    transition: transform 0.3s;
}

.btn-paradigm:hover .badge-dot {
    transform: scale(1.3);
}

.badge-dot-flask { background: #38bdf8; box-shadow: 0 0 8px #38bdf8; }
.badge-dot-fastapi { background: #10b981; box-shadow: 0 0 8px #10b981; }
.badge-dot-falcon { background: #8b5cf6; box-shadow: 0 0 8px #8b5cf6; }
.badge-dot-sanic { background: #f43f5e; box-shadow: 0 0 8px #f43f5e; }

.playground-console {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    gap: 30px;
    overflow-y: auto;
}

.playground-view {
    display: none;
}

.playground-view.active {
    display: flex;
    flex-direction: column;
    gap: 25px;
    animation: fadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.view-header h2 {
    margin: 0;
    border: none;
    padding: 0;
}

.view-desc {
    color: var(--text-secondary);
    font-size: 1rem;
}

.console-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.console-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.panel-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-input {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    padding: 12px;
    border-radius: 8px;
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all 0.3s;
}

.form-input:focus {
    border-color: var(--color-cyan);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
    outline: none;
}

.form-input-mono {
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

/* Response Terminal viewer */
.response-wrapper {
    background: #030712;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    height: 100%;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.response-header {
    background: rgba(255,255,255,0.02);
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.response-status {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(255,255,255,0.05);
}

.status-200, .status-201 {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-emerald);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
}

.status-400, .status-422, .status-500 {
    background: rgba(244, 63, 94, 0.1);
    color: var(--color-rose);
    box-shadow: 0 0 10px rgba(244, 63, 94, 0.15);
}

.response-body {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: #38bdf8;
    white-space: pre-wrap;
    text-align: left;
}

/* WebSocket specific styles */
.chat-window {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    height: 250px;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-msg {
    padding: 8px 12px;
    border-radius: 8px;
    max-width: 80%;
    font-size: 0.9rem;
    animation: fadeIn 0.3s ease-out forwards;
}

.chat-msg-user {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.2);
    align-self: flex-end;
    color: #e0e7ff;
}

.chat-msg-server {
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(6, 182, 212, 0.2);
    align-self: flex-start;
    color: #ecfeff;
}

.chat-input-row {
    display: flex;
    gap: 10px;
}

.chat-input-row input {
    flex: 1;
}

/* Server Sent Events live ticks */
.sse-visualizer {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: 220px;
    overflow-y: auto;
}

.sse-tick {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 8px;
    border-bottom: 1px dashed rgba(255,255,255,0.05);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    animation: fadeIn 0.25s ease-out forwards;
}

.sse-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-emerald);
    box-shadow: 0 0 8px var(--color-emerald);
    animation: pulseLogo 1.5s infinite alternate;
}

.sse-time {
    color: var(--text-muted);
}

.sse-value {
    color: #ffffff;
}

/* Footer rules */
footer {
    border-top: 1px solid var(--border-color);
    padding: 30px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: auto;
    position: relative;
    z-index: 1;
    background: rgba(6, 9, 19, 0.6);
}

body.page-docs footer {
    margin-left: var(--sidebar-width);
}

footer a {
    color: var(--text-secondary);
}

/* =====================================================================
 * RESPONSIVE SYSTEM — Full breakpoint coverage
 * ===================================================================== */

/* --- Large Desktop (1280px+): Show right-side TOC --- */
@media (min-width: 1280px) {
    .docs-toc {
        display: block;
    }
}

/* --- Tablet landscape / small desktop (1025px – 1279px) --- */
@media (max-width: 1279px) {
    .docs-toc {
        display: none;
    }

    .docs-content {
        padding: 2.5rem 2.5rem;
    }

    .playground-console {
        padding: 2.5rem 2rem;
    }
}

/* --- Tablet portrait (769px – 1024px) --- */
@media (max-width: 1024px) {
    .docs-content {
        padding: 2rem 2rem;
    }

    .console-split {
        grid-template-columns: 1fr;
    }

    .playground-grid {
        grid-template-columns: 260px 1fr;
    }

    .playground-sidebar {
        padding: 1.5rem 1.25rem;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .terminal-demo {
        margin-left: 1rem;
        margin-right: 1rem;
    }

    body.page-docs footer {
        margin-left: var(--sidebar-width);
    }
}

/* --- Mobile (max 768px) --- */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 280px;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: var(--header-height);
        left: 0;
        background: rgba(6, 9, 19, 0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border-color);
        padding: 1.5rem;
        gap: 0.75rem;
        align-items: stretch;
        z-index: 99;
    }

    .nav-links.show {
        display: flex;
        animation: fadeIn 0.3s ease-out forwards;
    }

    .nav-item a {
        padding: 12px 16px;
        border-radius: 10px;
        display: block;
    }

    .hero-section {
        padding: 50px 20px 40px 20px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        align-items: stretch;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .install-box {
        max-width: 100%;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .feature-section {
        padding: 0 1.25rem 60px 1.25rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .terminal-demo {
        margin: 0 0 60px 0;
    }

    .terminal-body {
        font-size: 0.8rem;
        padding: 16px;
        min-height: 200px;
    }

    .docs-container {
        flex-direction: column;
    }

    .docs-sidebar {
        position: static;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 1.25rem;
        bottom: unset;
    }

    .docs-content {
        margin-left: 0;
        padding: 1.75rem 1.25rem;
        max-width: 100%;
    }

    body.page-docs footer {
        margin-left: 0;
    }

    .playground-grid {
        grid-template-columns: 1fr;
        min-height: unset;
    }

    .playground-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 1.25rem;
    }

    .paradigm-selector {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .btn-paradigm {
        font-size: 0.85rem;
        padding: 10px 12px;
    }

    .btn-paradigm:hover {
        transform: none; /* disable horizontal float on mobile */
    }

    .playground-console {
        padding: 1.5rem 1.25rem;
    }

    .console-split {
        grid-template-columns: 1fr;
    }

    .response-wrapper {
        min-height: 250px;
    }

    h1 { font-size: 1.9rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.2rem; }

    pre {
        font-size: 0.82rem;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* --- Extra small mobile (max 480px) --- */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.7rem;
    }

    .hero-logo {
        width: 160px;
        height: 160px;
    }

    .brand {
        font-size: 1.15rem;
    }

    .paradigm-selector {
        grid-template-columns: 1fr;
    }

    .chat-input-row {
        flex-direction: column;
    }

    .btn-paradigm {
        width: 100%;
    }

    .alert-box {
        flex-direction: column;
        gap: 8px;
    }

    .docs-content {
        padding: 1.25rem 1rem;
    }

    .playground-console {
        padding: 1.25rem 1rem;
    }
}