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

:root {
    --bg:           #060810;
    --bg-2:         #080b12;
    --surface:      #0c1018;
    --surface-2:    #111827;
    --border:       #1a2535;
    --border-2:     #243040;
    --accent:       #41e2fa;
    --accent-dark:  #1ab8d4;
    --accent-dim:   #41e2fa25;
    --accent-glow:  #41e2fa18;
    --text:         #ffffff;
    --muted:        #6b8fa8;
    --muted-2:      #4a6070;
    --radius:       16px;
    --radius-sm:    8px;
    --radius-pill:  999px;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* ── Navbar ─────────────────────────────── */
.navbar {
    background: #080b1299;
    border-bottom: 1px solid var(--border);
    padding: 0 2.5rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.navbar-brand .brand-text span { color: var(--accent); }

.nav-logo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.75rem;
}

.nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.15s;
}

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

.nav-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid var(--accent-dim);
}

.btn-login {
    background: var(--accent) !important;
    color: #060810 !important;
    padding: 0.45rem 1.1rem !important;
    border-radius: var(--radius-pill) !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
}

/* ── Container ──────────────────────────── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    flex: 1;
}

/* ── Hero ───────────────────────────────── */
.hero {
    display: flex;
    align-items: center;
    gap: 4rem;
    padding: 5rem 0 3.5rem;
}

.hero-mascot {
    flex-shrink: 0;
    position: relative;
    margin-left: -3rem;
    padding-right: 140px;
}

.mascot-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 3px solid var(--accent-dim);
    box-shadow: 0 0 40px var(--accent-glow), 0 0 80px #41e2fa0a;
    animation: float 3.5s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-10px); }
}

.speech-bubble {
    position: absolute;
    top: 50%;
    left: calc(150px + 16px);
    transform: translateY(-50%);
    background: var(--surface-2);
    border: 1px solid var(--border-2);
    border-radius: 0 14px 14px 14px;
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    color: var(--text);
    box-shadow: 0 4px 16px #00000040;
}

.wave { display: inline-block; animation: wave 2s ease-in-out infinite; }
@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    25%       { transform: rotate(22deg); }
    75%       { transform: rotate(-10deg); }
}

.hero-text { flex: 1; }

.hero-text h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.1;
    margin-bottom: 1.1rem;
    color: var(--text);
}

.hero-sub {
    color: var(--muted);
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.65;
    margin-bottom: 0.75rem;
    max-width: 500px;
}

.hero-tagline {
    font-size: 1rem;
    color: var(--muted);
    margin-bottom: 2rem;
    font-weight: 500;
}

.hero-tagline strong { color: var(--accent); font-weight: 700; }

.hero-actions { display: flex; gap: 0.75rem; margin-bottom: 2.75rem; flex-wrap: wrap; }

.hero-stats { display: flex; gap: 2.5rem; }
.stat { display: flex; flex-direction: column; gap: 0.1rem; }
.stat-num { font-size: 1.5rem; font-weight: 800; color: var(--text); letter-spacing: -0.5px; }
.stat-label { font-size: 0.75rem; color: var(--muted); font-weight: 500; }

/* ── Home sections ──────────────────────── */
.home-section { margin-bottom: 3.5rem; }

.accent-word { color: var(--accent); }

/* ── Categories ─────────────────────────── */
.category-grid { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.category-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    text-decoration: none;
    color: var(--muted);
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s;
}

.category-chip:hover {
    border-color: var(--cat-color);
    color: var(--cat-color);
    background: color-mix(in srgb, var(--cat-color) 8%, var(--surface));
    box-shadow: 0 0 12px color-mix(in srgb, var(--cat-color) 20%, transparent);
}

/* ── Recently bumped strip ──────────────── */
.recent-strip {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.recent-card {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 1rem;
    background: linear-gradient(to top, #0f1623, var(--surface));
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    text-decoration: none;
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 600;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.recent-card:hover {
    border-color: var(--accent-dim);
    box-shadow: 0 0 12px var(--accent-glow);
}

.recent-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
}

.recent-members { font-size: 0.75rem; color: var(--muted); font-weight: 500; }

/* ── How it works ───────────────────────── */
.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.step {
    background: linear-gradient(to top, #0f1623, var(--surface));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.step-num {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: var(--accent);
    display: block;
    margin-bottom: 0.75rem;
}

.step h3 {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.3px;
}

.step p {
    font-size: 0.875rem;
    color: var(--muted);
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 700px) {
    .steps { grid-template-columns: 1fr; }
}

.cat-emoji { font-size: 1rem; line-height: 1; }

/* ── Page header ────────────────────────── */
.page-header { margin-bottom: 2rem; }
.page-header h1 { font-size: 2rem; font-weight: 800; letter-spacing: -0.5px; }
.page-header .muted { margin-top: 0.3rem; font-size: 0.9rem; font-weight: 500; }

/* ── Filter bar ─────────────────────────── */
.filter-bar {
    position: sticky;
    top: 64px;
    z-index: 90;
    width: 100%;
    background: #07090fdd;
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.filter-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.6rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.filter-bar-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.discord-icon {
    width: 18px;
    height: 18px;
    color: #5865f2;
    flex-shrink: 0;
}

.filter-bar-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--muted);
    white-space: nowrap;
}

.filter-bar-divider {
    width: 1px;
    height: 20px;
    background: var(--border);
    flex-shrink: 0;
}

.filter-bar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
    margin-left: auto;
}

.search-type-toggle {
    display: flex;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 0.18rem;
    gap: 0.1rem;
    flex-shrink: 0;
}

.search-type-btn {
    background: transparent;
    border: none;
    color: var(--muted);
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.28rem 0.75rem;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.search-type-btn.active {
    background: var(--accent);
    color: #060810;
}

.search-type-btn:not(.active):hover {
    color: var(--text);
}

.search-input-wrap {
    flex: 1;
    min-width: 160px;
}

.search-input {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 0.38rem 0.9rem;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}

.search-input:focus {
    border-color: var(--accent-dim);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-input::placeholder { color: var(--muted-2); }

.tag-panel-row {
    border-top: 1px solid var(--border);
    padding: 0.55rem 1.5rem;
}

.tag-panel-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.preset-tag {
    background: color-mix(in srgb, var(--tag-color) 10%, transparent);
    color: var(--tag-color);
    border: 1px solid color-mix(in srgb, var(--tag-color) 28%, transparent);
    border-radius: var(--radius-pill);
    font-family: 'Outfit', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.22rem 0.65rem;
    cursor: pointer;
    text-transform: capitalize;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
    white-space: nowrap;
}

.preset-tag:hover {
    background: color-mix(in srgb, var(--tag-color) 22%, transparent);
    border-color: color-mix(in srgb, var(--tag-color) 55%, transparent);
}

.preset-tag.active {
    background: color-mix(in srgb, var(--tag-color) 30%, transparent);
    border-color: var(--tag-color);
    box-shadow: 0 0 8px color-mix(in srgb, var(--tag-color) 30%, transparent);
}

.search-empty {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* ── Section label ──────────────────────── */
.section-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted-2);
    margin-bottom: 1rem;
}

/* ── Featured wrap ──────────────────────── */
.featured-wrap {
    padding-top: 30px;
    margin-bottom: 2rem;
}

.featured-wrap .server-card {
    max-width: 320px;
}

/* ── Server grid ────────────────────────── */
.server-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 3rem;
    padding-top: 30px;
}

@media (max-width: 1100px) {
    .server-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 780px) {
    .server-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 500px) {
    .server-grid { grid-template-columns: 1fr; }
}

/* ── Server card ────────────────────────── */
.server-card {
    background: linear-gradient(to top, #0f1623 0%, var(--surface) 100%);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: var(--radius);
    padding: 1rem 1.1rem 1rem;
    position: relative;
    margin-top: 30px;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.server-card:hover {
    border-color: var(--border-2);
    box-shadow: 0 6px 24px #00000055;
    transform: translateY(-2px);
    background: linear-gradient(to top, #131d2e 0%, var(--surface) 100%);
}

.server-card.featured {
    border-color: var(--accent-dim);
    box-shadow: 0 0 24px var(--accent-glow);
    background: linear-gradient(to top, #071820 0%, #0c1520 60%, var(--surface) 100%);
}

/* Header — icon circle + name pill as one connected unit */
.card-header {
    position: absolute;
    top: -22px;
    left: 0.75rem;
    right: 0.75rem;
    display: flex;
    align-items: center;
    z-index: 2;
}

.card-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2.5px solid var(--border-2);
    box-shadow: 0 3px 12px #00000070;
    background: var(--surface-2);
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.server-card:hover .card-icon,
.server-card.featured .card-icon {
    border-color: var(--accent-dim);
    box-shadow: 0 3px 16px var(--accent-glow);
}

/* Name pill — tucks behind icon, extends right */
.card-name {
    flex: 1;
    min-width: 0;
    background: var(--surface-2);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-pill);
    padding: 0.22rem 0.75rem 0.22rem 1.25rem;
    margin-left: -16px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 1;
    transition: border-color 0.2s;
}

.server-card:hover .card-name,
.server-card.featured .card-name {
    border-color: var(--accent-dim);
}

/* Featured badge — sits at the right of the header */
.featured-badge {
    flex-shrink: 0;
    background: var(--accent-dim);
    border: 1px solid var(--accent-dark);
    border-radius: var(--radius-pill);
    padding: 0.2rem 0.55rem;
    font-size: 0.6rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-left: 0.4rem;
    white-space: nowrap;
    z-index: 2;
}

/* Card body */
.card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.4rem;
    padding-top: 0.4rem;
}

.card-meta-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.card-members {
    font-size: 0.73rem;
    color: var(--muted);
    font-weight: 500;
    white-space: nowrap;
}

.card-rating {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.73rem;
    font-weight: 600;
}

.star { color: var(--border-2); font-size: 0.75rem; }
.star.filled { color: #fee75c; }
.rating-score { color: var(--text); }
.rating-count { color: var(--muted); font-weight: 400; }

.card-desc {
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 0.1rem;
}

/* Tags */
.card-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem;
    width: 100%;
}

.tag {
    font-size: 0.63rem;
    font-weight: 700;
    padding: 0.13rem 0.45rem;
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--tag-color) 12%, transparent);
    color: var(--tag-color);
    text-transform: capitalize;
    border: 1px solid color-mix(in srgb, var(--tag-color) 25%, transparent);
    letter-spacing: 0.02em;
    white-space: nowrap;
}

/* Buttons */
.card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
}

.btn-join {
    flex: 1;
    text-align: center;
    background: var(--accent);
    color: #060810;
    padding: 0.28rem 0.8rem;
    border-radius: var(--radius-pill);
    font-size: 0.74rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    text-decoration: none;
    transition: background 0.15s, box-shadow 0.15s;
    white-space: nowrap;
}

.btn-join:hover {
    background: var(--accent-dark);
    box-shadow: 0 0 10px var(--accent-dim);
}

.btn-bump {
    flex: 1;
    text-align: center;
    background: transparent;
    border: 1px solid var(--border-2);
    color: var(--muted);
    padding: 0.28rem 0.75rem;
    border-radius: var(--radius-pill);
    font-size: 0.74rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s;
    white-space: nowrap;
}

.btn-bump:hover {
    border-color: var(--accent-dim);
    color: var(--accent);
}

/* ── Buttons ────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #060810;
    padding: 0.55rem 1.25rem;
    border-radius: var(--radius-pill);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    border: none;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.btn:hover {
    background: var(--accent-dark);
    box-shadow: 0 0 20px var(--accent-dim);
    transform: translateY(-1px);
}

.btn:active { transform: translateY(0); }

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-2);
    color: var(--muted);
}

.btn-outline:hover {
    border-color: var(--accent-dim);
    color: var(--accent);
    background: var(--accent-glow);
    box-shadow: none;
}

.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.8rem; flex: 1; }
.btn-lg { padding: 0.7rem 1.75rem; font-size: 0.975rem; }

/* ── Server detail ───────────────────────── */
.detail-page { max-width: 720px; margin: 0 auto; padding-bottom: 2rem; }

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    margin-bottom: 1.25rem;
    transition: color 0.15s;
}

.btn-back:hover { color: var(--accent); }

.detail-hero {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.75rem;
    background: linear-gradient(to top, #0f1623, var(--surface));
    border: 1px solid var(--border);
    border-top: none;
    border-radius: var(--radius);
}

.detail-icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 3px solid var(--accent-dim);
    box-shadow: 0 0 24px var(--accent-glow);
    flex-shrink: 0;
}

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

.detail-name {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 0.5rem;
}

.detail-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
}

.detail-stat.online { color: #57f287; }

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.5rem;
}

.detail-body {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.detail-desc {
    font-size: 0.975rem;
    line-height: 1.7;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
}

.detail-section-title {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.3px;
}

.review-list { display: flex; flex-direction: column; gap: 0.75rem; }

.review-card {
    background: linear-gradient(to top, #0f1623, var(--surface));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.review-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
}

.review-username { font-weight: 700; font-size: 0.875rem; }
.review-stars { display: flex; gap: 1px; font-size: 0.8rem; }
.review-date { font-size: 0.75rem; margin-left: auto; }
.review-content { font-size: 0.875rem; color: var(--muted); line-height: 1.6; margin: 0; }


.detail-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1rem;
}
.detail-actions form { margin: 0; padding: 0; }

/* ── Detail / card shared buttons ───────── */
.btn-footer {
    font-family: 'Outfit', sans-serif;
    font-size: 0.875rem;
    font-weight: 800;
    padding: 0.55rem 1.4rem;
    border-radius: var(--radius-pill);
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid transparent;
    transition: background 0.15s, box-shadow 0.15s, border-color 0.15s, color 0.15s;
}
.btn-footer--solid {
    background: var(--accent);
    color: #060810;
}
.btn-footer--solid:hover { background: var(--accent-dark); box-shadow: 0 0 16px var(--accent-dim); }
.btn-footer--outline {
    background: transparent;
    border-color: var(--border-2);
    color: var(--text);
}
.btn-footer--outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-footer--disabled {
    background: transparent;
    border-color: var(--border);
    color: var(--muted);
    opacity: 0.5;
    cursor: default;
}

/* ── Browse card bump ────────────────────── */
.btn-card-bump {
    flex: 1;
    text-align: center;
    font-family: 'Outfit', sans-serif;
    font-size: 0.74rem;
    font-weight: 700;
    padding: 0.28rem 0.75rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-2);
    color: var(--muted);
    text-decoration: none;
    white-space: nowrap;
    transition: border-color 0.15s, color 0.15s;
}
.btn-card-bump:hover { border-color: var(--accent); color: var(--accent); }

/* ── Form ───────────────────────────────── */
.form { max-width: 520px; display: flex; flex-direction: column; gap: 1.25rem; }
.form label { display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.875rem; font-weight: 600; color: var(--text); }

.form input, .form textarea {
    background: var(--surface);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    color: var(--text);
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    width: 100%;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form input:focus, .form textarea:focus {
    outline: none;
    border-color: var(--accent-dim);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form textarea { min-height: 130px; resize: vertical; }

/* ── Status badges ──────────────────────── */
.status { font-size: 0.75rem; padding: 0.2rem 0.6rem; border-radius: 4px; font-weight: 700; }
.status.active   { background: #1a3326; color: #57f287; }
.status.inactive { background: #2d1b1b; color: #ed4245; }

/* ── Error ──────────────────────────────── */
.error-page { text-align: center; padding: 5rem 0; }
.error-page h1 {
    font-size: 8rem;
    font-weight: 900;
    letter-spacing: -4px;
    color: transparent;
    -webkit-text-stroke: 2px var(--accent);
    line-height: 1;
}
.error-page p { color: var(--muted); margin: 1rem 0 2rem; font-size: 1rem; }

/* ── Review form ────────────────────────── */
.review-flash {
    padding: 0.65rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}
.review-flash--success { background: color-mix(in srgb, #57f287 12%, transparent); border: 1px solid #57f287; color: #57f287; }
.review-flash--error   { background: color-mix(in srgb, #ff4444 12%, transparent); border: 1px solid #ff4444; color: #ff4444; }

.review-form-card {
    background: linear-gradient(to top, #0f1623, var(--surface));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
}
.review-form-title { font-size: 0.9rem; font-weight: 700; margin-bottom: 1rem; }

.star-picker {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.875rem;
    cursor: pointer;
}
.star-pick {
    font-size: 1.75rem;
    color: var(--border-2);
    transition: color 0.1s, transform 0.1s;
    user-select: none;
    line-height: 1;
}
.star-pick:hover,
.star-pick.hover,
.star-pick.active { color: #fee75c; transform: scale(1.15); }

.review-textarea {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    font-size: 0.875rem;
    padding: 0.65rem 0.9rem;
    resize: vertical;
    min-height: 80px;
    outline: none;
    transition: border-color 0.15s;
}
.review-textarea:focus { border-color: var(--accent-dim); }

.review-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
}
.char-count { font-size: 0.75rem; color: var(--muted); }

.btn-review-submit {
    background: var(--accent);
    color: #060810;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 800;
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
}
.btn-review-submit:hover:not(:disabled) { background: var(--accent-dark); }
.btn-review-submit:disabled { opacity: 0.4; cursor: not-allowed; }

.review-login-prompt { font-size: 0.875rem; margin-bottom: 1rem; }
.review-login-prompt a { color: var(--accent); text-decoration: none; font-weight: 600; }
.review-login-prompt a:hover { text-decoration: underline; }

.my-review-card { margin-bottom: 0.75rem; }

.btn-edit-review {
    margin-left: auto;
    background: transparent;
    border: 1px solid var(--border-2);
    color: var(--muted);
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.7rem;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}
.btn-edit-review:hover { border-color: var(--accent); color: var(--accent); }

/* ── Add Server ─────────────────────────── */
.add-server-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.75rem;
}

.add-server-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: linear-gradient(to top, #0f1623, var(--surface));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    transition: border-color 0.15s;
}
.add-server-card:hover { border-color: var(--border-2); }
.add-server-card--listed { opacity: 0.7; }

.add-server-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid var(--accent-dim);
}

.add-server-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    flex: 1;
    min-width: 0;
}
.add-server-name {
    font-weight: 800;
    font-size: 1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.add-server-hint {
    margin-top: 1rem;
    font-size: 0.8rem;
}

/* ── Dashboard ──────────────────────────── */
.dash-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
}
.dash-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 3px solid var(--accent-dim);
    box-shadow: 0 0 20px var(--accent-glow);
    flex-shrink: 0;
}
.dash-title { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.4px; }
.dash-sub   { font-size: 0.85rem; margin-top: 0.2rem; }

.dash-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    padding: 4rem 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.dash-card {
    background: linear-gradient(to top, #0f1623, var(--surface));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dash-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.dash-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--accent-dim);
    flex-shrink: 0;
}
.dash-card-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}
.dash-card-name {
    font-weight: 800;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dash-status {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.1rem 0.5rem;
    border-radius: var(--radius-pill);
    width: fit-content;
}
.dash-status--active   { background: color-mix(in srgb, #57f287 12%, transparent); color: #57f287; border: 1px solid #57f28755; }
.dash-status--inactive { background: color-mix(in srgb, #ff4444 12%, transparent); color: #ff6b6b; border: 1px solid #ff444455; }

.dash-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 0.5rem;
}
.dash-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
}
.dash-stat-val   { font-size: 0.875rem; font-weight: 800; }
.dash-stat-label { font-size: 0.65rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }

.dash-card-actions {
    display: flex;
    gap: 0.5rem;
}
.dash-card-actions form        { margin: 0; flex: 1; }
.dash-card-actions .btn-footer { flex: 1; justify-content: center; }

.dash-edit-panel {
    border-top: 1px solid var(--border);
    padding-top: 0.875rem;
}
.dash-edit-panel form     { display: flex; flex-direction: column; gap: 0.75rem; }
.dash-edit-label          { font-size: 0.78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.dash-char-row            { display: flex; justify-content: flex-end; margin-top: -0.4rem; }
.dash-char-count          { font-size: 0.72rem; color: var(--muted); }
.dash-edit-footer         { display: flex; justify-content: flex-end; }
.dash-tag-picker          { display: flex; flex-wrap: wrap; gap: 0.3rem; }

.dash-custom-tag-row      { display: flex; flex-direction: column; gap: 0.5rem; }
.dash-custom-chips        { display: flex; flex-wrap: wrap; gap: 0.3rem; min-height: 0; }
.dash-custom-input-row    { display: flex; gap: 0.5rem; }
.dash-custom-tag-input {
    flex: 1;
    background: var(--surface);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-pill);
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    font-size: 0.78rem;
    padding: 0.3rem 0.85rem;
    outline: none;
    transition: border-color 0.15s;
}
.dash-custom-tag-input:focus { border-color: var(--accent-dim); }
.dash-custom-tag-input::placeholder { color: var(--muted-2); }

.custom-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: color-mix(in srgb, var(--tag-color) 15%, transparent);
    color: var(--tag-color);
    border: 1px solid color-mix(in srgb, var(--tag-color) 35%, transparent);
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem 0.2rem 0.65rem;
    text-transform: lowercase;
}
.custom-chip-remove, .custom-chip button {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 0.85rem;
    line-height: 1;
    padding: 0;
    opacity: 0.7;
}
.custom-chip-remove:hover, .custom-chip button:hover { opacity: 1; }

.custom-tag-input {
    background: var(--surface);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-pill);
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    font-size: 0.72rem;
    padding: 0.2rem 0.75rem;
    outline: none;
    width: 120px;
    flex-shrink: 0;
    transition: border-color 0.15s;
}
.custom-tag-input:focus { border-color: var(--accent-dim); }
.custom-tag-input::placeholder { color: var(--muted-2); }

.custom-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: color-mix(in srgb, var(--tag-color) 20%, transparent);
    color: var(--tag-color);
    border: 1px solid var(--tag-color);
    border-radius: var(--radius-pill);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.18rem 0.45rem 0.18rem 0.6rem;
    white-space: nowrap;
    flex-shrink: 0;
}
.custom-filter-chip button {
    background: none; border: none; color: inherit;
    cursor: pointer; font-size: 0.85rem; line-height: 1; padding: 0; opacity: 0.8;
}
.custom-filter-chip button:hover { opacity: 1; }

.custom-tag-chips { display: flex; gap: 0.3rem; flex-shrink: 0; }

/* ── Footer ─────────────────────────────── */
footer {
    text-align: center;
    padding: 1.75rem;
    color: var(--muted-2);
    font-size: 0.8rem;
    font-weight: 500;
    border-top: 1px solid var(--border);
}
