/* ═══════════════════════════════════════════════════════════════
   SPECTRE SCRIPTS - Site Premium
   Variables & Reset
   ═══════════════════════════════════════════════════════════════ */
:root {
    --bg-dark: #0a0a0f;
    --bg-card: #12121a;
    --bg-card-hover: #1a1a26;
    --accent: #c9a227;
    --accent-dim: #a8861f;
    --accent-glow: rgba(201, 162, 39, 0.4);
    --accent-subtle: rgba(201, 162, 39, 0.15);
    --text: #e8e8ed;
    --text-muted: #8a8a9a;
    --border: rgba(255, 255, 255, 0.06);
    --success: #22c55e;
    --warning: #e8a317;
    --danger: #ef4444;
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Rajdhani', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

.admin-page-link {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
}

.admin-page-link:hover {
    text-decoration: underline;
}

body {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg-dark);
    overflow-x: hidden;
}

body.loaded .hero-badge {
    animation: fadeIn 0.8s ease-out;
}

body.loaded .hero-title {
    animation: fadeIn 1s ease-out 0.2s both;
}

body.loaded .hero-subtitle {
    animation: fadeIn 1s ease-out 0.4s both;
}

body.loaded .hero-stats {
    animation: fadeIn 1s ease-out 0.6s both;
}

body.loaded .hero-cta {
    animation: fadeIn 1s ease-out 0.8s both;
}

/* ═══════════════════════════════════════════════════════════════
   Particules de fond
   ═══════════════════════════════════════════════════════════════ */
#particles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
}

/* ═══════════════════════════════════════════════════════════════
   Navigation
   ═══════════════════════════════════════════════════════════════ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 2rem;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: transform 0.3s ease, background 0.3s ease;
}

.nav.scrolled {
    background: rgba(10, 10, 15, 0.95);
}

.nav.hidden {
    transform: translateY(-100%);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-icon {
    color: var(--accent);
    font-size: 1.5rem;
    text-shadow: 0 0 20px var(--accent-glow);
    animation: pulse-glow 2s ease-in-out infinite;
}

.logo-text {
    letter-spacing: 0.2em;
}

.logo-script {
    color: var(--accent);
    font-weight: 500;
    letter-spacing: 0.15em;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--accent);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
}

/* ═══════════════════════════════════════════════════════════════
   Hero Section
   ═══════════════════════════════════════════════════════════════ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 2rem 4rem;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(201, 162, 39, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 80%, rgba(201, 162, 39, 0.06) 0%, transparent 40%),
        radial-gradient(ellipse 40% 30% at 20% 90%, rgba(201, 162, 39, 0.04) 0%, transparent 40%);
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 70%);
}

.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float-glow 8s ease-in-out infinite;
}

.hero-glow-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-glow);
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 0s;
}

.hero-glow-2 {
    width: 300px;
    height: 300px;
    background: rgba(201, 162, 39, 0.2);
    bottom: 10%;
    right: 20%;
    animation-delay: -3s;
}

.hero-glow-3 {
    width: 200px;
    height: 200px;
    background: rgba(201, 162, 39, 0.15);
    bottom: 30%;
    left: 10%;
    animation-delay: -5s;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: var(--accent-subtle);
    border: 1px solid rgba(201, 162, 39, 0.3);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: var(--accent);
    margin-bottom: 2rem;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

.hero-title-line {
    display: block;
}

.hero-title-line.accent {
    color: var(--accent);
    text-shadow: 0 0 60px var(--accent-glow);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 3rem;
    font-weight: 500;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-bottom: 3rem;
}

.hero-stat {
    text-align: center;
}

.hero-stat-value {
    display: block;
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
}

.hero-stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-dark);
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
    background: var(--accent-dim);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-secondary {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}

.btn-secondary:hover {
    background: var(--accent-subtle);
    transform: translateY(-2px);
}

.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-indicator {
    width: 24px;
    height: 40px;
    border: 2px solid var(--text-muted);
    border-radius: 12px;
    position: relative;
}

.scroll-indicator::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--accent);
    border-radius: 2px;
    animation: scroll-bounce 2s ease-in-out infinite;
}

/* ═══════════════════════════════════════════════════════════════
   Sections communes
   ═══════════════════════════════════════════════════════════════ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent);
    background: var(--accent-subtle);
    padding: 0.35rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    letter-spacing: 0.1em;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-desc {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════════
   Scripts Section
   ═══════════════════════════════════════════════════════════════ */
.scripts {
    position: relative;
    z-index: 1;
    padding: 6rem 0;
}

.scripts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}

.script-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    will-change: transform;
}

.script-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.script-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(201, 162, 39, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 40px rgba(201, 162, 39, 0.1);
}

.script-card:hover::before {
    opacity: 1;
}

.script-icon {
    width: 56px;
    height: 56px;
    background: var(--accent-subtle);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
}

.script-card h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.script-path {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.script-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.script-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.script-stars {
    color: var(--accent);
    font-size: 1rem;
}

.script-rating-value {
    font-weight: 600;
    color: var(--text);
}

.script-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.script-tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    color: var(--text-muted);
}

.script-card-link {
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.script-card:hover .script-card-link {
    opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════
   Documentation
   ═══════════════════════════════════════════════════════════════ */
.docs {
    position: relative;
    z-index: 1;
    padding: 6rem 0;
    background: rgba(0, 0, 0, 0.2);
}

.docs-content {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 3rem;
    align-items: start;
}

.docs-sidebar {
    position: sticky;
    top: 100px;
}

.docs-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.docs-nav-link {
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.docs-nav-link:hover {
    color: var(--accent);
    background: var(--accent-subtle);
}

.docs-nav-link.active {
    color: var(--accent);
    background: var(--accent-subtle);
    font-weight: 600;
}

/* Docs preview (page d'accueil) */
.docs-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.doc-preview-card {
    display: block;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.doc-preview-card:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.docs-cta {
    text-align: center;
}

.docs-main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.doc-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    scroll-margin-top: 100px;
}

.doc-block h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--accent);
}

.doc-path {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.doc-path code {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.doc-block p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.doc-block ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
    color: var(--text-muted);
}

.doc-block li {
    margin-bottom: 0.5rem;
}

.doc-deps {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════
   Avis & Notes
   ═══════════════════════════════════════════════════════════════ */
.reviews {
    position: relative;
    z-index: 1;
    padding: 6rem 0;
}

.reviews-summary {
    display: flex;
    opacity: 0;
    transform: translateY(20px);
    align-items: center;
    justify-content: center;
    gap: 4rem;
    margin-bottom: 4rem;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.rating-overview {
    text-align: center;
}

.rating-stars-large {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.rating-value {
    display: block;
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
}

.rating-count {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.rating-bars {
    flex: 1;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.rating-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
}

.rating-bar span:first-child {
    width: 30px;
    color: var(--accent);
}

.rating-bar .bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.rating-bar .fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-dim));
    border-radius: 4px;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.reviews-summary.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.rating-bar span:last-child {
    width: 30px;
    color: var(--text-muted);
    text-align: right;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.review-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.75rem;
    transition: all 0.3s ease;
    transform-style: preserve-3d;
}

.review-card:hover {
    border-color: rgba(201, 162, 39, 0.2);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.review-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.review-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dim));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: var(--bg-dark);
    flex-shrink: 0;
}

.review-meta {
    flex: 1;
}

.review-meta strong {
    display: block;
    margin-bottom: 0.25rem;
}

.review-meta span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.review-stars {
    color: var(--accent);
    font-size: 1rem;
}

.review-text {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.review-reactions {
    display: flex;
    gap: 0.5rem;
}

.reaction-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reaction-btn:hover {
    background: var(--accent-subtle);
    border-color: rgba(201, 162, 39, 0.3);
    color: var(--accent);
    transform: scale(1.05);
}

.reaction-btn.active {
    background: var(--accent-subtle);
    border-color: var(--accent);
    color: var(--accent);
}

.add-review {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
}

.add-review h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.review-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.review-stars-input {
    display: flex;
    gap: 0.5rem;
    font-size: 2rem;
}

.star-input {
    color: var(--border);
    cursor: pointer;
    transition: all 0.2s ease;
}

.star-input:hover,
.star-input.active {
    color: var(--accent);
    transform: scale(1.2);
}

.review-form textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1rem;
    resize: vertical;
}

.review-form textarea:focus {
    outline: none;
    border-color: var(--accent);
}

/* ═══════════════════════════════════════════════════════════════
   Resources
   ═══════════════════════════════════════════════════════════════ */
.resources {
    position: relative;
    z-index: 1;
    padding: 6rem 0;
    background: rgba(0, 0, 0, 0.2);
}

.resources-tree {
    margin-bottom: 3rem;
}

.tree-code {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    overflow-x: auto;
}

.tree-code code {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text);
    line-height: 1.8;
}

.tree-code .tree-folder {
    color: var(--accent);
}

.tree-code .comment {
    color: var(--text-muted);
}

.quick-start {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.quick-start h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

.quick-start ol {
    padding-left: 1.5rem;
    color: var(--text-muted);
}

.quick-start li {
    margin-bottom: 0.75rem;
}

.quick-start code {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--accent);
}

.resources-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
}

.info-card h4 {
    font-family: var(--font-display);
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--accent);
}

.info-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ═══════════════════════════════════════════════════════════════
   Footer
   ═══════════════════════════════════════════════════════════════ */
.footer {
    position: relative;
    z-index: 1;
    padding: 3rem 0;
    border-top: 1px solid var(--border);
}

.footer-content {
    text-align: center;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text);
    text-decoration: none;
}

.footer-brand:hover {
    color: var(--accent);
}

.footer-brand .logo-icon {
    color: var(--accent);
}

.footer-credit {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.footer-ref {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-ref code {
    color: var(--accent);
}

.footer-admin {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
}

.footer-admin:hover {
    color: var(--accent);
}

/* ═══════════════════════════════════════════════════════════════
   Back to top
   ═══════════════════════════════════════════════════════════════ */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--accent-subtle);
    border-color: var(--accent);
    transform: translateY(-4px);
}

/* ═══════════════════════════════════════════════════════════════
   Animations
   ═══════════════════════════════════════════════════════════════ */
@keyframes pulse-glow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes float-glow {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(20px); }
}

.hero-glow-2 {
    animation-name: float-glow-alt;
}

.hero-glow-3 {
    animation-name: float-glow-alt;
}

@keyframes float-glow-alt {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(10px, -15px); }
}

@keyframes scroll-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
    50% { transform: translateX(-50%) translateY(12px); opacity: 0.5; }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Scroll-triggered animations */
.script-card,
.review-card,
.doc-block {
    opacity: 0;
    transform: translateY(30px);
}

.script-card.visible,
.review-card.visible,
.doc-block.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* ═══════════════════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(10, 10, 15, 0.98);
        padding: 1rem;
        gap: 0.5rem;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .nav-toggle span {
        transition: all 0.3s ease;
    }

    .docs-content {
        grid-template-columns: 1fr;
    }

    .docs-sidebar {
        position: static;
        display: flex;
        overflow-x: auto;
        padding-bottom: 1rem;
    }

    .docs-nav {
        flex-direction: row;
        flex-wrap: nowrap;
    }

    .reviews-summary {
        flex-direction: column;
    }

    .hero-stats {
        gap: 2rem;
    }
}

@media (max-width: 600px) {
    .hero {
        padding: 6rem 1rem 3rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .scripts-grid {
        grid-template-columns: 1fr;
    }

    .reviews-grid {
        grid-template-columns: 1fr;
    }
}
