/* ============================================
   Hue VPN Docs — Main Stylesheet
   Sunset orange × Ocean teal tropical theme
   ============================================ */

:root {
    /* Brand */
    --primary: #ff6b35;
    --primary-dark: #e55a26;
    --primary-light: #ff8f5e;
    --primary-muted: rgba(255, 107, 53, 0.1);
    --accent: #0ea5e9;
    --accent-dark: #0284c7;
    --accent-muted: rgba(14, 165, 233, 0.1);
    --teal: #14b8a6;
    --teal-muted: rgba(20, 184, 166, 0.1);

    /* Neutrals */
    --bg: #ffffff;
    --bg-subtle: #f9fafb;
    --bg-card: #ffffff;
    --sidebar-bg: #f9fafb;
    --border: #e5e7eb;
    --border-subtle: #f3f4f6;
    --text: #111827;
    --text-muted: #6b7280;
    --text-subtle: #9ca3af;

    /* Code */
    --code-bg: #0f172a;
    --code-text: #e2e8f0;
    --code-border: #1e293b;
    --inline-code-bg: #f1f5f9;
    --inline-code-text: #e55a26;

    /* Sidebar */
    --sidebar-width: 260px;
    --topnav-height: 60px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);

    /* Border radius */
    --radius-sm: 4px;
    --radius: 8px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;

    /* Transitions */
    --transition: 150ms ease;
    --transition-md: 250ms ease;
}

/* ===================== Dark Theme ===================== */
[data-theme="dark"] {
    --bg: #0f172a;
    --bg-subtle: #1e293b;
    --bg-card: #1a2744;
    --sidebar-bg: #131f30;
    --border: #2d3f55;
    --border-subtle: #1e2f44;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --text-subtle: #64748b;
    --inline-code-bg: #0f172a;
    --inline-code-text: #fb923c;
    --code-bg: #020617;
    --code-border: #1e293b;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.5), 0 2px 4px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.6), 0 4px 6px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .topnav {
    background: rgba(15, 23, 42, 0.93);
}

[data-theme="dark"] .callout-warning {
    background: rgba(180, 83, 9, 0.15);
    border-color: rgba(180, 83, 9, 0.3);
}
[data-theme="dark"] .callout-warning .callout-title { color: #fbbf24; }
[data-theme="dark"] .callout-warning .callout-text  { color: #fcd34d; }
[data-theme="dark"] .callout-info .callout-text     { color: #38bdf8; }
[data-theme="dark"] .callout-tip .callout-title     { color: #2dd4bf; }
[data-theme="dark"] .callout-tip .callout-text      { color: #5eead4; }

[data-theme="dark"] .tag-free  { background: rgba(21,128,61,.2);   color: #4ade80; }
[data-theme="dark"] .tag-open  { background: rgba(29,78,216,.2);   color: #60a5fa; }
[data-theme="dark"] .tag-paid  { background: rgba(190,24,93,.2);   color: #f472b6; }

[data-theme="dark"] .platform-card { background: var(--bg-card); }
[data-theme="dark"] .app-card      { background: var(--bg-card); }

/* ===================== Reset ===================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto,
        sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===================== Scrollbar ===================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-subtle);
}

/* ===================== Top Navigation ===================== */
.topnav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topnav-height);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 24px;
}

.topnav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.topnav-logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

.topnav-logo-text {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.3px;
}

.topnav-logo-text span {
    color: var(--primary);
}

.topnav-divider {
    width: 1px;
    height: 24px;
    background: var(--border);
    flex-shrink: 0;
}

.topnav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.topnav-links a {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-muted);
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.topnav-links a:hover {
    color: var(--text);
    background: var(--bg-subtle);
}
.topnav-links a.active {
    color: var(--primary);
}

.topnav-right {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    flex-shrink: 0;
}

.topnav-badge {
    font-size: 11px;
    font-weight: 600;
    background: var(--primary-muted);
    color: var(--primary);
    padding: 3px 8px;
    border-radius: 100px;
    letter-spacing: 0.3px;
}

.btn-site {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: var(--radius);
    transition: all var(--transition);
    cursor: pointer;
}

.btn-site:hover {
    background: var(--border-subtle);
    border-color: var(--text-subtle);
    color: var(--text);
}

/* ── Language Toggle ── */
.lang-toggle {
    display: flex;
    align-items: center;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 3px;
    gap: 0;
    flex-shrink: 0;
}

.lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 16px;
    color: var(--text-muted);
    transition: all var(--transition);
    letter-spacing: 0.4px;
    line-height: 1;
}

.lang-btn:hover {
    color: var(--text);
}

.lang-btn.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 1px 3px rgba(255, 107, 53, 0.35);
}

/* ── Theme Toggle ── */
.theme-toggle {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    cursor: pointer;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    flex-shrink: 0;
    line-height: 1;
    color: var(--text-muted);
}
.theme-toggle:hover {
    background: var(--border);
    border-color: var(--text-subtle);
    color: var(--text);
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.hamburger span {
    display: block;
    height: 2px;
    background: var(--text);
    border-radius: 1px;
    transition: all var(--transition-md);
}

/* ===================== Layout ===================== */
.layout {
    display: flex;
    padding-top: var(--topnav-height);
    min-height: 100vh;
}

/* ===================== Sidebar ===================== */
.sidebar {
    position: fixed;
    top: var(--topnav-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--topnav-height));
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px 0 40px;
    flex-shrink: 0;
    z-index: 50;
}

.sidebar-section {
    margin-bottom: 24px;
}

.sidebar-section-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 0 20px;
    margin-bottom: 6px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-muted);
    padding: 7px 20px;
    border-radius: 0;
    text-decoration: none;
    transition: all var(--transition);
    border-left: 2px solid transparent;
    line-height: 1.4;
}

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

.sidebar-link.active {
    color: var(--primary);
    background: var(--primary-muted);
    border-left-color: var(--primary);
    font-weight: 600;
}

.sidebar-link .icon {
    font-size: 15px;
    flex-shrink: 0;
    width: 18px;
    text-align: center;
}

.sidebar-divider {
    height: 1px;
    background: var(--border);
    margin: 12px 20px;
}

/* ===================== Main Content ===================== */
.main {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-width: 0;
    max-width: 900px;
    padding: 48px 48px 80px;
}

/* ===================== Page Hero ===================== */
.page-hero {
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

.page-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.page-breadcrumb a {
    color: var(--text-muted);
}
.page-breadcrumb a:hover {
    color: var(--primary);
}
.page-breadcrumb .sep {
    color: var(--text-subtle);
}

.page-platform-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 100px;
    margin-bottom: 16px;
    background: var(--primary-muted);
    color: var(--primary);
    border: 1px solid rgba(255, 107, 53, 0.2);
}

.page-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.8px;
    line-height: 1.2;
    margin-bottom: 12px;
}

.page-subtitle {
    font-size: 16px;
    color: var(--text-muted);
    max-width: 680px;
    line-height: 1.7;
}

/* ===================== Content Typography ===================== */
.content h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.4px;
    margin: 48px 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.content h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.2px;
    margin: 32px 0 12px;
}

.content h4 {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 24px 0 8px;
}

.content p {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.75;
    margin-bottom: 16px;
}

.content ul,
.content ol {
    margin: 0 0 20px 20px;
}

.content li {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 6px;
}

.content strong {
    color: var(--text);
    font-weight: 600;
}

code {
    font-family:
        "SF Mono", "Fira Code", "Cascadia Code", "JetBrains Mono", Consolas,
        monospace;
    font-size: 13px;
}

.content p code,
.content li code {
    background: var(--inline-code-bg);
    color: var(--inline-code-text);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12.5px;
}

/* ===================== Code Block ===================== */
.code-block {
    position: relative;
    margin: 20px 0;
    border-radius: var(--radius-md);
    background: var(--code-bg);
    border: 1px solid var(--code-border);
    overflow: hidden;
}

.code-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.code-block-label {
    font-size: 11.5px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.copy-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}

.copy-btn:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.14);
}

.copy-btn.copied {
    color: #4ade80;
    border-color: rgba(74, 222, 128, 0.3);
    background: rgba(74, 222, 128, 0.1);
}

.code-block pre {
    padding: 18px 20px;
    overflow-x: auto;
    color: var(--code-text);
    font-size: 13.5px;
    line-height: 1.65;
    white-space: pre;
    tab-size: 2;
}

.code-block .keyword {
    color: #c084fc;
}
.code-block .string {
    color: #86efac;
}
.code-block .comment {
    color: #64748b;
    font-style: italic;
}
.code-block .value {
    color: #fbbf24;
}
.code-block .url {
    color: #67e8f9;
}

/* ===================== Step List ===================== */
.steps {
    list-style: none;
    margin: 24px 0;
    padding: 0;
    counter-reset: step-counter;
}

.step {
    display: flex;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-subtle);
    counter-increment: step-counter;
}

.step:last-child {
    border-bottom: none;
}

.step-number {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--primary-muted);
    border: 1.5px solid rgba(255, 107, 53, 0.25);
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.step-body {
    flex: 1;
    min-width: 0;
}

.step-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
    line-height: 1.4;
}

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

.step-desc p {
    margin-bottom: 8px;
}
.step-desc p:last-child {
    margin-bottom: 0;
}

/* ===================== App Cards ===================== */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.app-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: all var(--transition-md);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.app-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.app-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--bg-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
    overflow: hidden;
}

.app-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
}

.app-card-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.app-card-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    flex: 1;
}

.app-card-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: var(--radius);
    transition: all var(--transition);
    text-decoration: none;
    border: 1.5px solid transparent;
}

.download-btn-primary {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.download-btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #ffffff;
}

.download-btn-secondary {
    background: transparent;
    color: var(--text-muted);
    border-color: var(--border);
}

.download-btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-muted);
}

.store-icon {
    font-size: 13px;
}

/* ===================== Callout / Alert ===================== */
.callout {
    display: flex;
    gap: 14px;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin: 24px 0;
    border: 1px solid transparent;
}

.callout-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.callout-body {
    flex: 1;
}
.callout-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}
.callout-text {
    font-size: 13.5px;
    line-height: 1.6;
}

.callout-info {
    background: var(--accent-muted);
    border-color: rgba(14, 165, 233, 0.2);
}
.callout-info .callout-title {
    color: var(--accent-dark);
}
.callout-info .callout-text {
    color: #0369a1;
}

.callout-tip {
    background: var(--teal-muted);
    border-color: rgba(20, 184, 166, 0.2);
}
.callout-tip .callout-title {
    color: #0d9488;
}
.callout-tip .callout-text {
    color: #0f766e;
}

.callout-warning {
    background: #fffbeb;
    border-color: #fde68a;
}
.callout-warning .callout-title {
    color: #b45309;
}
.callout-warning .callout-text {
    color: #92400e;
}

/* ===================== Screenshot Gallery ===================== */
.screenshot-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.screenshot-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-subtle);
    aspect-ratio: 9/16;
    cursor: pointer;
    transition: all var(--transition-md);
}

.screenshot-item.desktop {
    aspect-ratio: 16/10;
}

.screenshot-item:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
}

.screenshot-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.screenshot-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
    color: white;
    font-size: 11.5px;
    font-weight: 500;
    padding: 24px 12px 10px;
    text-align: center;
}

/* Screenshot placeholder */
.screenshot-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-subtle);
    padding: 20px;
    text-align: center;
}

.screenshot-placeholder-icon {
    font-size: 32px;
}
.screenshot-placeholder-text {
    font-size: 12px;
    line-height: 1.4;
}

/* ===================== QR Code Section ===================== */
.qr-section {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    padding: 24px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin: 24px 0;
}

.qr-code-wrapper {
    flex-shrink: 0;
    width: 140px;
    height: 140px;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-code-wrapper svg {
    width: 100%;
    height: 100%;
}

.qr-info {
    flex: 1;
}
.qr-info h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}
.qr-info p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.65;
}

/* ===================== Tab Switcher ===================== */
.tab-switcher {
    margin: 24px 0;
}

.tab-header {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
    overflow-x: auto;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-muted);
    padding: 10px 16px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    font-family: inherit;
    margin-bottom: -1px;
}

.tab-btn:hover {
    color: var(--text);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

.tab-panel {
    display: none;
}
.tab-panel.active {
    display: block;
}

/* ===================== Platform Cards (Homepage) ===================== */
.platform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.platform-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-decoration: none;
    transition: all var(--transition-md);
    position: relative;
    overflow: hidden;
}

.platform-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity var(--transition-md);
}

.platform-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

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

.platform-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.platform-icon-ios {
    background: linear-gradient(135deg, #007aff20, #007aff10);
}
.platform-icon-android {
    background: linear-gradient(135deg, #3ddc8420, #3ddc8410);
}
.platform-icon-macos {
    background: linear-gradient(135deg, #ff6b3520, #ff9f4510);
}
.platform-icon-windows {
    background: linear-gradient(135deg, #0078d420, #0078d410);
}
.platform-icon-linux {
    background: linear-gradient(135deg, #fcc62420, #fcc62410);
}

.platform-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.2px;
}

.platform-apps {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.5;
}

.platform-apps span {
    display: inline-block;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 2px 8px;
    margin: 2px 2px 2px 0;
    font-size: 11.5px;
}

.platform-arrow {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}

/* ===================== Hero (Homepage) ===================== */
.home-hero {
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
}

.home-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 600;
    background: var(--primary-muted);
    border: 1px solid rgba(255, 107, 53, 0.2);
    color: var(--primary);
    padding: 5px 14px;
    border-radius: 100px;
    margin-bottom: 28px;
}

.home-hero h1 {
    font-size: clamp(38px, 6vw, 60px);
    font-weight: 900;
    color: var(--text);
    letter-spacing: -2px;
    line-height: 1.1;
    margin-bottom: 20px;
}

.home-hero h1 .gradient-text {
    background: linear-gradient(135deg, var(--primary), #ff9f45, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.home-hero-desc {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    padding: 12px 28px;
    border-radius: 100px;
    text-decoration: none;
    transition: all var(--transition-md);
    box-shadow: 0 4px 16px rgba(255, 107, 53, 0.35);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.45);
    color: #ffffff;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    background: var(--bg-subtle);
    border: 1.5px solid var(--border);
    padding: 12px 28px;
    border-radius: 100px;
    text-decoration: none;
    transition: all var(--transition-md);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-muted);
}

/* ===================== Features Strip ===================== */
.features-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    padding: 32px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin: 0 0 60px;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-muted);
}

.feature-item .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
}

/* ===================== Home Main (no sidebar) ===================== */
.home-main {
    max-width: 1060px;
    margin: 0 auto;
    padding: 0 40px 80px;
}

/* ===================== Section Header ===================== */
.section-header {
    margin-bottom: 28px;
}

.section-label {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.section-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.6px;
    line-height: 1.2;
    margin-bottom: 10px;
}

.section-desc {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 600px;
}

/* ===================== Protocol Info ===================== */
.protocol-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    max-width: 900px;
    gap: 16px;
}

.protocol-card {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.protocol-card-icon {
    font-size: 24px;
    margin-bottom: 12px;
}
.protocol-card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}
.protocol-card-text {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ===================== Manual Config Table ===================== */
.config-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 13.5px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.config-table th {
    background: var(--bg-subtle);
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
}

.config-table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-muted);
    vertical-align: top;
}

.config-table tr:last-child td {
    border-bottom: none;
}

.config-table td:first-child {
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    width: 160px;
}

.config-table td code {
    font-family: monospace;
    font-size: 12.5px;
    background: var(--inline-code-bg);
    color: var(--inline-code-text);
    padding: 1px 5px;
    border-radius: 3px;
}

/* ===================== Footer ===================== */
.footer {
    background: var(--bg-subtle);
    border-top: 1px solid var(--border);
    padding: 40px 40px;
    text-align: center;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    margin-bottom: 12px;
}

.footer-logo-icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

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

.footer-logo-text span {
    color: var(--primary);
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 20px;
}

.footer-links a {
    font-size: 13.5px;
    color: var(--text-muted);
    transition: color var(--transition);
}

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

.footer-copy {
    font-size: 12.5px;
    color: var(--text-subtle);
}

/* ===================== Back to Top ===================== */
.back-to-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-md);
    opacity: 0;
    pointer-events: none;
    z-index: 99;
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}
.back-to-top:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ===================== Tag / Badge ===================== */
.tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.3px;
}

.tag-free {
    background: #dcfce7;
    color: #15803d;
}
.tag-open {
    background: #dbeafe;
    color: #1d4ed8;
}
.tag-paid {
    background: #fce7f3;
    color: #be185d;
}
.tag-recommended {
    background: var(--primary-muted);
    color: var(--primary);
}

/* ===================== Responsive ===================== */
@media (max-width: 1024px) {
    .main {
        padding: 36px 32px 60px;
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 0px;
    }

    .sidebar {
        transform: translateX(-100%);
        width: 260px;
        transition: transform var(--transition-md);
        box-shadow: none;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }

    .main {
        margin-left: 0;
        padding: 24px 20px 60px;
    }

    .hamburger {
        display: flex;
    }
    .topnav-links {
        display: none;
    }
    .topnav-badge {
        display: none;
    }
    .lang-toggle {
        order: -1;
    }

    .page-title {
        font-size: 26px;
    }
    .home-hero h1 {
        letter-spacing: -1px;
    }
    .home-main {
        padding: 0 20px 60px;
    }

    .qr-section {
        flex-direction: column;
    }
    .platform-grid {
        grid-template-columns: 1fr 1fr;
    }
    .features-strip {
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .platform-grid {
        grid-template-columns: 1fr;
    }
    .app-grid {
        grid-template-columns: 1fr;
    }
    .screenshot-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
    .home-hero {
        padding: 48px 0 40px;
    }
}

/* ===================== Sidebar overlay ===================== */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 49;
}

.sidebar-overlay.visible {
    display: block;
}

/* ===================== On-page nav (right) ===================== */
.on-page-nav {
    position: fixed;
    top: calc(var(--topnav-height) + 40px);
    right: 32px;
    width: 190px;
    display: none;
}

@media (min-width: 1300px) {
    .on-page-nav {
        display: block;
    }
    .main {
        max-width: 820px;
    }
}

.on-page-nav-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 10px;
}

.on-page-nav a {
    display: block;
    font-size: 12.5px;
    color: var(--text-muted);
    padding: 4px 0;
    border-left: 2px solid var(--border);
    padding-left: 12px;
    transition: all var(--transition);
}

.on-page-nav a:hover {
    color: var(--primary);
    border-color: var(--primary-light);
}
.on-page-nav a.active {
    color: var(--primary);
    border-color: var(--primary);
    font-weight: 600;
}

/* ===================== Animations ===================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.4s ease forwards;
}

/* ===================== Print ===================== */
@media print {
    .topnav,
    .sidebar,
    .back-to-top,
    .on-page-nav {
        display: none !important;
    }
    .main {
        margin: 0;
        padding: 20px;
    }
}
