/* ===== COLOR VARIABLES ===== */
:root {
    --bg: #0f172a;
    --bg-secondary: #1a202c;
    --text: #e2e8f0;
    --text-secondary: #cbd5e1;
    --card: #1e293b;
    --card-hover: #334155;
    --accent: #3b82f6;
    --accent-light: #60a5fa;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --border: #334155;
    --shadow: rgba(0, 0, 0, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.light {
    --bg: #f8fafc;
    --bg-secondary: #f1f5f9;
    --text: #0f172a;
    --text-secondary: #475569;
    --card: #ffffff;
    --card-hover: #f1f5f9;
    --accent: #2563eb;
    --accent-light: #3b82f6;
    --success: #059669;
    --warning: #d97706;
    --danger: #dc2626;
    --border: #e2e8f0;
    --shadow: rgba(0, 0, 0, 0.1);
}

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    transition: var(--transition);
    line-height: 1.6;
    font-size: 15px;
}

/* ===== LAYOUT ===== */
.layout {
    display: flex;
    min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, var(--card) 0%, var(--bg-secondary) 100%);
    height: 100vh;
    position: fixed;
    padding: 30px 0;
    overflow-y: auto;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2);
}

.sidebar-header {
    margin-bottom: 50px;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: var(--transition);
    padding: 16px;
    border-radius: 12px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.logo:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
}

.logo-icon {
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo h1 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: var(--accent);
    letter-spacing: -0.5px;
}

.logo p {
    font-size: 11px;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== SIDEBAR NAVIGATION ===== */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    padding: 0 12px;
}

.nav-link {
    display: block;
    padding: 14px 18px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 10px;
    transition: var(--transition);
    font-size: 14px;
    font-weight: 500;
    position: relative;
    border-left: 3px solid transparent;
    margin-left: 0;
}

.nav-link:hover {
    background: var(--card-hover);
    color: var(--accent-light);
    border-left-color: var(--accent-light);
    padding-left: 22px;
}

.nav-link.active {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.15), transparent);
    color: var(--accent);
    font-weight: 600;
    border-left-color: var(--accent);
    padding-left: 22px;
}

.nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent);
    border-radius: 0 4px 4px 0;
    opacity: 0;
    transition: var(--transition);
}

.nav-link.active::before {
    opacity: 0;
}

/* ===== SIDEBAR FOOTER ===== */
.sidebar-footer {
    margin-top: auto;
    padding: 24px 12px;
    border-top: 1px solid var(--border);
    margin: auto 0 0 0;
}

.theme-toggle {
    width: calc(100% - 4px);
    margin: 0 2px;
    padding: 14px 18px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 13px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.theme-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: var(--transition);
    z-index: 1;
}

.theme-toggle:hover::before {
    left: 100%;
}

.theme-toggle:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.theme-toggle span {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
}

.theme-icon {
    font-size: 16px;
}

.theme-text {
    display: none;
}

@media (min-width: 1024px) {
    .theme-text {
        display: inline;
    }
}

/* ===== MAIN CONTENT ===== */
.main-content {
    margin-left: 280px;
    padding: 60px 50px;
    flex: 1;
}

/* ===== HERO SECTION ===== */
.hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #2563eb 100%);
    border-radius: 16px;
    padding: 80px 40px;
    margin-bottom: 60px;
    text-align: center;
    animation: slideDown 0.6s ease-out;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(100px, -100px);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: white;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero h1 {
    font-size: 52px;
    font-weight: 700;
    color: white;
    margin: 20px 0;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.9);
    margin: 20px 0 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== BADGES ===== */
.badges {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.badge {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.badge-primary {
    background: rgba(59, 130, 246, 0.2);
    color: white;
    border: 1px solid rgba(59, 130, 246, 0.5);
}

.badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: white;
    border: 1px solid rgba(16, 185, 129, 0.5);
}

.badge-custom {
    background: rgba(139, 92, 246, 0.2);
    color: white;
    border: 1px solid rgba(139, 92, 246, 0.5);
}

.badge-info {
    background: rgba(249, 115, 22, 0.2);
    color: white;
    border: 1px solid rgba(249, 115, 22, 0.5);
}

/* ===== HERO CTA ===== */
.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 40px;
}

.btn {
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-primary {
    background: white;
    color: #1e40af;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* ===== SECTIONS ===== */
.section {
    margin-bottom: 80px;
    animation: fadeIn 0.8s ease-out;
}

.section h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--text);
}

.section h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 24px 0 16px;
    color: var(--text);
}

.section-content {
    font-size: 16px;
    line-height: 1.8;
}

.section-content p {
    margin-bottom: 20px;
    color: var(--text-secondary);
}

/* ===== INFO CARD ===== */
.info-card {
    background: var(--card);
    border: 1px solid var(--border);
    padding: 24px;
    border-radius: 12px;
    margin-top: 24px;
}

.info-card h3 {
    margin-top: 0;
    color: var(--accent);
}

/* ===== FEATURES GRID ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.feature-card {
    background: var(--card);
    border: 1px solid var(--border);
    padding: 32px 24px;
    border-radius: 12px;
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    border-color: var(--accent);
    box-shadow: 0 8px 24px var(--shadow);
    transform: translateY(-4px);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

.feature-card h3 {
    font-size: 18px;
    margin: 16px 0 12px;
    color: var(--text);
}

.feature-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== INSTALLATION SECTION ===== */
.install-section {
    margin-bottom: 40px;
}

.install-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.checklist {
    list-style: none;
}

.checklist li {
    padding: 10px 0 10px 32px;
    position: relative;
    color: var(--text-secondary);
}

.checklist li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
    font-size: 18px;
}

/* ===== CODE BLOCKS ===== */
.code-block {
    position: relative;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin: 20px 0;
}

.code-block pre {
    margin: 0;
    padding: 20px;
    overflow-x: auto;
    background: transparent;
    border: none;
    font-size: 13px;
    line-height: 1.6;
}

.code-block code {
    color: var(--text);
}

.copy-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 8px 12px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: var(--transition);
    z-index: 10;
}

.copy-btn:hover {
    background: var(--accent-light);
    transform: scale(1.05);
}

/* ===== BENEFITS LIST ===== */
.benefits-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 40px;
}

.benefit-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: var(--transition);
}

.benefit-item:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 12px var(--shadow);
}

.benefit-icon {
    font-size: 24px;
    flex-shrink: 0;
    color: var(--success);
}

.benefit-item h4 {
    margin: 0 0 8px 0;
    color: var(--text);
}

.benefit-item p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
}

/* ===== FAQ SECTION ===== */
.faq-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 40px;
}

.faq-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text);
    font-size: 16px;
    font-weight: 600;
    transition: var(--transition);
}

.faq-question:hover {
    background: var(--card-hover);
}

.faq-icon {
    font-size: 20px;
    transition: var(--transition);
    color: var(--accent);
}

.faq-item.open .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 20px 20px 20px;
    display: none;
    color: var(--text-secondary);
    line-height: 1.7;
}

.faq-item.open .faq-answer {
    display: block;
    animation: slideDown 0.3s ease-out;
}

/* ===== LEGAL BOX ===== */
.legal-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    padding: 24px;
    border-radius: 12px;
    margin-top: 30px;
}

.legal-box p {
    margin: 12px 0;
    color: var(--text-secondary);
}

.legal-box strong {
    color: var(--text);
}

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    padding: 40px 20px;
    margin-top: 60px;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 14px;
}

.footer p {
    margin: 8px 0;
}

.footer-sub {
    font-size: 12px;
    opacity: 0.7;
}

.heart {
    color: var(--danger);
    animation: heartbeat 1.4s ease-in-out infinite;
}

/* ===== ANIMATIONS ===== */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* ===== SYNTAX HIGHLIGHTING OVERRIDES ===== */
.hljs {
    background: transparent !important;
    color: var(--text);
}

.hljs-attr,
.hljs-attribute {
    color: #60a5fa;
}

.hljs-string {
    color: #34d399;
}

.hljs-number {
    color: #f59e0b;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .main-content {
        padding: 40px 40px;
    }

    .hero h1 {
        font-size: 40px;
    }

    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 20px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .sidebar-header {
        margin-bottom: 20px;
        padding: 0;
    }

    .logo {
        padding: 12px 14px;
        margin-bottom: 16px;
    }

    .sidebar-nav {
        flex-direction: row;
        gap: 8px;
        overflow-x: auto;
        padding: 0;
        margin-bottom: 12px;
        scroll-behavior: smooth;
    }

    .nav-link {
        padding: 10px 14px;
        font-size: 13px;
        white-space: nowrap;
        flex-shrink: 0;
        border-left: none;
    }

    .nav-link:hover,
    .nav-link.active {
        padding-left: 14px;
        border-bottom: 3px solid var(--accent);
    }

    .sidebar-footer {
        padding: 12px 0;
        border-top: 1px solid var(--border);
        margin-top: 12px;
        margin-left: 0;
    }

    .theme-toggle {
        width: 100%;
        padding: 12px 14px;
        font-size: 12px;
    }

    .main-content {
        margin-left: 0;
        padding: 30px 24px;
    }

    .hero {
        padding: 50px 20px;
        margin-bottom: 40px;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
    }

    .badges {
        flex-direction: column;
        align-items: center;
    }

    .section h2 {
        font-size: 28px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .benefit-item {
        gap: 16px;
    }

    .code-block pre {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 20px 16px;
    }

    .hero {
        padding: 40px 16px;
    }

    .hero h1 {
        font-size: 26px;
    }

    .section h2 {
        font-size: 24px;
    }

    .section h3 {
        font-size: 18px;
    }

    .badges {
        gap: 8px;
    }

    .badge {
        padding: 6px 10px;
        font-size: 11px;
    }
}

