/* Docs Page Specific Styles */

/* --- Layout & Variables --- */
:root {
    --sidebar-width: 280px;
    --header-height: 70px;
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --card-bg: #ffffff;
    --primary: #ef4444;
    --primary-dark: #dc2626;
    --primary-glow: rgba(239, 68, 68, 0.5);
    --bg-dark: #0f172a;
    --text-main: #1e293b;
    --text-muted: #64748b;
}

.dark-mode {
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    --card-bg: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --bg-body: #0f172a;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* --- Navigation Logo --- */
.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-main);
}

.nav-logo img {
    display: block;
}

/* --- 3D Hero Section (Redesigned) --- */
.docs-hero-3d {
    position: relative;
    padding: 160px 20px 120px;
    background-color: var(--bg-body);
    background-color: var(--bg-body);
    /* background: removed to rely on orbs for smoother blending */
    overflow: hidden;
    perspective: 1000px;
}

/* Background Elements */
.hero-bg-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
}

.orb-1 {
    top: -10%;
    right: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--primary), transparent 70%);
    animation: orb-float 10s ease-in-out infinite;
}

.orb-2 {
    bottom: -30%;
    left: -10%;
    width: 1400px;
    height: 1400px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 60%);
    animation: orb-float 15s ease-in-out infinite reverse;
    opacity: 1;
    filter: blur(120px);
}

@keyframes orb-float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(30px, -30px);
    }
}

.hero-grid-plane {
    position: absolute;
    bottom: -20%;
    left: -50%;
    width: 200%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    transform: rotateX(60deg);
    mask-image: linear-gradient(to top, black, transparent 80%);
    -webkit-mask-image: linear-gradient(to top, black, transparent 80%);
}

/* Container & Layout */
.docs-hero-container {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* Content Side */
.docs-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.6rem 1.2rem;
    background: rgba(239, 68, 68, 0.05);
    color: var(--primary);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(239, 68, 68, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.1);
    transition: all 0.3s ease;
}

.hero-badge:hover {
    background: rgba(239, 68, 68, 0.1);
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.2);
    transform: translateY(-2px);
}

.docs-hero-content h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-main);
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, #f59e0b 50%, var(--primary) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-flow 5s linear infinite;
}

@keyframes gradient-flow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.docs-hero-content p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 550px;
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

.hero-cta-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-hero-primary {
    padding: 0.8rem 1.8rem;
    background: var(--primary);
    color: white;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
    background: var(--primary-dark);
}

.btn-hero-secondary {
    padding: 0.8rem 1.8rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-muted);
    transform: translateY(-2px);
}

/* Visual Side (3D Composition) */
.docs-hero-visual-wrapper {
    position: relative;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
}

.hero-3d-composition {
    position: relative;
    width: 400px;
    height: 400px;
    transform-style: preserve-3d;
    animation: composition-float 8s ease-in-out infinite;
}

@keyframes composition-float {

    0%,
    100% {
        transform: translateY(0) rotateX(10deg) rotateY(-10deg);
    }

    50% {
        transform: translateY(-20px) rotateX(15deg) rotateY(-5deg);
    }
}

/* Central Core */
.composition-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    transform-style: preserve-3d;
}

.core-cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: core-spin 12s linear infinite;
}

.core-cube .face {
    position: absolute;
    width: 120px;
    height: 120px;
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid rgba(239, 68, 68, 0.6);
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.2) inset;
    backdrop-filter: blur(4px);
}

.core-cube .face.front {
    transform: rotateY(0deg) translateZ(60px);
}

.core-cube .face.back {
    transform: rotateY(180deg) translateZ(60px);
}

.core-cube .face.right {
    transform: rotateY(90deg) translateZ(60px);
}

.core-cube .face.left {
    transform: rotateY(-90deg) translateZ(60px);
}

.core-cube .face.top {
    transform: rotateX(90deg) translateZ(60px);
}

.core-cube .face.bottom {
    transform: rotateX(-90deg) translateZ(60px);
}

@keyframes core-spin {
    0% {
        transform: rotateX(-15deg) rotateY(0deg);
    }

    100% {
        transform: rotateX(-15deg) rotateY(360deg);
    }
}

.core-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: var(--primary);
    filter: blur(40px);
    opacity: 0.6;
    animation: core-pulse 3s ease-in-out infinite;
}

@keyframes core-pulse {

    0%,
    100% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

/* Orbit Rings */
.orbit-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

.ring-x {
    width: 300px;
    height: 300px;
    transform: translate(-50%, -50%) rotateX(70deg);
    border-color: rgba(59, 130, 246, 0.3);
    animation: ring-spin-x 10s linear infinite;
}

.ring-y {
    width: 240px;
    height: 240px;
    transform: translate(-50%, -50%) rotateY(70deg);
    border-color: rgba(239, 68, 68, 0.3);
    animation: ring-spin-y 12s linear infinite;
}

@keyframes ring-spin-x {
    0% {
        transform: translate(-50%, -50%) rotateX(70deg) rotateZ(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotateX(70deg) rotateZ(360deg);
    }
}

@keyframes ring-spin-y {
    0% {
        transform: translate(-50%, -50%) rotateY(70deg) rotateZ(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotateY(70deg) rotateZ(360deg);
    }
}

/* Floating Cards */
.float-card {
    position: absolute;
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 1.5rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.float-card i {
    font-size: 1.2rem;
}

.float-card span {
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.9rem;
}

.card-top-right {
    top: 10%;
    right: 0%;
    transform: translateZ(80px);
    animation: float-card-1 6s ease-in-out infinite;
}

.card-top-right i {
    color: #f59e0b;
}

.card-bottom-left {
    bottom: 15%;
    left: 0%;
    transform: translateZ(60px);
    animation: float-card-2 7s ease-in-out infinite 1s;
}

.card-bottom-left i {
    color: #8b5cf6;
}

.card-bottom-right {
    bottom: 25%;
    right: 5%;
    transform: translateZ(40px);
    animation: float-card-3 8s ease-in-out infinite 2s;
}

.card-bottom-right i {
    color: #10b981;
}

@keyframes float-card-1 {

    0%,
    100% {
        transform: translateZ(80px) translateY(0);
    }

    50% {
        transform: translateZ(80px) translateY(-15px);
    }
}

@keyframes float-card-2 {

    0%,
    100% {
        transform: translateZ(60px) translateY(0);
    }

    50% {
        transform: translateZ(60px) translateY(15px);
    }
}

@keyframes float-card-3 {

    0%,
    100% {
        transform: translateZ(40px) translateY(0);
    }

    50% {
        transform: translateZ(40px) translateY(-10px);
    }
}

/* --- Glass Dashboard Layout --- */
.docs-dashboard {
    max-width: 1400px;
    margin: -60px auto 0;
    padding: 0 20px 60px;
    position: relative;
    z-index: 10;
}

.dashboard-container {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    gap: 2rem;
    align-items: start;
}

/* Sticky Sidebar */
.docs-sidebar {
    position: sticky;
    top: 100px;
    height: calc(100vh - 120px);
}

.sidebar-glass-panel {
    height: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    overflow-y: auto;
    box-shadow: var(--glass-shadow);
    transition: background 0.3s ease;
}

.sidebar-header h3 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 700;
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-section h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
    padding-left: 0.8rem;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
}

.sidebar-nav li {
    margin-bottom: 0.25rem;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.75rem 1rem;
    color: var(--text-main);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    font-weight: 500;
}

.sidebar-nav a i {
    width: 20px;
    text-align: center;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.sidebar-nav a:hover i {
    color: var(--primary);
}

.sidebar-nav a.active {
    background: rgba(239, 68, 68, 0.1);
    color: var(--primary);
    border: 1px solid rgba(239, 68, 68, 0.2);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.1);
}

.sidebar-nav a.active i {
    color: var(--primary);
}

/* Main Content Area */
.docs-content-area {
    min-height: 100vh;
}

.glass-section {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    margin-bottom: 2rem;
    box-shadow: var(--glass-shadow);
    scroll-margin-top: 120px;
    transition: background 0.3s ease;
}

.section-header-3d {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.header-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), #dc2626);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
    transform: rotate(-5deg);
}

.glass-section h2 {
    font-size: 2rem;
    margin: 0;
    color: var(--text-main);
}

.lead {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

/* Info Cards Grid */
.info-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.info-card-glass {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 16px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dark-mode .info-card-glass {
    background: rgba(15, 23, 42, 0.4);
    border-color: rgba(255, 255, 255, 0.05);
}

.info-card-glass:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border-color: var(--primary);
}

.info-card-glass .icon-box {
    width: 40px;
    height: 40px;
    background: rgba(239, 68, 68, 0.1);
    color: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.info-card-glass h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.info-card-glass p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

/* Code Blocks */
.code-preview-block {
    background: #1e293b;
    border-radius: 16px;
    overflow: hidden;
    margin: 1.5rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.code-header {
    background: #0f172a;
    padding: 0.8rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.window-controls {
    display: flex;
    gap: 6px;
}

.window-controls span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #475569;
}

.window-controls span:nth-child(1) {
    background: #ef4444;
}

.window-controls span:nth-child(2) {
    background: #f59e0b;
}

.window-controls span:nth-child(3) {
    background: #22c55e;
}

.code-header span {
    color: #94a3b8;
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
}

.copy-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
}

.copy-btn.copied {
    background: rgba(34, 197, 94, 0.2);
    border-color: #22c55e;
    color: #22c55e;
}

pre {
    margin: 0;
    padding: 1.5rem;
    overflow-x: auto;
    background: #1e293b;
}

code {
    font-family: 'JetBrains Mono', monospace;
    color: #e2e8f0;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Animation Showcase Grid */
.animation-grid-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.anim-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.dark-mode .anim-card {
    background: rgba(30, 41, 59, 0.4);
}

.anim-card:hover {
    border-color: var(--primary);
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.1);
    transform: translateY(-5px);
}

.anim-preview {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), #dc2626);
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3);
}

.anim-card span {
    font-weight: 600;
    color: var(--text-main);
}

.try-btn {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0;
    transform: translateY(10px);
}

.anim-card:hover .try-btn {
    opacity: 1;
    transform: translateY(0);
}

.try-btn:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 10px var(--primary-glow);
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .docs-hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .docs-hero-content p {
        margin: 0 auto 2rem;
    }

    .docs-hero-visual {
        height: 300px;
    }

    .dashboard-container {
        grid-template-columns: 1fr;
    }

    .docs-sidebar {
        display: none;
    }

    .docs-content-area {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .docs-hero-content h1 {
        font-size: 2.5rem;
    }

    .glass-section {
        padding: 1.5rem;
    }
}