@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700&display=swap');

:root {
    --bg-color: #050a0f;
    --sidebar-bg: #03070b;
    --card-bg: rgba(255, 255, 255, 0.03);
    --border-color: rgba(255, 255, 255, 0.08);
    --primary-blue: #00a3ff;
    --primary-glow: rgba(0, 163, 255, 0.3);
    --text-main: #ffffff;
    --text-dim: #94a3b8;
    --text-muted: #64748b;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --sidebar-width: 280px;
    --header-height: 72px;
    --transition-fast: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Optimized Background Glow */
.bg-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 10% 10%, rgba(0, 163, 255, 0.04) 0%, transparent 40%),
        radial-gradient(circle at 90% 90%, rgba(0, 163, 255, 0.04) 0%, transparent 40%);
    z-index: -1;
    pointer-events: none;
    will-change: transform;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    height: var(--header-height);
    background: rgba(5, 10, 15, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    justify-content: space-between;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-image {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px var(--primary-glow));
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
}

.logo-text span {
    color: var(--primary-blue);
}

.search-container {
    flex: 0 1 400px;
    position: relative;
    margin: 0 1.5rem;
}

.mobile-search-container {
    display: none;
    position: relative;
    margin-bottom: 1.5rem;
}

.search-input {
    width: 100%;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem 0.5rem 2.2rem;
    border-radius: 50px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    background: rgba(255, 255, 255, 0.05);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    width: 16px;
    height: 16px;
    pointer-events: none;
    z-index: 2;
}

.btn-primary {
    background: var(--primary-blue);
    color: white;
    padding: 0.5rem 1.1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition-fast);
    box-shadow: 0 4px 12px rgba(0, 163, 255, 0.15);
    white-space: nowrap;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(0, 163, 255, 0.25);
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: var(--header-height);
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem;
    overflow-y: auto;
    z-index: 90;
    scrollbar-width: thin;
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.nav-section {
    margin-bottom: 1.5rem;
}

.nav-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.nav-list {
    list-style: none;
}

.nav-item {
    margin-bottom: 0.25rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-dim);
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.nav-link:hover {
    background: var(--card-bg);
    color: var(--text-main);
}

.nav-link.active {
    background: rgba(0, 163, 255, 0.1);
    color: var(--primary-blue);
    font-weight: 500;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    padding: 3rem 2rem;
    max-width: 1000px;
    animation: fadeIn 0.4s ease-out;
}

.content-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.01rem;
    color: #fff;
    line-height: 1.2;
}

p {
    color: var(--text-dim);
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

.doc-section {
    margin-bottom: 3.5rem;
}

h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
    color: var(--text-main);
    scroll-margin-top: 100px;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-main);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 12px;
    transition: var(--transition-smooth);
}

.feature-card:hover {
    border-color: var(--primary-blue);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.feature-icon {
    width: 36px;
    height: 36px;
    background: rgba(0, 163, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--primary-blue);
}

.feature-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 0.95rem;
    margin-bottom: 0;
    max-width: 100%;
}

/* Image Optimization */
.step-img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin: 1.5rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: block;
    background: #0a1118;
}

.info-alert {
    background: rgba(0, 163, 255, 0.04);
    border: 1px solid rgba(0, 163, 255, 0.15);
    padding: 1rem;
    border-radius: 10px;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    margin: 1.5rem 0;
}

.info-alert i {
    color: var(--primary-blue);
    width: 18px;
    margin-top: 2px;
}

.info-alert p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* FAQ & Lists */
.faq-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.doc-list {
    margin: 1.25rem 0;
    padding-left: 1.25rem;
}

.doc-list li {
    margin-bottom: 0.5rem;
    color: var(--text-dim);
}

/* Footer */
.footer {
    margin-top: 3.5rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-links {
    display: flex;
    gap: 1.25rem;
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-link:hover {
    color: var(--primary-blue);
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    padding: 0.5rem;
    cursor: pointer;
}

.menu-toggle .icon-close {
    display: none;
}

body.menu-open .menu-toggle .icon-menu {
    display: none;
}

body.menu-open .menu-toggle .icon-close {
    display: block;
}

.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 85;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    will-change: opacity;
}

@media (max-width: 992px) {
    .header {
        height: 60px;
        padding: 0 1rem;
    }

    .sidebar {
        top: 0;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        width: 280px;
        background: #03070b;
        box-shadow: 5px 0 25px rgba(0, 0, 0, 0.4);
        border-right: 1px solid var(--border-color);
        contain: paint;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar .mobile-search-container {
        display: block;
        margin-top: 4.5rem;
        position: relative;
    }

    .main-content {
        margin-left: 0;
        margin-top: 60px;
        padding: 2rem 1rem;
    }

    .menu-toggle {
        display: block;
    }

    .desktop-search {
        display: none;
    }

    body.menu-open {
        overflow: hidden;
    }

    body.menu-open .menu-overlay {
        opacity: 1;
        visibility: visible;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .footer {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.75rem;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .sidebar {
        width: 85%;
    }

    .btn-primary {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 350px) {
    .logo-text {
        display: none;
    }
}

/* Reduce Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}