/* ============================================================
   SeoPro Documentation – Aurora Premium Design System
   Indigo/Cyan theme – matches the public site branding
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --doc-bg: #060a14;
    --doc-surface: rgba(12, 16, 28, 0.68);
    --doc-surface-solid: rgba(8, 11, 20, 0.92);
    --doc-border: rgba(99, 102, 241, 0.16);
    --doc-border-hover: rgba(99, 102, 241, 0.42);
    --doc-primary: #6366f1;
    --doc-primary-light: #818cf8;
    --doc-primary-soft: #a5b4fc;
    --doc-secondary: #06b6d4;
    --doc-text: #e2e8f0;
    --doc-text-muted: #94a3b8;
    --doc-gradient: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
    --doc-radius: 20px;
    --doc-radius-sm: 14px;
}

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

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(6, 8, 15, 0.6);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #6366f1, #06b6d4);
    border-radius: 6px;
    border: 2px solid rgba(6, 8, 15, 0.6);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #818cf8, #22d3ee);
}

* {
    scrollbar-width: thin;
    scrollbar-color: #6366f1 rgba(6, 8, 15, 0.6);
}

::selection {
    background: rgba(99, 102, 241, 0.35);
    color: #ffffff;
}

/* ===== Base ===== */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background:
        radial-gradient(circle at 15% -10%, rgba(99, 102, 241, 0.2), transparent 40%),
        radial-gradient(circle at 100% 0%, rgba(6, 182, 212, 0.14), transparent 35%),
        var(--doc-bg);
    color: var(--doc-text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Reading progress bar ===== */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 99999;
    background: rgba(148, 163, 184, 0.12);
    pointer-events: none;
}

.reading-progress span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #6366f1, #06b6d4);
    box-shadow: 0 0 14px rgba(99, 102, 241, 0.7);
    transition: width 0.1s linear;
}

/* ===== Sidebar ===== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    background: linear-gradient(180deg, rgba(10, 14, 26, 0.98) 0%, rgba(6, 8, 15, 0.98) 100%);
    padding: 0;
    overflow-y: auto;
    z-index: 1000;
    border-right: 1px solid var(--doc-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
    padding: 30px 25px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.16) 0%, rgba(6, 182, 212, 0.1) 100%);
    border-bottom: 1px solid var(--doc-border);
    position: relative;
    overflow: hidden;
}

.sidebar-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 25px;
    right: 25px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.7), rgba(6, 182, 212, 0.7), transparent);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sidebar-logo .logo-icon {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    border-radius: 14px;
    background: var(--doc-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
}

.sidebar-logo .logo-icon i {
    font-size: 20px;
    color: white;
}

.sidebar-logo h1 {
    font-size: 24px;
    font-weight: 800;
    color: white;
    letter-spacing: -0.5px;
}

.sidebar-logo span {
    display: block;
    font-size: 11px;
    color: var(--doc-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-top: 2px;
}

.sidebar-nav {
    padding: 20px 0 30px;
}

.nav-section {
    margin-bottom: 8px;
}

.nav-section-title {
    padding: 12px 25px 8px;
    font-size: 11px;
    font-weight: 700;
    color: var(--doc-secondary);
    text-transform: uppercase;
    letter-spacing: 1.6px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 25px;
    color: var(--doc-text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    position: relative;
}

.nav-link:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--doc-text);
    border-left-color: var(--doc-primary);
    transform: translateX(3px);
}

.nav-link.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.22), rgba(6, 182, 212, 0.14));
    color: white;
    border-left-color: var(--doc-primary);
    box-shadow: inset 0 0 24px rgba(99, 102, 241, 0.08);
}

.nav-link i {
    width: 20px;
    font-size: 15px;
    color: var(--doc-primary-light);
    text-align: center;
    flex-shrink: 0;
}

.nav-link.active i {
    color: var(--doc-secondary);
}

/* ===== Main content ===== */
.main-content {
    margin-left: 280px;
    padding: 40px 60px;
    min-height: 100vh;
}

.content-header {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(6, 182, 212, 0.12) 100%);
    margin: -40px -60px 40px -60px;
    padding: 64px 60px;
    color: white;
    border-bottom: 1px solid var(--doc-border);
    position: relative;
    overflow: hidden;
}

.content-header::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -80px;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.25), transparent 70%);
    pointer-events: none;
}

.content-header h1 {
    font-size: 38px;
    font-weight: 800;
    letter-spacing: -0.8px;
    margin-bottom: 10px;
    position: relative;
}

.content-header p {
    font-size: 18px;
    opacity: 0.9;
    position: relative;
}

.breadcrumb {
    display: flex;
    gap: 10px;
    font-size: 14px;
    margin-bottom: 20px;
    opacity: 0.85;
    align-items: center;
    position: relative;
}

.breadcrumb a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--doc-secondary);
}

.breadcrumb .bc-sep {
    color: rgba(165, 180, 252, 0.6);
}

/* ===== Sections ===== */
.section {
    background: var(--doc-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--doc-radius);
    padding: 40px;
    margin-bottom: 30px;
    border: 1px solid var(--doc-border);
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.28);
    position: relative;
    overflow: hidden;
    transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.4s ease;
}

.section::before {
    content: '';
    position: absolute;
    inset: 0 auto auto 0;
    width: 3px;
    height: 0;
    background: var(--doc-gradient);
    transition: height 0.5s ease;
}

.section:hover {
    border-color: var(--doc-border-hover);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.16), 0 0 40px rgba(6, 182, 212, 0.06);
}

.section:hover::before {
    height: 100%;
}

/* Reveal on scroll */
.js .section {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.js .section.revealed {
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--doc-text);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    scroll-margin-top: 30px;
    letter-spacing: -0.4px;
}

.section-title i {
    color: var(--doc-primary-light);
    font-size: 22px;
}

.section h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--doc-text);
    margin: 25px 0 15px 0;
    scroll-margin-top: 30px;
}

.section h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--doc-text);
    margin: 20px 0 10px 0;
    scroll-margin-top: 30px;
}

.section p {
    color: var(--doc-text-muted);
    margin-bottom: 15px;
}

.section ul,
.section ol {
    color: var(--doc-text-muted);
    margin-bottom: 15px;
    padding-left: 22px;
}

.section li {
    margin-bottom: 10px;
}

.section li::marker {
    color: var(--doc-primary-light);
}

/* ===== Cards grid ===== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.card {
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid var(--doc-border);
    border-radius: var(--doc-radius-sm);
    padding: 26px 24px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--doc-radius-sm);
    padding: 1px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0), rgba(6, 182, 212, 0));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    transition: all 0.35s ease;
    pointer-events: none;
}

.card:hover {
    transform: translateY(-6px);
    border-color: var(--doc-border-hover);
    box-shadow: 0 18px 44px rgba(99, 102, 241, 0.2), 0 0 30px rgba(6, 182, 212, 0.08);
}

.card:hover::after {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.5), rgba(6, 182, 212, 0.4));
}

.card-icon {
    width: 50px;
    height: 50px;
    background: var(--doc-gradient);
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-shadow: 0 8px 22px rgba(99, 102, 241, 0.35);
}

.card-icon i {
    font-size: 22px;
    color: white;
}

.card h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--doc-text);
    margin-bottom: 8px;
}

.card p {
    font-size: 14px;
    color: var(--doc-text-muted);
    margin: 0;
}

/* ===== Requirements list ===== */
.requirements-list {
    list-style: none;
    padding: 0;
}

.requirements-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px 20px;
    background: rgba(99, 102, 241, 0.05);
    border-radius: 12px;
    margin-bottom: 10px;
    border-left: 4px solid var(--doc-primary);
    transition: background 0.3s ease, transform 0.3s ease;
}

.requirements-list li:hover {
    background: rgba(99, 102, 241, 0.1);
    transform: translateX(4px);
}

.requirements-list li i {
    color: var(--doc-primary-light);
    font-size: 18px;
    margin-top: 2px;
}

.requirements-list li strong {
    color: var(--doc-primary-light);
    min-width: 120px;
    flex-shrink: 0;
}

.requirements-list li span {
    color: var(--doc-text-muted);
}

/* ===== Code blocks with copy button ===== */
.code-block {
    background: var(--doc-surface-solid);
    border: 1px solid var(--doc-border);
    border-radius: var(--doc-radius-sm);
    margin: 15px 0;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(6, 8, 15, 0.35);
}

.code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.16), rgba(6, 182, 212, 0.1));
    border-bottom: 1px solid var(--doc-border);
}

.code-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--doc-primary-soft);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.code-title i {
    color: var(--doc-secondary);
    font-size: 13px;
}

.code-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid rgba(99, 102, 241, 0.35);
    background: rgba(99, 102, 241, 0.14);
    color: var(--doc-primary-soft);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.code-copy-btn:hover {
    background: rgba(99, 102, 241, 0.3);
    color: white;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.code-copy-btn.copied {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.5);
    color: #6ee7b7;
}

.code-block pre {
    color: #7dd3fc;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 13.5px;
    line-height: 1.8;
    margin: 0;
    padding: 18px 20px;
    overflow-x: auto;
}

.code-block .comment {
    color: var(--doc-text-muted);
    font-style: italic;
}

.code-block .command {
    color: var(--doc-primary-soft);
}

/* ===== Steps ===== */
.steps {
    counter-reset: step-counter;
}

.step {
    position: relative;
    padding-left: 74px;
    margin-bottom: 30px;
}

.step::before {
    counter-increment: step-counter;
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 52px;
    height: 52px;
    background: var(--doc-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    font-weight: 800;
    box-shadow: 0 10px 28px rgba(99, 102, 241, 0.4);
}

.step::after {
    content: '';
    position: absolute;
    left: 25px;
    top: 58px;
    bottom: -22px;
    width: 2px;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.5), rgba(6, 182, 212, 0.08));
}

.step:last-child::after {
    display: none;
}

.step h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--doc-text);
    margin-bottom: 10px;
}

.step p {
    color: var(--doc-text-muted);
}

/* ===== Alerts ===== */
.alert {
    padding: 20px 22px;
    border-radius: 13px;
    margin: 20px 0;
    display: flex;
    gap: 15px;
    align-items: flex-start;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.alert:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.35);
}

.alert > i {
    font-size: 22px;
    margin-top: 2px;
    flex-shrink: 0;
}

.alert-info {
    background: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(6, 182, 212, 0.22);
}

.alert-info > i {
    color: var(--doc-secondary);
}

.alert-warning {
    background: rgba(234, 179, 8, 0.08);
    border: 1px solid rgba(234, 179, 8, 0.22);
}

.alert-warning > i {
    color: #eab308;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.22);
}

.alert-danger > i {
    color: #ef4444;
}

.alert-success {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.22);
}

.alert-success > i {
    color: #10b981;
}

.alert-content h5 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--doc-text);
}

.alert-content p {
    font-size: 14px;
    margin: 0;
    color: var(--doc-text-muted);
}

.alert-content a {
    color: var(--doc-primary-soft);
}

/* ===== Table ===== */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--doc-border);
}

thead tr {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(6, 182, 212, 0.1));
}

th,
td {
    text-align: left;
    padding: 13px 16px;
    border-bottom: 1px solid var(--doc-border);
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:nth-child(even) {
    background: rgba(99, 102, 241, 0.04);
}

tbody tr {
    transition: background 0.3s ease;
}

tbody tr:hover {
    background: rgba(99, 102, 241, 0.1);
}

th {
    color: var(--doc-primary-soft);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

td {
    color: var(--doc-text-muted);
    font-size: 14px;
}

/* ===== Inline code ===== */
code {
    display: inline-block;
    font-size: 13px;
    padding: 2px 9px;
    background: rgba(99, 102, 241, 0.14);
    border: 1px solid var(--doc-border);
    color: var(--doc-primary-soft);
    font-family: 'Fira Code', 'Consolas', monospace;
    border-radius: 7px;
    font-weight: 600;
    line-height: 1.5;
}

/* ===== Support card ===== */
.support-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.22) 0%, rgba(6, 182, 212, 0.14) 100%);
    border: 1px solid var(--doc-border);
    border-radius: var(--doc-radius);
    padding: 48px 40px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.support-card::before {
    content: '';
    position: absolute;
    top: -140px;
    left: 50%;
    transform: translateX(-50%);
    width: 480px;
    height: 280px;
    background: radial-gradient(ellipse, rgba(99, 102, 241, 0.3), transparent 70%);
    pointer-events: none;
}

.support-card h3 {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 15px;
    color: white;
    position: relative;
}

.support-card p {
    color: var(--doc-text-muted);
    margin-bottom: 28px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.support-card a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--doc-gradient);
    color: white;
    padding: 15px 32px;
    border-radius: var(--doc-radius-sm);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.35);
    position: relative;
}

.support-card a:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 44px rgba(99, 102, 241, 0.5);
}

/* ===== Footer ===== */
.footer {
    text-align: center;
    padding: 44px 20px;
    color: var(--doc-text-muted);
    border-top: 1px solid var(--doc-border);
    margin-top: 40px;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.6), rgba(6, 182, 212, 0.6), transparent);
}

.footer p {
    margin: 5px 0;
    font-size: 14px;
}

.footer a {
    color: var(--doc-primary-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--doc-secondary);
    text-decoration: underline;
}

/* ===== Floating buttons ===== */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    width: 50px;
    height: 50px;
    background: var(--doc-gradient);
    border: none;
    border-radius: 14px;
    color: white;
    font-size: 20px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mobile-menu-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 10px 28px rgba(99, 102, 241, 0.55);
}

.top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9998;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    background: var(--doc-gradient);
    color: white;
    font-size: 18px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.top-btn:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 14px 36px rgba(99, 102, 241, 0.45);
}

/* ===== Focus ring (a11y) ===== */
a:focus-visible,
button:focus-visible {
    outline: 3px solid rgba(129, 140, 248, 0.6);
    outline-offset: 3px;
    border-radius: 6px;
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .js .section {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .reading-progress span {
        transition: none;
    }
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 24px 0 60px rgba(0, 0, 0, 0.5);
    }

    .main-content {
        margin-left: 0;
        padding: 20px;
    }

    .content-header {
        margin: -20px -20px 30px -20px;
        padding: 44px 24px;
    }

    .content-header h1 {
        font-size: 30px;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .section {
        padding: 26px 22px;
    }
}

@media (max-width: 640px) {
    .content-header h1 {
        font-size: 26px;
    }

    .content-header p {
        font-size: 15px;
    }

    .section {
        padding: 22px 18px;
        border-radius: 16px;
    }

    .section-title {
        font-size: 20px;
    }

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

    .step {
        padding-left: 62px;
    }

    .step::before {
        width: 44px;
        height: 44px;
        font-size: 17px;
    }

    .step::after {
        left: 21px;
    }

    .top-btn {
        bottom: 20px;
        right: 16px;
        width: 48px;
        height: 48px;
    }
}
