/* Reset and base */
*, *::before, *::after { box-sizing: border-box; }
html, body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-position: center center;
    background-size: cover;
    background-attachment: fixed;
    background-repeat: no-repeat;
    transition: background-image 2s ease;
    min-height: 100vh;
    visibility: hidden;
    background-color: #000;
}

/* Layout */
body {
    display: block;
    position: relative;
}

.page-shell {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* Subtle dark overlay for readability over random backgrounds */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    pointer-events: none;
    z-index: 0;
}

/* Sidebar */
.sidebar {
    width: 240px;
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 20px 0;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-header { padding: 10px 20px 20px; border-bottom: 1px solid rgba(255,255,255,0.2); margin-bottom: 10px; }
.sidebar-header h1 { font-family: 'Leckerli One', cursive; color: #fff; font-size: 1.5rem; margin: 0; }
.sidebar-header h1 a,
.sidebar-header h1 a:visited,
.sidebar-header h1 a:hover,
.sidebar-header h1 a:active { text-decoration: none; color: inherit; }
.sidebar-header p { color: rgba(255,255,255,0.7); font-size: 0.85rem; margin: 5px 0 0; }

.nav-section { margin-bottom: 6px; }
.nav-section-title { color: rgba(255,255,255,0.5); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; padding: 10px 20px 6px; }
.nav-link { display: block; color: rgba(255,255,255,0.82); text-decoration: none; padding: 9px 20px; font-size: 0.95rem; border-left: 3px solid transparent; transition: all 0.2s ease; }
.nav-link:hover { background: rgba(255,255,255,0.1); color: #fff; }
.nav-link.active { background: rgba(255,255,255,0.15); color: #fff; border-left-color: #fff; }
.nav-link .icon { margin-right: 8px; width: 18px; display: inline-block; }

/* Main content */
.main-content {
    margin-left: 240px;
    padding: 24px 28px 60px;
    flex: 1;
    position: relative;
    z-index: 1;
}

.doc-section {
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    margin: 18px auto;
    padding: 20px 24px;
    max-width: 900px;
    border-radius: 12px;
    text-align: left;
    scroll-margin-top: 24px;
}

.doc-section h2 { font-size: 1.7rem; margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,0.2); }
.doc-section h3 { font-size: 1.2rem; margin: 18px 0 10px; color: rgba(255,255,255,0.95); }
.doc-section h4 { font-size: 1rem; margin: 14px 0 8px; color: rgba(255,255,255,0.9); }
.doc-section p { margin: 0 0 12px; line-height: 1.6; color: rgba(255,255,255,0.9); }
.doc-section ul { margin: 0 0 14px 20px; }
.doc-section li { margin-bottom: 8px; line-height: 1.5; }
.doc-section a { color: #60a5fa; text-decoration: none; }
.doc-section a:visited { color: #60a5fa; }
.doc-section a:hover { color: #93c5fd; text-decoration: underline; }

/* Cards */
.doc-card { background: rgba(255, 255, 255, 0.15); border-radius: 10px; padding: 18px 20px; margin: 14px 0; backdrop-filter: blur(5px); }
.doc-card-header { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.doc-card-icon { width: 54px; height: 54px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: rgba(0,0,0,0.3); }
.doc-card-icon img { width: 46px; height: 46px; border-radius: 10px; }
.doc-card-title { font-size: 1.25rem; }
.doc-card-subtitle { font-size: 0.9rem; color: rgba(255,255,255,0.7); }

/* Feature grid */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 12px 0; }
.feature-check { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; }
.feature-check .check { color: #4ade80; font-weight: bold; }

/* Tags */
.tag { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; margin-right: 8px; margin-top: 8px; }
.tag.free { background: rgba(74, 222, 128, 0.3); color: #4ade80; }
.tag.subscription { background: rgba(96, 165, 250, 0.3); color: #60a5fa; }
.tag.api { background: rgba(251, 191, 36, 0.3); color: #fbbf24; }

/* Alerts */
.alert { padding: 14px; border-radius: 8px; margin: 14px 0; display: flex; gap: 10px; align-items: flex-start; }
.alert-info { background: rgba(59, 130, 246, 0.4); border-left: 3px solid #3b82f6; }
.alert-tip { background: rgba(34, 197, 94, 0.4); border-left: 3px solid #22c55e; }
.alert-warning { background: rgba(234, 179, 8, 0.4); border-left: 3px solid #eab308; }
.alert-icon { font-size: 1.1rem; }
.alert-content { flex: 1; }
.alert-content strong { display: block; margin-bottom: 4px; }

/* Code */
code { background: rgba(255,255,255,0.15); padding: 2px 6px; border-radius: 4px; font-family: monospace; font-size: 0.9rem; }

/* Community grid */
.community-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-top: 12px; }
.community-card { background: rgba(0, 0, 0, 0.6); border-radius: 12px; padding: 18px; text-align: center; text-decoration: none; color: #fff; transition: transform 0.2s ease, background 0.2s ease; }
.community-card:hover { transform: translateY(-3px); background: rgba(0, 0, 0, 0.75); }
.community-card h4 { margin: 0 0 6px; font-size: 1rem; }
.community-card p { margin: 0; font-size: 0.85rem; color: rgba(255,255,255,0.7); }

/* Download button */
.download-btn { display: inline-block; background: #fff; color: #000; padding: 12px 26px; border-radius: 12px; text-decoration: none; font-weight: bold; font-size: 1rem; margin-top: 14px; transition: transform 0.2s ease, opacity 0.2s ease; }
.download-btn:hover { transform: translateY(-2px); opacity: 0.92; }

/* Footer */
.docs-footer { margin: 26px auto 0; padding: 18px; text-align: center; color: rgba(255,255,255,0.72); max-width: 900px; }
.docs-footer a { color: #fff; text-decoration: none; }
.docs-footer a:hover { text-decoration: underline; }

/* Back to top */
.back-to-top { position: fixed; bottom: 26px; right: 26px; width: 48px; height: 48px; background: rgba(255,255,255,0.22); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; text-decoration: none; transition: background 0.2s ease, transform 0.2s ease; }
.back-to-top:hover { background: rgba(255,255,255,0.3); transform: translateY(-2px); }

/* Small screens: collapse sidebar to top */
@media (max-width: 900px) {
    .sidebar { position: relative; width: 100%; height: auto; display: block; }
    .main-content { margin-left: 0; padding: 18px 16px 50px; }
    .doc-section { width: 100%; }
}
