*, *::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-md:    10px;
    --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-admin {
    color: #e74c3c !important;
    font-weight: 700;
}

.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 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    align-items: start;
    gap: 1rem;
    padding-top: 30px;
    margin-bottom: 2rem;
}

/* -- Server grid -------------------------- */
.server-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: start;
    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;
}

.desc-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted-2);
    padding: 4px 6px;
    font-size: 0.85rem;
    vertical-align: middle;
    line-height: 1;
    transition: color 0.15s;
    min-width: 28px;
    min-height: 28px;
    touch-action: manipulation;
}
.desc-toggle:hover { color: var(--accent); }

.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;
}

.tag--lang {
    --tag-color: #7289da;
    background: color-mix(in srgb, #7289da 14%, transparent);
    color: #7289da;
    border-color: color-mix(in srgb, #7289da 28%, transparent);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

/* 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 ---------------------- */
.bump-form-inline { flex: 1; display: contents; }
.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); }

.dash-lang-select {
    background: var(--surface);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-md);
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    font-size: 0.82rem;
    padding: 0.45rem 0.75rem;
    outline: none;
    width: 100%;
    cursor: pointer;
    transition: border-color 0.15s;
    appearance: auto;
}
.dash-lang-select:focus { border-color: var(--accent-dim); }

.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 ------------------------------- */
/* -- Guidelines page ---------------------- */
.guidelines-page {
    max-width: 780px;
    margin: 0 auto;
    padding: 2.5rem 0 4rem;
}

.guidelines-hero {
    text-align: center;
    margin-bottom: 2.5rem;
}

.guidelines-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.guidelines-subtitle {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.65;
    max-width: 580px;
    margin: 0 auto;
}

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

.guideline-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.guideline-section-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted-2);
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border);
}

.guideline-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
    transition: border-color 0.15s;
}

.guideline-card:hover { border-color: var(--border-2); }

.guideline-icon {
    font-size: 1.35rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.guideline-text h3 {
    font-size: 0.9rem;
    font-weight: 700;
    margin: 0 0 0.3rem;
    color: var(--text);
}

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

.guideline-text a {
    color: var(--accent);
    text-decoration: none;
}

.guideline-text a:hover { text-decoration: underline; }

.guidelines-footer-note {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.6;
}

.guidelines-footer-note p { margin: 0 0 0.4rem; }
.guidelines-footer-note p:last-child { margin: 0; }
.guidelines-footer-note a { color: var(--accent); text-decoration: none; }
.guidelines-footer-note a:hover { text-decoration: underline; }

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

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

footer a:hover { color: var(--text); }

/* -- Admin panel -------------------------- */
.admin-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 0 4rem;
}

.admin-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.admin-search {
    margin-left: auto;
    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;
    width: 260px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

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

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

.admin-title {
    font-size: 1.4rem;
    font-weight: 800;
}

.admin-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.admin-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
    transition: border-color 0.15s;
}

.admin-card--inactive { opacity: 0.65; }
.admin-card--blacklisted { border-color: #e74c3c44; opacity: 0.55; }

.admin-card-top {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.admin-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg);
}

.admin-card-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.admin-card-name {
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-card-id {
    font-size: 0.75rem;
    font-family: monospace;
}

.admin-badges {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin-top: 0.1rem;
}

.admin-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
}

.admin-badge--active    { background: #57f28715; color: #57f287; border-color: #57f28730; }
.admin-badge--inactive  { background: #ffd70015; color: #ffd700; border-color: #ffd70030; }
.admin-badge--blacklist { background: #e74c3c15; color: #e74c3c; border-color: #e74c3c30; }
.admin-badge--featured  { background: #fee75c15; color: #fee75c; border-color: #fee75c30; }

.admin-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
    font-size: 0.78rem;
    flex-shrink: 0;
}

.admin-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.admin-btn--danger  { color: #e74c3c; border-color: #e74c3c44; }
.admin-btn--danger:hover  { background: #e74c3c18; border-color: #e74c3c80; }
.admin-btn--warn    { color: #ffd700; border-color: #ffd70044; }
.admin-btn--warn:hover    { background: #ffd70018; border-color: #ffd70080; }

.admin-edit-panel {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

/* -- TOS page ----------------------------- */
.tos-page {
    max-width: 760px;
    margin: 0 auto;
    padding: 2.5rem 0 4rem;
}

.tos-hero {
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.tos-title {
    font-size: 1.9rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
}

.tos-updated {
    font-size: 0.8rem;
}

.tos-body {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.tos-section {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border);
}

.tos-section:last-of-type {
    border-bottom: none;
}

.tos-section-title {
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 0.4rem;
    color: var(--text);
}

.tos-summary {
    font-size: 0.85rem;
    color: var(--muted);
    font-style: italic;
    margin-bottom: 0.85rem;
}

.tos-sub-title {
    font-size: 0.88rem;
    font-weight: 700;
    margin: 1rem 0 0.35rem;
    color: var(--text);
}

.tos-section p {
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.65;
    margin: 0 0 0.6rem;
}

.tos-section ul {
    margin: 0 0 0.6rem 1.2rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.tos-section li {
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.6;
}

.tos-section ul ul {
    margin-top: 0.3rem;
    margin-bottom: 0;
}

.tos-section a {
    color: var(--accent);
    text-decoration: none;
}

.tos-section a:hover { text-decoration: underline; }

.tos-footer-note {
    padding-top: 1.25rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.tos-footer-note a { color: var(--accent); text-decoration: none; }
.tos-footer-note a:hover { text-decoration: underline; }

/* -- Status page -------------------------- */
.status-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2.5rem 0 5rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.status-eyebrow {
    display: block;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 0.85rem;
    font-family: monospace;
}

.status-display {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
}

.status-display em {
    font-style: italic;
    color: var(--accent);
}

.status-lede {
    font-size: 1rem;
    color: var(--muted);
    max-width: 480px;
}

/* Overall status bar */
.status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.25rem 1.75rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
}

.status-bar--online   { border-color: #57f28730; background: #57f28706; }
.status-bar--degraded { border-color: #ffd70030; background: #ffd70006; }
.status-bar--offline  { border-color: #e74c3c30; background: #e74c3c06; }

.status-bar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.status-bar-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}
.status-bar--online   .status-bar-dot { background: #57f287; box-shadow: 0 0 8px #57f28780; }
.status-bar--degraded .status-bar-dot { background: #ffd700; box-shadow: 0 0 8px #ffd70080; }
.status-bar--offline  .status-bar-dot { background: #e74c3c; box-shadow: 0 0 8px #e74c3c80; }

.status-bar-label {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
}
.status-bar--online   .status-bar-label { color: #57f287; }
.status-bar--degraded .status-bar-label { color: #ffd700; }
.status-bar--offline  .status-bar-label { color: #e74c3c; }

.status-bar-sub {
    display: block;
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 0.1rem;
}

.status-bar-stats {
    display: flex;
    gap: 2.5rem;
}

.status-bar-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.1rem;
}

.status-bar-stat-val {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
}

.status-bar-stat-key {
    font-size: 0.68rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-family: monospace;
}

/* Section heading */
.status-section-head { }

.status-section-eyebrow {
    display: block;
    font-size: 0.75rem;
    color: var(--accent);
    font-family: monospace;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}

.status-section-title {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.4rem;
}

.status-section-sub {
    font-size: 0.88rem;
    color: var(--muted);
}

/* Shard grid */
.shard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

/* Shard card */
.shard-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
}

.shard-card--online   { border-color: #57f28720; }
.shard-card--degraded { border-color: #ffd70020; }
.shard-card--offline  { border-color: #e74c3c20; opacity: 0.65; }

/* Corner decorations */
.shard-corner {
    position: absolute;
    width: 10px;
    height: 10px;
    opacity: 0.5;
}
.shard-corner--tl { top: 10px; left: 10px; border-top: 1.5px solid var(--accent); border-left: 1.5px solid var(--accent); }
.shard-corner--tr { top: 10px; right: 10px; border-top: 1.5px solid var(--accent); border-right: 1.5px solid var(--accent); }

/* Card header */
.shard-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.shard-card-title-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.shard-card-name {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    font-family: monospace;
    color: var(--text);
}

.shard-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    text-transform: lowercase;
    font-family: monospace;
    width: fit-content;
}
.shard-chip--online   { background: #57f28715; color: #57f287; border-color: #57f28730; }
.shard-chip--degraded { background: #ffd70015; color: #ffd700; border-color: #ffd70030; }
.shard-chip--offline  { background: #e74c3c15; color: #e74c3c; border-color: #e74c3c30; }

.shard-chip-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    flex-shrink: 0;
}
.shard-chip--online   .shard-chip-dot { background: #57f287; }
.shard-chip--degraded .shard-chip-dot { background: #ffd700; }
.shard-chip--offline  .shard-chip-dot { background: #e74c3c; }

.shard-card-ping {
    text-align: right;
}

.shard-ping-label {
    display: block;
    font-size: 0.65rem;
    font-family: monospace;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    margin-bottom: 0.15rem;
}

.shard-ping-val {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text);
    letter-spacing: -0.03em;
}

.shard-ping-unit {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--muted);
    margin-left: 0.1rem;
}

/* Stat boxes */
.shard-stat-boxes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}

.shard-stat-box {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.shard-stat-key {
    font-size: 0.62rem;
    font-family: monospace;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
}

.shard-stat-val {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}

.shard-stat-val--accent { color: var(--accent); }

/* Card footer */
.shard-card-footer {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    font-family: monospace;
    color: var(--muted-2);
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.shard-footer-val {
    color: var(--muted);
}

.status-page-note {
    font-size: 0.78rem;
    color: var(--muted-2);
    text-align: center;
    font-family: monospace;
}

/* -- Hamburger button (hidden on desktop) -- */
.nav-burger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
    color: var(--text);
    flex-direction: column;
    gap: 5px;
    align-items: center;
    justify-content: center;
}

.nav-burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}

.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* -- Responsive: Tablet (≤900px) --------- */
@media (max-width: 900px) {
    .server-grid { grid-template-columns: repeat(3, 1fr); }
}

/* -- Responsive: Mobile (≤768px) --------- */
@media (max-width: 768px) {

    /* Navbar */
    .navbar { padding: 0 1rem; position: relative; }
    .nav-burger { display: flex; }
    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: #080b12f2;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 0.75rem 1rem 1rem;
        gap: 0.15rem;
        z-index: 99;
    }
    .nav-links.open { display: flex; }
    .nav-links a {
        padding: 0.7rem 0.75rem;
        border-radius: var(--radius-sm);
        font-size: 0.95rem;
        width: 100%;
    }
    .nav-links a:hover { background: var(--surface); color: var(--text); }
    .nav-avatar { display: none; }
    .btn-login {
        margin-top: 0.25rem;
        width: 100%;
        justify-content: center;
        text-align: center;
        padding: 0.65rem 1rem !important;
        font-size: 0.9rem !important;
    }

    /* Container */
    .container { padding: 1.5rem 1rem; }

    /* Hero */
    .hero {
        flex-direction: column-reverse;
        padding: 2rem 0 1.5rem;
        gap: 1.5rem;
        text-align: center;
    }
    .hero-mascot { margin-left: 0; padding-right: 0; display: flex; justify-content: center; }
    .speech-bubble { display: none; }
    .hero-text h1 { font-size: 2rem; letter-spacing: -0.5px; }
    .hero-sub { max-width: 100%; font-size: 0.95rem; }
    .hero-actions { justify-content: center; }
    .hero-stats { justify-content: center; gap: 1.5rem; }

    /* Page header */
    .page-header h1 { font-size: 1.6rem; }

    /* Filter bar */
    .filter-bar-left { display: none; }
    .filter-bar-divider { display: none; }
    .filter-bar-inner { padding: 0.5rem 1rem; }
    .filter-bar-right { margin-left: 0; width: 100%; }

    /* Featured card: full width */
    .featured-wrap .server-card { max-width: 100%; }

    /* Server grid */
    .server-grid { grid-template-columns: repeat(2, 1fr); }

    /* Server detail */
    .detail-page { padding-bottom: 1.5rem; }
    .detail-hero {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.25rem;
    }
    .detail-icon { width: 72px; height: 72px; }
    .detail-name { font-size: 1.4rem; }
    .detail-stats { justify-content: center; font-size: 0.8rem; gap: 0.75rem; }
    .detail-tags { justify-content: center; }
    .detail-actions { flex-wrap: wrap; justify-content: center; }
    .detail-actions form { flex: unset; }

    /* Dashboard */
    .dash-header { gap: 1rem; }
    .dash-title { font-size: 1.2rem; }
    .dash-stats { grid-template-columns: repeat(2, 1fr); }
    .dash-card-actions { flex-wrap: wrap; }
    .dash-card-actions .btn-footer { flex: 1 1 calc(50% - 0.25rem); justify-content: center; min-width: 0; }
    .dash-card-actions form { flex: 1 1 calc(50% - 0.25rem); }
    .dash-card-actions form .btn-footer { width: 100%; }

    /* Status page */
    .status-display { font-size: 1.75rem; }
    .status-bar { flex-direction: column; align-items: flex-start; gap: 1rem; padding: 1rem 1.25rem; }
    .status-bar-stats { width: 100%; gap: 1.25rem; flex-wrap: wrap; }
    .status-bar-stat { align-items: flex-start; }
    .shard-grid { grid-template-columns: 1fr; }
    .shard-stat-boxes { grid-template-columns: repeat(3, 1fr); }

    /* Admin */
    .admin-page { padding: 1.5rem 0 3rem; }
    .admin-header { flex-direction: column; align-items: flex-start; }
    .admin-search { margin-left: 0; width: 100%; }
    .admin-card-top { flex-wrap: wrap; }
    .admin-meta { flex-direction: row; gap: 0.75rem; align-items: center; width: 100%; }
    .admin-actions .btn-footer { flex: 1; justify-content: center; min-width: 80px; }

    /* Error page */
    .error-page h1 { font-size: 5rem; }
}

/* -- Responsive: Small phones (≤480px) --- */
@media (max-width: 480px) {
    .container { padding: 1.25rem 0.875rem; }
    .hero-text h1 { font-size: 1.65rem; }
    .hero-stats { gap: 1rem; }
    .stat-num { font-size: 1.25rem; }
    .server-grid { grid-template-columns: 1fr; }
    .detail-actions .btn-footer { flex: 1 1 100%; text-align: center; justify-content: center; }
    .status-bar-stats { gap: 0.75rem; }
    .status-display { font-size: 1.5rem; }
    .shard-ping-val { font-size: 1.6rem; }
}
