:root {
    --mc-bg: #ffffff;
    --mc-surface: #ffffff;
    --mc-surface-soft: #f8f9fa;
    --mc-line: #dee2e6;
    --mc-text: #212529;
    --mc-muted: #6c757d;
    --mc-blue: #007bff;
    --mc-blue-dark: #0056b3;
    --mc-blue-glow: rgba(0, 123, 255, 0.26);
    --mc-green: #28a745;
    --mc-green-dark: #218838;
    --mc-lime: #9bdc45;
    --mc-gold: #f0b429;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background-color: #ffffff;
    background-image: url("/assets/background.png");
    background-size: 297px 297px;
    background-repeat: repeat;
    background-attachment: fixed;
}

body {
    font-family: 'Roboto', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    min-height: 100vh;
    background: transparent;
    color: var(--mc-text);
    line-height: 1.6;
}

a {
    color: var(--mc-blue);
    font-weight: 500;
}

.mc-nav {
    background: #ffffff;
    border-bottom: 1px solid var(--mc-line);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(10px);
    padding: 8px 0;
}

.navbar-brand {
    display: inline-flex;
    align-items: center;
    padding: 0;
    margin-right: 28px;
}

.brand-logo {
    display: block;
    width: 236px;
    max-width: 48vw;
    height: auto;
}

.navbar .nav-link,
.navbar .navbar-text {
    color: var(--mc-muted) !important;
}

.navbar .nav-link.active,
.navbar .nav-link:hover {
    color: var(--mc-blue) !important;
}

.navbar .nav-link {
    border-radius: 8px;
    font-weight: 500;
    padding: 10px 15px !important;
}

.navbar .nav-link:hover {
    background: #f1f3f5;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 260px;
    display: flex;
    align-items: center;
    background: transparent;
    color: var(--mc-text);
    border-bottom: 0;
}

.hero-copy {
    max-width: 700px;
}

.hero .lead {
    color: var(--mc-muted);
    font-size: 1.1rem;
}

.server-browser {
    margin-top: -24px;
    position: relative;
    z-index: 2;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px auto;
    gap: 14px;
    align-items: center;
    padding: 0;
    margin-bottom: 18px;
}

.search-input-wrap {
    position: relative;
}

.search-input {
    height: 60px;
    padding-left: 50px;
    border: 1px solid var(--mc-line);
    font-size: 1.1rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.search-icon {
    position: absolute;
    top: 50%;
    left: 18px;
    width: 15px;
    height: 15px;
    border: 2px solid #8a9aa0;
    border-radius: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.search-icon::after {
    content: "";
    position: absolute;
    width: 7px;
    height: 2px;
    right: -6px;
    bottom: -4px;
    background: #8a9aa0;
    border-radius: 4px;
    transform: rotate(45deg);
}

.sort-select,
.search-button {
    height: 60px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.panel,
.server-card {
    background: var(--mc-surface);
    border: 1px solid var(--mc-line);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.server-list {
    display: grid;
    gap: 16px;
}

.server-card {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: stretch;
    gap: 0;
    min-height: 112px;
    padding: 0;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.server-card > :not(.server-banner) {
    position: relative;
    z-index: 1;
}

.server-card:hover {
    border-color: #c9d7e3;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-5px);
}

.rank {
    display: grid;
    place-items: center;
    width: 76px;
    flex: 0 0 76px;
    min-height: 112px;
    border-radius: 0;
    background: #f8f9fa;
    color: var(--mc-text);
    font-size: 1.3rem;
    font-weight: 900;
    border-right: 1px solid var(--mc-line);
}

.server-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    padding: 22px 24px;
}

.server-banner {
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.94)),
        linear-gradient(135deg, rgba(0, 123, 255, 0.06), rgba(40, 167, 69, 0.05));
    opacity: 1;
}

.server-card.has-custom-background .server-banner {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.34)),
        var(--server-background) center/cover;
}

.server-background-preview {
    width: 100%;
    min-height: 140px;
    border: 1px solid var(--mc-line);
    border-radius: 8px;
    background-position: center;
    background-size: cover;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
}

.server-content {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 720px;
}

.server-copy {
    min-width: 0;
}

.server-title-link {
    color: var(--mc-text);
    text-decoration: none;
}

.server-title-link:hover {
    color: var(--mc-green-dark);
}

.server-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 8px;
    object-fit: cover;
    image-rendering: pixelated;
    background: #e7f7ec;
    border: 1px solid rgba(23, 115, 48, 0.16);
    box-shadow: 0 10px 22px rgba(19, 32, 24, 0.10);
}

.dashboard-server-summary {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.dashboard-server-summary > div {
    min-width: 0;
}

.tag,
.month-pill,
.server-pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 8px;
    background: var(--mc-surface-soft);
    border: 1px solid var(--mc-line);
    color: var(--mc-muted);
    font-size: 0.86rem;
    font-weight: 700;
}

.server-pill {
    min-height: 26px;
    padding: 4px 9px;
    background: rgba(255, 255, 255, 0.9);
    color: #74857a;
    border-color: #e1ebe5;
    font-size: 0.8rem;
}

.server-online {
    color: var(--mc-muted);
}

.server-online::before {
    content: "";
    width: 8px;
    height: 8px;
    margin-right: 6px;
    border-radius: 50%;
    background: var(--mc-green);
    box-shadow: 0 0 0 3px rgba(39, 168, 68, 0.14);
}

.server-offline::before {
    content: "";
    width: 8px;
    height: 8px;
    margin-right: 6px;
    border-radius: 50%;
    background: #e23b54;
    box-shadow: 0 0 0 3px rgba(226, 59, 84, 0.14);
}

.version-badge {
    background: #e9ecef;
    border: 1px solid #dce2e8;
    color: var(--mc-muted);
}

.vote-box {
    min-width: 140px;
    padding: 16px;
    text-align: center;
    border-radius: 8px;
    background: #f8fbf9;
    border: 1px solid var(--mc-line);
}

.vote-button {
    position: relative;
    align-self: center;
    margin-right: 18px;
    min-width: 98px;
    z-index: 1;
}

.vote-button::before {
    content: "\2665";
    margin-right: 7px;
}

.votes {
    font-size: 2.35rem;
    font-weight: 900;
    color: var(--mc-green-dark);
    line-height: 1;
}

.btn {
    border-radius: 8px;
    font-weight: 700;
    box-shadow: none;
}

.btn-success {
    --bs-btn-bg: #2ea44f;
    --bs-btn-border-color: var(--mc-green);
    --bs-btn-hover-bg: var(--mc-green-dark);
    --bs-btn-hover-border-color: var(--mc-green-dark);
}

.btn-outline-light {
    --bs-btn-color: var(--mc-text);
    --bs-btn-border-color: var(--mc-line);
    --bs-btn-hover-bg: #f1f3f5;
    --bs-btn-hover-border-color: var(--mc-line);
    --bs-btn-hover-color: var(--mc-text);
}

.nav-actions {
    flex-wrap: wrap;
}

.nav-account-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    max-width: 230px;
    padding: 6px 12px 6px 7px;
    color: var(--mc-text);
    text-decoration: none;
    background: #ffffff;
    border: 1px solid #dfe7ef;
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.09);
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.nav-account-chip:hover {
    color: var(--mc-text);
    border-color: rgba(13, 110, 253, 0.36);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.13);
}

.nav-account-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    color: #ffffff;
    font-size: 0.94rem;
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(45deg, var(--mc-blue), var(--mc-blue-dark));
    border-radius: 8px;
    box-shadow: 0 7px 16px -8px var(--mc-blue-glow);
}

.nav-account-content {
    display: flex;
    min-width: 0;
    flex-direction: column;
    line-height: 1.08;
}

.nav-account-kicker {
    color: #8a96a3;
    font-size: 0.67rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.nav-account-name {
    overflow: hidden;
    color: var(--mc-text);
    font-size: 0.9rem;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-auth-login,
.btn-auth-register,
.btn-auth-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 116px;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 900;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid transparent;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, filter 160ms ease;
}

.btn-auth-login {
    color: var(--mc-text);
    background: #f1f4f7;
    border: 1px solid #e1e6eb;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.btn-auth-login:hover {
    color: var(--mc-text);
    background: #e7ecf1;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.btn-auth-register,
.btn-auth-submit {
    color: #ffffff;
    background: linear-gradient(45deg, var(--mc-blue), var(--mc-blue-dark));
    border: 1px solid var(--mc-blue);
    box-shadow: 0 8px 20px -8px var(--mc-blue-glow);
}

.btn-auth-register:hover,
.btn-auth-submit:hover {
    color: #ffffff;
    filter: brightness(1.08);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -8px var(--mc-blue-glow);
}

.btn-auth-logout {
    color: #ffffff;
    background: linear-gradient(45deg, #dc3545, #b02a37);
    border-color: #dc3545;
    box-shadow: 0 8px 20px -8px rgba(220, 53, 69, 0.52);
}

.btn-auth-logout:hover {
    color: #ffffff;
    filter: brightness(1.08);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -8px rgba(220, 53, 69, 0.58);
}

.mc-nav .btn-success,
.search-button,
.vote-button {
    border-radius: 8px;
    background: #2ea44f;
    border-color: #2ea44f;
    --bs-btn-hover-color: #ffffff;
    box-shadow: 0 4px 12px rgba(46, 164, 79, 0.24);
}

.btn-outline-warning,
.btn-outline-danger {
    background: #ffffff;
}

.form-label,
.form-check-label {
    color: var(--mc-text);
    font-weight: 700;
}

.form-control {
    color: var(--mc-text);
    background: #ffffff;
    border: 1px solid #c8dccf;
    border-radius: 8px;
}

.form-select {
    color: var(--mc-text);
    background-color: #ffffff;
    border: 1px solid #c8dccf;
    border-radius: 8px;
}

.form-control:focus {
    color: var(--mc-text);
    background: #ffffff;
    border-color: var(--mc-blue);
    box-shadow: 0 0 0 3px var(--mc-blue-glow);
}

.alert {
    border-radius: 8px;
    border: 1px solid var(--mc-line);
    box-shadow: 0 12px 32px rgba(25, 72, 39, 0.08);
}

.flash-stack {
    position: sticky;
    top: 86px;
    z-index: 1040;
    display: grid;
    gap: 12px;
    width: min(640px, calc(100% - 32px));
    margin: 18px auto -8px;
    pointer-events: none;
}

.flash-message {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #dbe4ef;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
    pointer-events: auto;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.flash-message.is-hiding {
    opacity: 0;
    transform: translateY(-10px);
}

.flash-message p {
    margin: 0;
    color: var(--mc-text);
    font-weight: 800;
    line-height: 1.45;
}

.flash-close {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 900;
    line-height: 1;
}

.flash-close:hover {
    color: #0f172a;
    background: #ffffff;
}

.flash-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.flash-icon::before {
    color: #ffffff;
    font-weight: 900;
}

.flash-success {
    border-left: 5px solid var(--mc-green);
}

.flash-success .flash-icon {
    background: linear-gradient(135deg, var(--mc-green), #1f8f3a);
    box-shadow: 0 10px 20px rgba(39, 168, 68, 0.24);
}

.flash-success .flash-icon::before {
    content: "✓";
}

.flash-error {
    border-left: 5px solid #e23b54;
}

.flash-error .flash-icon {
    background: linear-gradient(135deg, #e23b54, #be123c);
    box-shadow: 0 10px 20px rgba(226, 59, 84, 0.24);
}

.flash-error .flash-icon::before {
    content: "!";
}

.text-secondary {
    color: var(--mc-muted) !important;
}

.text-light-emphasis {
    color: #eef7f1 !important;
}

.auth-page {
    min-height: calc(100vh - 110px);
    display: flex;
    align-items: center;
}

.auth-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    overflow: hidden;
    min-height: 740px;
    width: min(100%, 1120px);
    max-width: 1120px;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid var(--mc-line);
    border-radius: 8px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

.auth-promo {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 44px;
    background: url("/assets/auth_background.png") center/cover;
    overflow: hidden;
}

.auth-promo-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(160deg, rgba(8, 18, 32, 0.70), rgba(0, 86, 179, 0.42)),
        rgba(0, 0, 0, 0.30);
    backdrop-filter: blur(1px);
}

.auth-promo-content {
    position: relative;
    z-index: 1;
    max-width: 430px;
    min-height: 520px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #ffffff;
    text-align: center;
}

.auth-promo-logo {
    width: min(240px, 80%);
    margin-bottom: 26px;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.28));
}

.auth-promo-content h2 {
    font-size: clamp(1.8rem, 2.6vw, 2.35rem);
    font-weight: 900;
    line-height: 1.15;
    min-height: 86px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    margin-bottom: 14px;
}

.auth-promo-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.04rem;
    min-height: 68px;
    margin-bottom: 24px;
}

.auth-feature-list {
    display: inline-grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
    text-align: left;
}

.auth-feature-list li {
    position: relative;
    padding-left: 28px;
    font-weight: 800;
}

.auth-feature-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.45em;
    width: 13px;
    height: 13px;
    border-radius: 4px;
    background: var(--mc-blue);
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.18);
}

.auth-form-side {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 56px clamp(42px, 5vw, 70px);
    background: #ffffff;
}

.auth-form-side > * {
    width: min(100%, 500px);
}

.auth-form-intro {
    min-height: 148px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    margin-bottom: 26px;
}

.auth-kicker {
    color: var(--mc-blue);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.auth-form-side h1 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 900;
    line-height: 1.08;
    margin-bottom: 10px;
}

.auth-form-intro p {
    color: var(--mc-muted);
    min-height: 56px;
    display: flex;
    align-items: center;
    margin-bottom: 0;
}

.auth-form {
    margin: 0;
}

.auth-form .form-label {
    margin-bottom: 6px;
}

.auth-form .mb-3,
.auth-form .mb-4 {
    margin-bottom: 16px !important;
}

.auth-input {
    min-height: 52px;
    padding: 13px 16px;
    border-color: var(--mc-line);
    box-shadow: 0 2px 7px rgba(15, 23, 42, 0.04);
}

.account-page {
    max-width: 1180px;
}

.account-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 28px 32px;
    color: #ffffff;
    background: linear-gradient(135deg, #111827, #1f3b73 58%, var(--mc-blue));
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18);
}

.account-hero .auth-kicker,
.account-hero p {
    color: rgba(255, 255, 255, 0.76);
}

.account-hero h1 {
    margin: 4px 0 8px;
    font-weight: 900;
}

.account-hero p {
    max-width: 640px;
    margin: 0;
}

.account-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.7fr);
    gap: 24px;
    align-items: start;
}

.account-profile-card,
.account-settings-card {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.10);
}

.account-profile-card {
    position: sticky;
    top: 96px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 30px;
    overflow: hidden;
}

.account-profile-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 92px;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.18), rgba(25, 135, 84, 0.14));
    pointer-events: none;
}

.account-profile-avatar {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 82px;
    height: 82px;
    color: #ffffff;
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(45deg, var(--mc-blue), var(--mc-blue-dark));
    border: 5px solid #ffffff;
    border-radius: 8px;
    box-shadow: 0 16px 28px rgba(13, 110, 253, 0.28);
}

.account-profile-card h2 {
    margin: 0 0 6px;
    font-weight: 900;
}

.account-profile-card p {
    margin: 0;
    color: var(--mc-muted);
    overflow-wrap: anywhere;
}

.account-status {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    width: fit-content;
    padding: 9px 12px;
    font-weight: 900;
    border-radius: 8px;
}

.account-status span {
    width: 9px;
    height: 9px;
    border-radius: 999px;
}

.account-status.is-verified {
    color: #0f7a3a;
    background: #eaf8ef;
}

.account-status.is-verified span {
    background: #17b857;
    box-shadow: 0 0 0 4px rgba(23, 184, 87, 0.14);
}

.account-status.is-unverified {
    color: #936515;
    background: #fff6db;
}

.account-status.is-unverified span {
    background: #f0ad1e;
    box-shadow: 0 0 0 4px rgba(240, 173, 30, 0.18);
}

.account-profile-note {
    padding: 16px;
    color: var(--mc-muted);
    background: #f6f9fc;
    border: 1px solid #e3ebf3;
    border-radius: 8px;
}

.account-settings-grid {
    display: grid;
    gap: 20px;
}

.account-settings-card {
    padding: 28px;
}

.account-card-head {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.account-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    color: var(--mc-blue);
    font-weight: 900;
    background: #edf5ff;
    border: 1px solid #d9e9ff;
    border-radius: 8px;
}

.account-card-head h2 {
    margin: 0 0 6px;
    font-size: 1.32rem;
    font-weight: 900;
}

.account-card-head p {
    margin: 0;
    color: var(--mc-muted);
}

.account-form {
    display: grid;
    gap: 16px;
}

.account-form .btn {
    width: fit-content;
}

.dashboard-page {
    max-width: 1180px;
}

.dashboard-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 28px 32px;
    color: #ffffff;
    background: linear-gradient(135deg, #10243f, #1f5b91 58%, var(--mc-blue));
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18);
}

.dashboard-hero .auth-kicker,
.dashboard-hero p {
    color: rgba(255, 255, 255, 0.76);
}

.dashboard-hero h1 {
    margin: 4px 0 8px;
    font-weight: 900;
}

.dashboard-hero p {
    max-width: 700px;
    margin: 0;
}

.dashboard-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.dashboard-stat-card {
    padding: 22px 24px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.09);
}

.dashboard-stat-card span {
    display: block;
    color: var(--mc-muted);
    font-size: 0.82rem;
    font-weight: 900;
    text-transform: uppercase;
}

.dashboard-stat-card strong {
    display: block;
    margin-top: 6px;
    color: var(--mc-text);
    font-size: 2rem;
    line-height: 1;
}

.dashboard-list {
    display: grid;
    gap: 16px;
}

.dashboard-server-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.09);
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.dashboard-server-card:hover {
    border-color: rgba(13, 110, 253, 0.32);
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.13);
}

.dashboard-server-main {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.dashboard-server-icon {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    object-fit: cover;
    background: #eef3f8;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
}

.dashboard-server-copy {
    min-width: 0;
}

.dashboard-server-copy h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 900;
}

.dashboard-server-copy p {
    margin: 0 0 10px;
    color: var(--mc-muted);
    overflow-wrap: anywhere;
}

.dashboard-server-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dashboard-server-meta span {
    padding: 7px 10px;
    color: #5f6d7b;
    font-size: 0.82rem;
    font-weight: 800;
    background: #f3f7fb;
    border: 1px solid #e2eaf2;
    border-radius: 8px;
}

.dashboard-server-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.dashboard-empty-state {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 34px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.10);
}

.dashboard-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    flex: 0 0 76px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(45deg, var(--mc-blue), var(--mc-blue-dark));
    border-radius: 8px;
    box-shadow: 0 16px 28px rgba(13, 110, 253, 0.28);
}

.dashboard-empty-state h2 {
    margin: 4px 0 8px;
    font-weight: 900;
}

.dashboard-empty-state p {
    max-width: 640px;
    color: var(--mc-muted);
}

.btn-auth-submit {
    min-height: 54px;
    border-radius: 8px;
    font-weight: 900;
}

.auth-switch {
    margin: 24px 0 0;
    text-align: center;
    color: var(--mc-muted);
}

.auth-helper-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
    color: var(--mc-muted);
    font-size: 0.92rem;
}

.auth-helper-links a,
.auth-helper-links button {
    padding: 0;
    color: var(--mc-blue);
    background: transparent;
    border: 0;
    font-weight: 800;
    text-decoration: none;
}

.auth-helper-links a:hover,
.auth-helper-links button:hover {
    text-decoration: underline;
}

.auth-switch a {
    color: var(--mc-blue);
    font-weight: 900;
    text-decoration: none;
}

.auth-switch a:hover {
    text-decoration: underline;
}

footer {
    border-top: 1px solid var(--mc-line);
    background: rgba(255, 255, 255, 0.9);
}

.admin-shell {
    --admin-dark: #111827;
    --admin-muted: #64748b;
}

.admin-hero {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    margin-bottom: 18px;
    padding: 30px;
    color: #ffffff;
    background:
        linear-gradient(135deg, rgba(17, 24, 39, 0.96), rgba(30, 64, 175, 0.88)),
        linear-gradient(135deg, rgba(0, 123, 255, 0.28), rgba(40, 167, 69, 0.22));
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.admin-hero h1 {
    margin: 0 0 8px;
    font-weight: 900;
}

.admin-hero p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
}

.admin-kicker {
    display: inline-flex;
    margin-bottom: 10px;
    color: #93c5fd;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
}

.admin-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    color: #475569;
    text-decoration: none;
    font-weight: 900;
    border-radius: 8px;
}

.admin-tab:hover {
    color: #0f172a;
    background: #eef4ff;
}

.admin-tab.active {
    color: #ffffff;
    background: linear-gradient(45deg, var(--mc-blue), var(--mc-blue-dark));
    box-shadow: 0 8px 18px -10px var(--mc-blue-glow);
}

.admin-stat-grid {
    align-items: stretch;
}

.admin-stat-card {
    height: 100%;
    padding: 24px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.09);
}

.admin-stat-card span {
    display: block;
    color: var(--admin-muted);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.admin-stat-card strong,
.admin-stat {
    color: var(--mc-blue);
    font-size: 2.35rem;
    font-weight: 900;
    line-height: 1.1;
}

.admin-panel {
    overflow: hidden;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.10);
}

.admin-table {
    --bs-table-bg: transparent;
    --bs-table-color: #172033;
    --bs-table-hover-bg: #f6f9ff;
    --bs-table-hover-color: #172033;
    --bs-table-border-color: #e2e8f0;
}

.admin-table thead {
    background: #f8fafc;
    border-bottom: 1px solid #dbe4ef;
}

.admin-table th {
    padding: 16px 18px;
    color: #64748b;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.admin-table td {
    padding: 18px;
}

.admin-table .btn {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.settings-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-height: 140px;
    padding: 22px;
    background: #f8fafc;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    cursor: pointer;
}

.settings-card .form-check-input {
    flex: 0 0 auto;
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 3px;
}

.settings-card strong,
.settings-card small {
    display: block;
}

.settings-card strong {
    color: #172033;
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.settings-card small {
    color: #64748b;
    line-height: 1.55;
}

.settings-section {
    padding: 22px;
    background: #f8fafc;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
}

.settings-hint {
    display: inline-flex;
    padding: 8px 10px;
    color: #475569;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 800;
}

.maintenance-card {
    max-width: 760px;
    margin: 80px auto;
    padding: 48px;
    text-align: center;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

.maintenance-card h1 {
    font-weight: 900;
    margin-bottom: 12px;
}

.maintenance-card p {
    color: var(--mc-muted);
    font-size: 1.08rem;
    margin-bottom: 26px;
}

.server-detail-hero {
    padding: 56px 0 24px;
    background: transparent;
}

.server-detail-card {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 26px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--mc-line);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.server-detail-card h1 {
    font-size: clamp(2rem, 3vw, 3rem);
}

.server-detail-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.94)),
        linear-gradient(135deg, rgba(0, 123, 255, 0.06), rgba(40, 167, 69, 0.05));
    z-index: 0;
}

.server-detail-card.has-custom-background::before {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.40)),
        var(--server-background) center/cover;
}

.server-detail-card > * {
    position: relative;
    z-index: 1;
}

.server-detail-icon {
    width: 76px;
    height: 76px;
    border-radius: 8px;
    image-rendering: pixelated;
    border: 1px solid rgba(23, 115, 48, 0.16);
    box-shadow: 0 14px 28px rgba(19, 32, 24, 0.12);
}

.detail-vote-button {
    margin: 0;
    white-space: nowrap;
}

.server-detail-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 0 0 auto;
}

.server-address-copy {
    display: inline-flex;
    overflow: hidden;
    align-items: stretch;
    min-height: 48px;
    border: 1px solid #dfe6ee;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.server-address-copy span,
.server-address-copy button {
    display: inline-flex;
    align-items: center;
    padding: 0 16px;
    border: 0;
}

.server-address-copy span {
    max-width: 210px;
    color: var(--mc-text);
    font-weight: 900;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.9rem;
}

.server-address-copy button {
    color: var(--mc-muted);
    background: rgba(248, 250, 252, 0.95);
    border-left: 1px solid #dfe6ee;
    font-weight: 800;
}

.server-address-copy button:hover {
    color: var(--mc-blue);
    background: #ffffff;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.stat-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 118px;
    padding: 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--mc-line);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.stat-card span {
    display: block;
    color: var(--mc-muted);
    font-size: 0.82rem;
    font-weight: 800;
    margin-top: 8px;
}

.stat-card strong {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--mc-text);
    font-size: 1.6rem;
    line-height: 1.1;
}

.stat-card small {
    display: block;
    margin-top: 4px;
    color: #94a3b8;
    font-size: 0.76rem;
    font-weight: 700;
}

.status-value::before {
    content: "";
    width: 10px;
    height: 10px;
    flex: 0 0 10px;
    border-radius: 50%;
}

.status-value.is-online::before {
    background: var(--mc-green);
    box-shadow: 0 0 0 4px rgba(39, 168, 68, 0.14);
}

.status-value.is-offline::before {
    background: #e23b54;
    box-shadow: 0 0 0 4px rgba(226, 59, 84, 0.14);
}

.vote-collapse-panel {
    scroll-margin-top: 110px;
}

.faq-accordion {
    max-width: 920px;
    margin: 0 auto;
}

.faq-card {
    overflow: hidden;
    margin-bottom: 14px;
    border: 1px solid var(--mc-line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.faq-card .accordion-button {
    padding: 20px 22px;
    color: var(--mc-text);
    background: rgba(255, 255, 255, 0.98);
    font-weight: 900;
    box-shadow: none;
}

.faq-card .accordion-button:not(.collapsed) {
    color: var(--mc-text);
    background: #f7fbff;
}

.faq-card .accordion-body {
    padding: 0 22px 22px;
    color: var(--mc-muted);
    line-height: 1.75;
}

.faq-sort-list {
    display: grid;
    gap: 14px;
}

.faq-sort-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 16px;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    background: #f8fafc;
}

.faq-sort-item.is-dragging {
    opacity: 0.55;
}

.faq-drag-handle {
    color: #94a3b8;
    font-weight: 900;
    cursor: grab;
}

.faq-sort-copy {
    min-width: 0;
}

.faq-sort-copy strong {
    display: block;
    color: var(--mc-text);
    font-size: 1rem;
}

.faq-sort-copy p {
    margin: 5px 0 0;
    color: var(--mc-muted);
    font-size: 0.9rem;
}

.faq-sort-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.detail-tabs {
    display: flex;
    gap: 24px;
    padding: 0;
    margin: 0;
    list-style: none;
    border-bottom: 1px solid var(--mc-line);
}

.detail-tabs button {
    display: inline-flex;
    padding: 0 0 12px;
    color: var(--mc-muted);
    background: transparent;
    border: 0;
    text-decoration: none;
    font-weight: 800;
}

.detail-tabs button.active {
    color: var(--mc-blue);
    border-bottom: 3px solid var(--mc-blue);
}

.server-description-full {
    white-space: normal;
    line-height: 1.75;
}

.server-description-full img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px 0;
}

.server-description-full blockquote {
    margin: 16px 0;
    padding: 14px 18px;
    color: var(--mc-muted);
    background: #f8fafc;
    border-left: 4px solid var(--mc-blue);
    border-radius: 8px;
}

.server-description-full a {
    overflow-wrap: anywhere;
}

.tox.tox-tinymce {
    border-color: #c8dccf;
    border-radius: 8px;
}

.voter-period-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.voter-period-card {
    min-height: 100%;
    padding: 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.voter-period-card h3 {
    color: var(--mc-text);
    font-weight: 900;
}

.voter-count {
    flex: 0 0 auto;
    padding: 4px 8px;
    color: var(--mc-muted);
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.74rem;
    font-weight: 900;
}

.voter-list {
    display: grid;
    gap: 10px;
}

.voter-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 9px;
    background: #ffffff;
    border: 1px solid #edf2f7;
    border-radius: 8px;
}

.voter-item img {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 8px;
    image-rendering: pixelated;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.10);
}

.voter-item div {
    min-width: 0;
}

.voter-item strong,
.voter-item span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.voter-item strong {
    color: var(--mc-text);
    font-size: 0.92rem;
}

.voter-item span {
    color: var(--mc-muted);
    font-size: 0.76rem;
}

.vote-history {
    display: grid;
    gap: 14px;
}

.vote-history-row {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr) 44px;
    gap: 14px;
    align-items: center;
}

.vote-history-bar {
    overflow: hidden;
    height: 12px;
    border-radius: 999px;
    background: #e8f2ec;
}

.vote-history-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--mc-green), var(--mc-lime));
}

@media (max-width: 767px) {
    .hero {
        min-height: 310px;
    }

    .server-browser {
        margin-top: -22px;
    }

    .search-panel {
        grid-template-columns: 1fr;
    }

    .server-card {
        align-items: stretch;
        flex-direction: column;
    }

    .rank {
        width: 100%;
        min-height: 48px;
        border-right: 0;
        border-bottom: 1px solid var(--mc-line);
    }

    .server-main {
        padding: 20px;
    }

    .server-content {
        align-items: flex-start;
    }

    .vote-button {
        width: calc(100% - 40px);
        margin: 0 20px 20px;
    }

    .server-detail-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .detail-vote-button {
        width: 100%;
        margin: 0;
    }

    .server-detail-actions,
    .server-address-copy {
        width: 100%;
    }

    .server-detail-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .server-address-copy span {
        flex: 1 1 auto;
        max-width: none;
    }

    .stats-row {
        grid-template-columns: 1fr;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .voter-period-grid {
        grid-template-columns: 1fr;
    }

    .vote-history-row {
        grid-template-columns: 1fr;
    }

    .vote-box {
        width: 100%;
    }

    .faq-sort-item {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .faq-sort-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .hero .display-4 {
        font-size: 2.35rem;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .voter-period-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .account-layout {
        grid-template-columns: 1fr;
    }

    .account-profile-card {
        position: relative;
        top: auto;
    }

    .dashboard-stat-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-server-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-server-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .auth-card {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .auth-promo {
        min-height: 360px;
    }

    .auth-promo-content {
        min-height: 0;
    }

    .auth-promo-content p {
        min-height: 0;
    }

    .auth-form-side {
        justify-content: center;
        padding: 42px 28px;
    }

    .auth-form-intro {
        min-height: 0;
    }

    .auth-form-intro p {
        min-height: 0;
    }
}

@media (max-width: 575px) {
    .account-hero {
        align-items: stretch;
        flex-direction: column;
        padding: 24px;
    }

    .account-hero .btn {
        width: 100%;
    }

    .account-profile-card,
    .account-settings-card {
        padding: 22px;
    }

    .account-card-head {
        flex-direction: column;
    }

    .account-form .btn {
        width: 100%;
    }

    .dashboard-hero {
        align-items: stretch;
        flex-direction: column;
        padding: 24px;
    }

    .dashboard-hero .btn {
        width: 100%;
    }

    .dashboard-server-main,
    .dashboard-empty-state {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-server-actions .btn {
        width: 100%;
    }

    .dashboard-empty-state {
        padding: 24px;
    }

    .voter-period-grid {
        grid-template-columns: 1fr;
    }

    .btn-auth-login,
    .btn-auth-register,
    .btn-auth-logout {
        width: 100%;
    }

    .nav-actions {
        width: 100%;
    }

    .nav-account-chip {
        width: 100%;
        max-width: none;
    }

    .auth-page {
        align-items: flex-start;
    }

    .auth-promo {
        min-height: 300px;
        padding: 32px 22px;
    }
}
