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

body {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: #f8fafc;
    overflow-x: hidden;
    cursor: url('assets/cursor/cursor.svg'), auto;
    transition: background-color 0.5s ease, color 0.5s ease;
    position: relative;
    min-height: 100vh;
}

h1, h2, h3, h4, p, ul, li, span, code { cursor: text; }
button, a, .sidebar-link, select { cursor: url('assets/cursor/pointinghand.svg'), pointer; }

.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.3;
    animation: float 20s infinite ease-in-out;
    pointer-events: none;
}
.orb-1 { width: 500px; height: 500px; background: #f97316; top: -20%; left: -10%; }
.orb-2 { width: 400px; height: 400px; background: #ec4899; bottom: -20%; right: -10%; animation-delay: -5s; }
.orb-3 { width: 300px; height: 300px; background: #8b5cf6; top: 40%; left: 50%; animation-delay: -10s; opacity: 0.15; }

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(40px, -60px) scale(1.1); }
    66% { transform: translate(-30px, 30px) scale(0.9); }
}

#loading-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: #f8fafc; display: flex; justify-content: center; align-items: center;
    z-index: 9999; opacity: 1; transition: opacity 0.5s ease-out;
}
#loading-overlay.hidden { opacity: 0; pointer-events: none; }
.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1); border-left-color: #f97316;
    border-radius: 50%; width: 50px; height: 50px; animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.nav-wrapper { position: fixed; top: 20px; z-index: 120; display: flex; align-items: center; }
.home-wrapper { left: 20px; }
.settings-wrapper { right: 20px; }
.filter {
    width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.192); box-shadow: 0px 10px 10px rgba(0, 0, 0, 0.021);
    transition: all 0.3s; background-color: rgba(255,255,255,0.5); backdrop-filter: blur(8px);
}
.filter svg { height: 16px; fill: rgb(77, 77, 77); transition: all 0.3s; }
.filter:hover { box-shadow: 0px 10px 10px rgba(0, 0, 0, 0.11); background-color: rgb(59, 59, 59); }
.filter:hover svg { fill: white; }

.settings-dropdown {
    position: absolute; top: calc(100% + 10px); right: 0;
    background: #ffffff; border: 1px solid rgba(0, 0, 0, 0.12); border-radius: 14px; padding: 18px 22px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12); opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease, background-color 0.4s ease, border-color 0.4s ease;
    z-index: 100; min-width: 200px;
}
.settings-dropdown.show { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.settings-label { font-size: 14px; font-weight: 600; color: #333; transition: color 0.4s ease; }

.switch { position: relative; display: inline-block; width: 60px; height: 34px; }
.switch #theme-toggle { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #2196f3; -webkit-transition: 0.4s; transition: 0.4s; z-index: 0; overflow: hidden; }
.sun-moon { position: absolute; content: ""; height: 26px; width: 26px; left: 4px; bottom: 4px; background-color: yellow; -webkit-transition: 0.4s; transition: 0.4s; }
#theme-toggle:checked + .slider { background-color: black; }
#theme-toggle:checked + .slider .sun-moon { -webkit-transform: translateX(26px); -ms-transform: translateX(26px); transform: translateX(26px); background-color: white; -webkit-animation: rotate-center 0.6s ease-in-out both; animation: rotate-center 0.6s ease-in-out both; }
.moon-dot { opacity: 0; transition: 0.4s; fill: gray; }
#theme-toggle:checked + .slider .sun-moon .moon-dot { opacity: 1; }
.slider.round { border-radius: 34px; } .slider.round .sun-moon { border-radius: 50%; }
#moon-dot-1 { left: 10px; top: 3px; position: absolute; width: 6px; height: 6px; z-index: 4; }
#moon-dot-2 { left: 2px; top: 10px; position: absolute; width: 10px; height: 10px; z-index: 4; }
#moon-dot-3 { left: 16px; top: 18px; position: absolute; width: 3px; height: 3px; z-index: 4; }
#light-ray-1 { left: -8px; top: -8px; position: absolute; width: 43px; height: 43px; z-index: -1; fill: white; opacity: 10%; }
#light-ray-2 { left: -50%; top: -50%; position: absolute; width: 55px; height: 55px; z-index: -1; fill: white; opacity: 10%; }
#light-ray-3 { left: -18px; top: -18px; position: absolute; width: 60px; height: 60px; z-index: -1; fill: white; opacity: 10%; }
.cloud-light { position: absolute; fill: #eee; animation-name: cloud-move; animation-duration: 6s; animation-iteration-count: infinite; }
.cloud-dark { position: absolute; fill: #ccc; animation-name: cloud-move; animation-duration: 6s; animation-iteration-count: infinite; animation-delay: 1s; }
#cloud-1 { left: 30px; top: 15px; width: 40px; } #cloud-2 { left: 44px; top: 10px; width: 20px; } #cloud-3 { left: 18px; top: 24px; width: 30px; } #cloud-4 { left: 36px; top: 18px; width: 40px; } #cloud-5 { left: 48px; top: 14px; width: 20px; } #cloud-6 { left: 22px; top: 26px; width: 30px; }
@keyframes cloud-move { 0% { transform: translateX(0px); } 40% { transform: translateX(4px); } 80% { transform: translateX(-4px); } 100% { transform: translateX(0px); } }
.stars { transform: translateY(-32px); opacity: 0; transition: 0.4s; }
.star { fill: white; position: absolute; -webkit-transition: 0.4s; transition: 0.4s; animation-name: star-twinkle; animation-duration: 2s; animation-iteration-count: infinite; }
#theme-toggle:checked + .slider .stars { -webkit-transform: translateY(0); -ms-transform: translateY(0); transform: translateY(0); opacity: 1; }
#star-1 { width: 20px; top: 2px; left: 3px; animation-delay: 0.3s; } #star-2 { width: 6px; top: 16px; left: 3px; } #star-3 { width: 12px; top: 20px; left: 10px; animation-delay: 0.6s; } #star-4 { width: 18px; top: 0px; left: 18px; animation-delay: 1.3s; }
@keyframes star-twinkle { 0% { transform: scale(1); } 40% { transform: scale(1.2); } 80% { transform: scale(0.8); } 100% { transform: scale(1); } }
@keyframes rotate-center { 0% { transform: translateX(26px) rotate(0); } 100% { transform: translateX(26px) rotate(360deg); } }

.docs-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.sidebar {
    position: sticky;
    top: 100px;
    height: calc(100vh - 120px);
    overflow-y: auto;
    padding-right: 10px;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }

.sidebar-category {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin-top: 24px;
    margin-bottom: 8px;
    padding-left: 12px;
}
.sidebar-link {
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    color: #475569;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
    text-decoration: none;
}
.sidebar-link:hover { background: rgba(249, 115, 22, 0.05); color: #f97316; }
.sidebar-link.active {
    background: rgba(249, 115, 22, 0.1);
    color: #f97316;
    font-weight: 600;
    border-left-color: #f97316;
}

.docs-content {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.03);
    margin-bottom: 60px;
}

.docs-section {
    padding-bottom: 40px;
    margin-bottom: 40px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    scroll-margin-top: 100px;
}
.docs-section:last-child { border-bottom: none; margin-bottom: 0; }

.docs-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.docs-icon-box {
    width: 40px; height: 40px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.docs-text { font-size: 15px; line-height: 1.7; color: #475569; word-break: break-word; }
.docs-text strong { color: #1e293b; }
.docs-subheading {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #334155;
    margin-top: 24px;
    margin-bottom: 8px;
}

pre {
    background: #1e293b; color: #e2e8f0; padding: 16px; border-radius: 12px;
    font-family: 'JetBrains Mono', monospace; font-size: 13px; overflow-x: auto;
    border: 1px solid #334155; margin: 12px 0;
}
code { font-family: 'JetBrains Mono', monospace; background: rgba(0,0,0,0.05); padding: 2px 6px; border-radius: 4px; font-size: 0.9em; color: #db2777; word-break: break-word; }

.mobile-nav-select {
    display: none;
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(255,255,255,0.8);
    border: 1px solid rgba(0,0,0,0.1);
    margin-bottom: 24px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
}

/* Music credit card styling */
.music-credit-card {
    display: flex;
    gap: 16px;
    padding: 16px;
    border-radius: 14px;
    background: rgba(249, 115, 22, 0.03);
    border: 1px solid rgba(249, 115, 22, 0.1);
    transition: all 0.3s ease;
    align-items: center;
}
.music-credit-card:hover {
    background: rgba(249, 115, 22, 0.06);
    border-color: rgba(249, 115, 22, 0.2);
    transform: translateY(-2px);
}

.music-credit-artwork-link {
    display: block;
    line-height: 0;
    flex-shrink: 0;
}

.music-credit-artwork {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.music-credit-artwork:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.music-credit-info { flex: 1; min-width: 0; }
.music-credit-title { font-size: 15px; font-weight: 600; color: #1e293b; margin-bottom: 2px; }
.music-credit-artist { font-size: 14px; color: #f97316; font-weight: 500; margin-bottom: 4px; }
.music-credit-note { font-size: 13px; color: #64748b; line-height: 1.5; }

.copyright-notice-box {
    background: rgba(239, 68, 68, 0.04);
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: 14px;
    padding: 18px 20px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .docs-container { grid-template-columns: 1fr; gap: 0; }
    .sidebar { display: none; }
    .mobile-nav-select { display: block; }
    .docs-content { 
        padding: 20px; 
        border-radius: 16px;
        margin-bottom: 40px;
    }
    .docs-heading { 
        font-size: 20px; 
        flex-wrap: wrap;
        gap: 8px;
    }
    .docs-subheading { font-size: 16px; }
    .docs-text { 
        font-size: 14px; 
    }
    .docs-icon-box { 
        width: 36px; 
        height: 36px; 
    }
    pre { 
        font-size: 12px; 
        padding: 12px; 
        white-space: pre-wrap; 
        word-break: break-all;
    }
    code { 
        font-size: 0.85em; 
    }
    .music-credit-card { padding: 12px; gap: 12px; }
    .music-credit-artwork { width: 48px; height: 48px; }
    .music-credit-title { font-size: 14px; }
    .music-credit-artist { font-size: 13px; }
    .music-credit-note { font-size: 12px; }
}

@media (max-width: 480px) {
    body { padding-left: 16px; padding-right: 16px; }
    .nav-wrapper.home-wrapper { left: 16px; }
    .nav-wrapper.settings-wrapper { right: 16px; }
    .settings-dropdown {
        right: -16px;
        min-width: calc(100vw - 64px);
        max-width: 280px;
    }
}

[data-theme="dark"] { color-scheme: dark; }
[data-theme="dark"] body { background: #08080d !important; color: #e4e4e7 !important; }
[data-theme="dark"] #loading-overlay { background-color: #08080d !important; }
[data-theme="dark"] .spinner { border-color: rgba(255,255,255,0.1); border-left-color: #fb923c; }

[data-theme="dark"] .orb { opacity: 0.15; }
[data-theme="dark"] .orb-1 { background: #fb923c; }
[data-theme="dark"] .orb-2 { background: #f472b6; }
[data-theme="dark"] .orb-3 { background: #818cf8; opacity: 0.1; }

[data-theme="dark"] .text-gray-900 { color: #f4f4f5 !important; }
[data-theme="dark"] .text-gray-800 { color: #e4e4e7 !important; }
[data-theme="dark"] .text-gray-700 { color: #d1d5db !important; }
[data-theme="dark"] .text-gray-600 { color: #9ca3af !important; }
[data-theme="dark"] .text-gray-500 { color: #71717a !important; }

[data-theme="dark"] .docs-content {
    background: rgba(20, 20, 32, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3) !important;
}
[data-theme="dark"] .docs-section { border-bottom-color: rgba(255,255,255,0.05) !important; }
[data-theme="dark"] .docs-heading { color: #f4f4f5 !important; }
[data-theme="dark"] .docs-text { color: #d1d5db !important; }
[data-theme="dark"] .docs-text strong { color: #f4f4f5 !important; }
[data-theme="dark"] .docs-subheading { color: #e4e4e7 !important; }
[data-theme="dark"] .sidebar-link { color: #9ca3af; }
[data-theme="dark"] .sidebar-link:hover { background: rgba(251, 146, 60, 0.1); color: #fb923c; }
[data-theme="dark"] .sidebar-link.active { background: rgba(251, 146, 60, 0.15); color: #fb923c; }
[data-theme="dark"] .sidebar-category { color: #64748b; }
[data-theme="dark"] .sidebar::-webkit-scrollbar-thumb { background: #4b5563; }

[data-theme="dark"] code { background: rgba(255,255,255,0.08); color: #f472b6; }
[data-theme="dark"] .mobile-nav-select { background: rgba(20,20,32,0.8); border-color: rgba(255,255,255,0.1); color: #e4e4e7; }

[data-theme="dark"] .filter { border-color: rgba(255, 255, 255, 0.12) !important; background-color: rgba(20,20,32,0.5); backdrop-filter: blur(8px); }
[data-theme="dark"] .filter svg { fill: #c4c4cc; }
[data-theme="dark"] .filter:hover { background-color: rgba(255, 255, 255, 0.08) !important; }
[data-theme="dark"] .filter:hover svg { fill: #ffffff; }
[data-theme="dark"] .settings-dropdown { background: rgba(20, 20, 32, 0.85) !important; border-color: rgba(255, 255, 255, 0.1) !important; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5) !important; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
[data-theme="dark"] .settings-label { color: #e4e4e7 !important; }

[data-theme="dark"] .music-credit-card {
    background: rgba(251, 146, 60, 0.05);
    border-color: rgba(251, 146, 60, 0.15);
}
[data-theme="dark"] .music-credit-card:hover {
    background: rgba(251, 146, 60, 0.1);
    border-color: rgba(251, 146, 60, 0.25);
}
[data-theme="dark"] .music-credit-artwork { border-color: rgba(255,255,255,0.1); }
[data-theme="dark"] .music-credit-title { color: #f4f4f5; }
[data-theme="dark"] .music-credit-artist { color: #fb923c; }
[data-theme="dark"] .music-credit-note { color: #9ca3af; }
[data-theme="dark"] .copyright-notice-box {
    background: rgba(239, 68, 68, 0.06);
    border-color: rgba(239, 68, 68, 0.2);
}