/*
 * Elixcord, a Discord client mod
 * Copyright (c) 2026 Vendicated and contributors
 * SPDX-License-Identifier: GPL-3.0-or-later
 */

/* Discord-aligned design tokens */
:root {
    --header-primary: #ffffff;
    --header-secondary: #b5bac1;
    --text-normal: #dbdee1;
    --text-muted: #949ba4;
    --text-link: #00a8fc;
    --brand-500: #5865f2;
    --brand-560: #4752c4;
    --background-base-lower: #1e1f22;
    --background-base-lowest: #111214;
    --background-secondary: #2b2d31;
    --background-secondary-alt: #232428;
    --background-tertiary: #111214;
    --background-floating: #232428;
    --input-background: #1e1f22;
    --green-360: #23a55a;
    --yellow-360: #f0b232;
    --red-400: #f23f43;
    --orange-400: #f0b232;
    --status-grey: #80848e;
    --font: "gg sans", "Segoe UI", "Noto Sans", "Helvetica Neue", sans-serif;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --max-width: 1120px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--background-base-lowest);
    color: var(--text-normal);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

[dir="rtl"] body {
    font-family: "Noto Sans Arabic", var(--font);
}

a {
    color: var(--text-link);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Header ─────────────────────────────────────────────────────────────── */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(17, 18, 20, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-inner {
    display: flex;
    align-items: center;
    gap: 28px;
    height: 64px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--header-primary);
    font-weight: 700;
    font-size: 17px;
}

.brand img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

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

.nav-links a {
    color: var(--header-secondary);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--header-primary);
    background: rgba(255, 255, 255, 0.06);
    text-decoration: none;
}

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

.lang-select {
    background: var(--input-background);
    color: var(--text-normal);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 7px 10px;
    font-size: 13px;
    font-family: var(--font);
    cursor: pointer;
    outline: none;
}

.lang-select:focus {
    border-color: var(--brand-500);
}

/* ── Buttons ────────────────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: var(--radius-md);
    padding: 11px 22px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: background 0.15s ease;
    text-decoration: none;
}

.btn:hover {
    text-decoration: none;
}

.btn-primary {
    background: var(--brand-500);
    color: #fff;
}

.btn-primary:hover {
    background: var(--brand-560);
}

.btn-secondary {
    background: var(--background-secondary);
    color: var(--text-normal);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: var(--background-secondary-alt);
}

.btn-sm {
    padding: 7px 14px;
    font-size: 13px;
}

/* ── Hero ───────────────────────────────────────────────────────────────── */

.hero {
    padding: 96px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 45% at 50% -5%, rgba(88, 101, 242, 0.18), transparent),
        radial-gradient(ellipse 40% 35% at 85% 20%, rgba(88, 101, 242, 0.07), transparent);
    pointer-events: none;
}

.hero .container {
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--background-secondary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--header-secondary);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 24px;
}

.hero-badge svg {
    color: var(--green-360);
}

.hero-logo {
    width: 112px;
    height: 112px;
    border-radius: 24px;
    margin: 0 auto 28px;
    display: block;
    box-shadow: 0 16px 48px rgba(88, 101, 242, 0.25);
}

.hero h1 {
    color: var(--header-primary);
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    max-width: 720px;
    margin-inline: auto;
}

.hero p {
    color: var(--text-muted);
    font-size: 17px;
    max-width: 640px;
    margin: 0 auto 36px;
}

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

.hero-command {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 560px;
    margin: 0 auto;
    background: var(--background-base-lower);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 12px 12px 12px 18px;
}

.hero-command code {
    flex: 1;
    font-family: "Consolas", "JetBrains Mono", monospace;
    font-size: 13px;
    color: var(--text-normal);
    overflow-x: auto;
    white-space: nowrap;
    text-align: left;
}

.hero-meta {
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 13px;
}

.hero-meta strong {
    color: var(--header-secondary);
}

/* ── Sections ───────────────────────────────────────────────────────────── */

section {
    padding: 72px 0;
}

.section-head {
    text-align: center;
    margin-bottom: 48px;
}

.section-head h2 {
    color: var(--header-primary);
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 10px;
}

.section-head p {
    color: var(--text-muted);
    font-size: 15px;
}

/* ── Feature grid ───────────────────────────────────────────────────────── */

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.feature-card {
    background: var(--background-secondary);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-xl);
    padding: 28px;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.feature-card:hover {
    border-color: rgba(88, 101, 242, 0.4);
    transform: translateY(-2px);
}

.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-lg);
    background: rgba(88, 101, 242, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-500);
    margin-bottom: 18px;
}

.feature-card h3 {
    color: var(--header-primary);
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 14px;
}

/* ── Plugin browser ─────────────────────────────────────────────────────── */

.plugin-search {
    width: 100%;
    max-width: 480px;
    display: block;
    margin: 0 auto 28px;
    background: var(--input-background);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    color: var(--text-normal);
    padding: 13px 18px;
    font-size: 15px;
    font-family: var(--font);
    outline: none;
}

.plugin-search:focus {
    border-color: var(--brand-500);
}

.plugin-tag-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}

.plugin-tag {
    background: var(--background-secondary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--header-secondary);
    font-size: 12px;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 999px;
    cursor: pointer;
    font-family: var(--font);
}

.plugin-tag.active {
    background: var(--brand-500);
    color: #fff;
    border-color: var(--brand-500);
}

.plugins-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 12px;
}

.plugin-card {
    background: var(--background-secondary);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
}

.plugin-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.plugin-card h4 {
    color: var(--header-primary);
    font-size: 15px;
    font-weight: 700;
}

.plugin-badges {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.plugin-pill {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.plugin-pill.required {
    background: rgba(242, 63, 67, 0.15);
    color: var(--red-400);
}

.plugin-pill.default {
    background: rgba(35, 165, 90, 0.15);
    color: var(--green-360);
}

.plugin-card p {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 10px;
}

.plugin-card .plugin-authors {
    color: var(--header-secondary);
    font-size: 12px;
}

.plugin-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 48px 0;
    grid-column: 1 / -1;
}

.plugin-error {
    text-align: center;
    color: var(--text-muted);
    padding: 48px 0;
    grid-column: 1 / -1;
}

/* ── Install ────────────────────────────────────────────────────────────── */

.install-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}

.install-panel {
    max-width: 680px;
    margin: 0 auto;
    background: var(--background-secondary);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-xl);
    padding: 32px;
}

.install-panel[hidden] {
    display: none;
}

.install-panel h3 {
    color: var(--header-primary);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}

.install-panel .install-note {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 18px;
}

.command-row {
    display: flex;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 16px;
}

.command-row code {
    flex: 1;
    background: var(--background-base-lower);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-family: "Consolas", "JetBrains Mono", monospace;
    font-size: 13px;
    color: var(--text-normal);
    overflow-x: auto;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.install-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* ── Status ─────────────────────────────────────────────────────────────── */

.status-list {
    max-width: 780px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.status-item {
    background: var(--background-secondary);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    padding: 18px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.operational { background: var(--green-360); }
.status-dot.degraded { background: var(--yellow-360); }
.status-dot.maintenance { background: var(--status-grey); }
.status-dot.outage { background: var(--red-400); }

.status-info { flex: 1; min-width: 0; }

.status-info h4 {
    color: var(--header-primary);
    font-size: 15px;
    font-weight: 600;
}

.status-info p {
    color: var(--text-muted);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.status-pct {
    color: var(--header-secondary);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.status-history {
    display: flex;
    gap: 2px;
    margin-top: 8px;
}

.status-history span {
    flex: 1;
    height: 22px;
    border-radius: 3px;
    background: var(--green-360);
    opacity: 0.85;
}

.status-history span.degraded { background: var(--yellow-360); }
.status-history span.maintenance { background: var(--status-grey); }
.status-history span.outage { background: var(--red-400); }

.status-loading {
    text-align: center;
    color: var(--text-muted);
    padding: 32px;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */

.site-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: var(--background-base-lower);
    padding: 40px 0;
    margin-top: 40px;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-left {
    color: var(--text-muted);
    font-size: 13px;
}

.footer-left strong {
    color: var(--header-secondary);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer-links a:hover {
    color: var(--header-primary);
    text-decoration: none;
}

/* ── Simple pages (privacy / listen / 404) ─────────────────────────────── */

.page-main {
    padding: 64px 0 96px;
    min-height: 60vh;
}

.page-main h1 {
    color: var(--header-primary);
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 24px;
}

.page-main h2 {
    color: var(--header-primary);
    font-size: 20px;
    font-weight: 700;
    margin: 28px 0 10px;
}

.page-main p,
.page-main li {
    color: var(--text-normal);
    font-size: 15px;
    margin-bottom: 10px;
    max-width: 760px;
}

.page-main ul {
    padding-inline-start: 24px;
}

.card-panel {
    background: var(--background-secondary);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-xl);
    padding: 32px;
    max-width: 760px;
}

.page-center {
    text-align: center;
    padding-top: 48px;
}

.page-center .card-panel {
    margin: 0 auto;
    text-align: center;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 760px) {
    .nav-links {
        display: none;
    }

    .hero {
        padding: 64px 0 56px;
    }

    .hero-command {
        flex-direction: column;
        align-items: stretch;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}
