/* ========================================
   SPATIALIFY - DOCUMENTATION PAGE STYLES
   ======================================== */

:root {
    --bg: #0a0a0a;
    --text: #ffffff;
    --text-secondary: #999999;
    --primary: #ff99cc;
    --border: rgba(255, 255, 255, 0.06);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    font-family: 'Inter', sans-serif;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
    overflow: hidden;
}

/* Background */
canvas.space-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    display: block;
    filter: brightness(0.5);
}

/* Layout */
.wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0 60px;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    width: 100%;
    flex-shrink: 0;
}

.logo {
    font-family: 'Clash Display', sans-serif;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.3px;
    color: var(--text);
    text-decoration: none;
}

.logo span {
    color: var(--primary);
    font-weight: 400;
}

.nav {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--text);
}

.nav-link.active {
    color: var(--primary);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 40px 0 80px;
    position: relative;
    z-index: 11;
}

/* Doc Layout */
.doc-container {
    display: flex;
    max-width: 1300px;
    margin: -60px 0 40px 300px;
    background: transparent;
    border: none;
    border-radius: 16px;
    padding: -10px;
    max-height: calc(920px - 120px);
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.doc-container::-webkit-scrollbar {
    display: none;
}

/* Sidebar Navigation */
.doc-sidebar {
    position: fixed;
    width: 260px;
    top: 100px;
    height: fit-content;
    z-index: 13;
}

.doc-content {
    margin-left: 320px;
}

.sidebar-title {
    font-family: 'Clash Display', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    padding: 10px 14px;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
}

.sidebar-link.active {
    background: rgba(255, 153, 204, 0.1);
    color: var(--primary);
}

/* Doc Content */
.doc-content {
    max-width: 800px;
}

.doc-section {
    margin-bottom: 60px;
}

.doc-section:last-child {
    margin-bottom: 0;
}

.doc-title {
    font-family: 'Clash Display', sans-serif;
    font-size: 42px;
    font-weight: 600;
    letter-spacing: -1px;
    margin-bottom: 16px;
    background: linear-gradient(100deg, var(--text) 35%, var(--primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.doc-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    font-weight: 300;
    margin-bottom: 40px;
    line-height: 1.7;
}

.doc-heading {
    font-family: 'Clash Display', sans-serif;
    font-size: 24px;
    font-weight: 600;
    margin: 40px 0 20px;
    letter-spacing: -0.5px;
    color: var(--text);
}

.doc-heading-small {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 600;
    margin: 32px 0 16px;
    color: var(--primary);
}

.doc-text {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 20px;
}

.doc-text strong {
    color: var(--text);
    font-weight: 500;
}

.doc-list {
    list-style: none;
    margin: 20px 0;
}

.doc-list li {
    color: var(--text-secondary);
    font-size: 15px;
    padding: 8px 0 8px 28px;
    position: relative;
    line-height: 1.7;
}

.doc-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 16px;
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
}

/* Code Blocks */
.code-block {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 24px;
    margin: 20px 0;
    font-family: 'SF Mono', 'Monaco', monospace;
    font-size: 13px;
    color: var(--text);
    overflow-x: auto;
}

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

/* Info Boxes */
.info-box {
    background: linear-gradient(135deg, rgba(255, 153, 204, 0.08) 0%, rgba(255, 153, 204, 0.03) 100%);
    border: 1px solid rgba(255, 153, 204, 0.15);
    border-radius: 12px;
    padding: 24px;
    margin: 24px 0;
}

.info-box-title {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
    font-size: 15px;
}

.info-box-text {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
}

/* Steps */
.steps {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin: 32px 0;
}

.step {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.step-number {
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: var(--bg);
    font-family: 'Clash Display', sans-serif;
    font-weight: 600;
    font-size: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-title {
    font-weight: 600;
    color: var(--text);
    font-size: 16px;
    margin-bottom: 6px;
}

.step-desc {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
}

/* Feature Cards */
.doc-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 32px 0;
}

.doc-feature {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.2s;
}

.doc-feature:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 153, 204, 0.2);
}

.doc-feature-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 153, 204, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--primary);
}

.doc-feature-icon svg {
    width: 20px;
    height: 20px;
}

.doc-feature-title {
    font-weight: 600;
    color: var(--text);
    font-size: 16px;
    margin-bottom: 8px;
}

.doc-feature-desc {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

/* Table */
.doc-table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 14px;
}

.doc-table th {
    text-align: left;
    padding: 14px 16px;
    font-weight: 600;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.doc-table td {
    padding: 16px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    line-height: 1.6;
}

.doc-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Footer */
.footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--border);
    position: relative;
    z-index: 12;
}

.footer-text {
    color: var(--text-secondary);
    font-size: 14px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 16px;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--primary);
}

/* Copyright */
.copyright {
    position: fixed;
    bottom: 90px;
    right: 60px;
    z-index: 15;
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Visualizador de barrinhas */
.viz-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
    opacity: 0.5;
}

.viz-footer canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Mobile Nav Toggle */
.mobile-toggle {
    display: none;
    width: 32px;
    height: 32px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    cursor: pointer;
}

/* ========== RESPONSIVO ========== */
@media (max-width: 1024px) {
    .doc-container {
        flex-direction: column;
        gap: 40px;
    }
    
    .doc-sidebar {
        position: static;
        width: 100%;
        order: -1;
    }
    
    .doc-content {
        margin-left: 0;
    }
    
    .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .sidebar-title {
        display: none;
    }
    
    .sidebar-link {
        white-space: nowrap;
    }
    
    .copyright {
        display: none;
    }
}

@media (max-width: 768px) {
    .wrapper {
        padding: 0 24px;
    }
    
    .nav-link:nth-child(2),
    .nav-link:nth-child(3) {
        display: none;
    }
    
    .doc-title {
        font-size: 32px;
    }
    
    .doc-features {
        grid-template-columns: 1fr;
    }
    
    .mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .doc-title {
        font-size: 28px;
    }
    
    .doc-heading {
        font-size: 20px;
    }
    
    .sidebar-nav {
        gap: 8px;
    }
    
    .sidebar-link {
        font-size: 13px;
        padding: 8px 12px;
    }
    
    .step {
        flex-direction: column;
        gap: 12px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 12px;
    }
}

/* Animação de fade-in elemento por elemento */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Todos os elementos principais começam invisíveis */
.wrapper > *,
.doc-sidebar > *,
.doc-content > *,
.doc-section,
.doc-card,
.step,
.info-box,
.feature-card,
.faq-item {
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
}

/* Sequência do wrapper */
.wrapper > *:nth-child(1) { animation-delay: 0.1s; }
.wrapper > *:nth-child(2) { animation-delay: 0.3s; }
.wrapper > *:nth-child(3) { animation-delay: 0.5s; }

/* Sequência da sidebar */
.doc-sidebar > *:nth-child(1) { animation-delay: 0.2s; }
.doc-sidebar > *:nth-child(2) { animation-delay: 0.3s; }
.doc-sidebar > *:nth-child(3) { animation-delay: 0.4s; }
.doc-sidebar > *:nth-child(4) { animation-delay: 0.5s; }
.doc-sidebar > *:nth-child(5) { animation-delay: 0.6s; }
.doc-sidebar > *:nth-child(6) { animation-delay: 0.7s; }

/* Sequência do conteúdo principal */
.doc-content > *:nth-child(1) { animation-delay: 0.4s; }
.doc-content > *:nth-child(2) { animation-delay: 0.5s; }
.doc-content > *:nth-child(3) { animation-delay: 0.6s; }
.doc-content > *:nth-child(4) { animation-delay: 0.7s; }
.doc-content > *:nth-child(5) { animation-delay: 0.8s; }
.doc-content > *:nth-child(6) { animation-delay: 0.9s; }
.doc-content > *:nth-child(7) { animation-delay: 1.0s; }
.doc-content > *:nth-child(8) { animation-delay: 1.1s; }
