:root {
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --bg-sidebar: rgba(15, 23, 42, 0.95);

    --accent-primary: #8b5cf6;
    /* Violet */
    --accent-secondary: #ec4899;
    /* Pink */
    --accent-tertiary: #06b6d4;
    /* Cyan */

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;

    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --neon-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-dark);
    background-image:
        radial-gradient(circle at 10% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(236, 72, 153, 0.15) 0%, transparent 20%);
    background-attachment: fixed;
    margin: 0;
    line-height: 1.6;
    display: flex;
    min-height: 100vh;
}

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

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 4px;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--bg-sidebar);
    backdrop-filter: blur(12px);
    border-right: var(--glass-border);
    position: fixed;
    height: 100vh;
    padding: 2rem 1.5rem;
    box-sizing: border-box;
    z-index: 100;
    transition: transform 0.3s ease;
    overflow-y: auto;
    /* Enable vertical scrolling */
}

.brand {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.brand-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: contain;
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.4);
    flex-shrink: 0;
}

.brand-text {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
    color: var(--accent-tertiary);
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
    word-break: break-word;
    line-height: 1.5;
}

.sidebar-tagline {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin: 0 0 2rem 0;
    opacity: 0.7;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding-left: 0.2rem;
}

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

.nav-links li {
    margin-bottom: 0.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    display: block;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    border: 1px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.1) 0%, transparent 100%);
    color: var(--accent-primary);
    border-color: rgba(139, 92, 246, 0.2);
    transform: translateX(5px);
}

.nav-links a.active {
    box-shadow: -4px 0 0 var(--accent-primary);
}

/* ===========================
   Top Header (mobile / tablet)
=========================== */
.top-header {
    display: none;
    position: sticky;
    top: 0;
    z-index: 200;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.8rem 1.5rem;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.top-header-brand {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--accent-tertiary);
    font-family: 'Press Start 2P', cursive;
    font-size: 0.65rem;
    text-shadow: 0 0 8px rgba(6, 182, 212, 0.5);
}

.top-header-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: contain;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}

.top-header-cta {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-tertiary);
    text-decoration: none;
    border: 1px solid rgba(6, 182, 212, 0.35);
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.top-header-cta:hover {
    background: rgba(6, 182, 212, 0.12);
    color: #fff;
    text-shadow: none;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}

/* Main Content */
.main-content {
    flex-grow: 1;
    margin-left: 280px;
    padding: 4rem 5rem;
    max-width: 1100px;
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #fff, var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

h2 {
    font-size: 2rem;
    color: var(--accent-tertiary);
    margin-top: 4rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

h2::after {
    content: '';
    flex-grow: 1;
    height: 1px;
    background: linear-gradient(to right, var(--accent-tertiary), transparent);
    opacity: 0.3;
}

h3 {
    color: var(--text-primary);
    font-size: 1.4rem;
}

p,
li {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 300;
}

a {
    color: var(--accent-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #fff;
    text-shadow: 0 0 8px var(--accent-secondary);
}

/* Cards (Glassmorphism) */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover {
    transform: translateY(-8px);
    background: rgba(30, 41, 59, 0.9);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(139, 92, 246, 0.3);
}

.card:hover::before {
    opacity: 1;
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}

.card h3 {
    margin-top: 0;
    font-weight: 600;
}

/* Code Blocks */
pre {
    background: #000;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 1.5rem;
    overflow-x: auto;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

code {
    font-family: 'Fira Code', monospace;
    color: var(--accent-secondary);
}

/* Steps */
.step-list li {
    padding-left: 3.5rem;
}

.step-list li::before {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.4);
}

/* Mobile Toggle */
.menu-toggle {
    background: transparent;
    color: #fff;
    border: 1px solid var(--accent-primary);
    font-size: 1.2rem;
}

/* Responsive */
@media (max-width: 900px) {
    .top-header {
        display: flex;
    }

    .main-content {
        padding: 2rem 1.5rem;
        margin-left: 0;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    }

    h1 {
        font-size: 2.5rem;
    }

    .menu-toggle {
        display: flex;
    }
}

@media (max-width: 700px) {
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-desc {
        max-width: 100%;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: var(--glass-border);
    border-radius: 20px;
    padding: 3rem;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 0 50px rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.3);
    animation: modalPop 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes modalPop {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    font-size: 2.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover {
    color: var(--accent-secondary);
}

.modal h2 {
    margin-top: 0;
    color: var(--accent-primary);
    font-family: 'Press Start 2P', cursive;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
    border-bottom: none;
}

.modal-body h3 {
    color: var(--accent-tertiary);
    font-size: 1.2rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.modal-body p {
    font-size: 1.1rem;
    line-height: 1.8;
}

/* ===========================
   Footer (Premium)
=========================== */
.doc-footer {
    margin-top: 5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 3rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Brand Column */
.footer-logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    margin-bottom: 1rem;
}

.footer-logo {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    object-fit: contain;
    box-shadow: 0 0 16px rgba(139, 92, 246, 0.35);
    transition: box-shadow 0.3s ease;
}

.footer-logo-link:hover .footer-logo {
    box-shadow: 0 0 24px rgba(6, 182, 212, 0.5);
}

.footer-brand-name {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.75rem;
    color: var(--accent-tertiary);
    text-shadow: 0 0 8px rgba(6, 182, 212, 0.4);
    line-height: 1.6;
}

.footer-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    max-width: 280px;
}

.footer-live-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(6, 182, 212, 0.15));
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: var(--accent-tertiary) !important;
    padding: 0.55rem 1.2rem;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    text-shadow: none;
}

.footer-live-btn:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(6, 182, 212, 0.3));
    border-color: var(--accent-tertiary);
    box-shadow: 0 0 18px rgba(6, 182, 212, 0.3);
    transform: translateY(-2px);
    color: #fff !important;
    text-shadow: none;
}

/* Footer Columns */
.footer-col-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
    opacity: 0.9;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--accent-primary);
    transform: translateX(4px);
    text-shadow: none;
}

/* Contact Email */
.footer-email {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: var(--accent-secondary) !important;
    text-decoration: none;
    transition: all 0.2s ease;
    word-break: break-all;
}

.footer-email:hover {
    color: #fff !important;
    text-shadow: 0 0 8px var(--accent-secondary);
}

.footer-email svg {
    flex-shrink: 0;
    opacity: 0.8;
}

/* Footer Bottom Bar */
.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
    padding-bottom: 1rem;
    font-size: 0.85rem;
}

.footer-bottom p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

.footer-bottom a {
    color: var(--accent-secondary);
    text-decoration: none;
}

.footer-bottom a:hover {
    color: #fff;
    text-shadow: 0 0 6px var(--accent-secondary);
}

.footer-bottom-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-bottom-links span {
    opacity: 0.4;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--accent-primary);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
    display: none;
    /* Hidden by default */
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    background: var(--accent-secondary);
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.5);
}

.scroll-to-top.visible {
    display: flex;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}