.h5,
.h6 {
    line-height: 1.2;
}

p:last-child {
    margin-bottom: 0;
}

.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;
}

.nav-notification-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    margin-left: 8px;
    padding: 0 6px;
    border-radius: 999px;
    background: #dc3545;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1;
    vertical-align: middle;
    box-shadow: 0 8px 16px rgba(220, 53, 69, 0.22);
}

.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: 1080px;
    padding-inline: 12px;
}

.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) minmax(250px, 290px);
    gap: 14px;
    align-items: center;
    padding: 0;
    margin-bottom: 18px;
}

.search-input-wrap {
    position: relative;
}

.search-input {
    height: 60px;
    padding-left: 62px;
    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: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    color: #8a9aa0;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 2;
}

.search-icon i {
    font-size: 0.95rem;
}

.sort-dropdown {
    position: relative;
    min-width: 0;
}

.sort-dropdown-trigger {
    width: 100%;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 18px 13px 20px;
    border: 1px solid #d7e3dc;
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 250, 252, 0.97));
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
    color: #0f172a;
    text-align: left;
    transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.sort-dropdown-trigger:hover {
    border-color: #bad1c1;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.1);
    transform: translateY(-1px);
}

.sort-dropdown.is-open .sort-dropdown-trigger,
.sort-dropdown-trigger:focus-visible {
    border-color: var(--mc-green);
    box-shadow: 0 0 0 4px rgba(46, 164, 79, 0.14), 0 16px 32px rgba(15, 23, 42, 0.12);
    outline: none;
}

.sort-dropdown-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sort-dropdown-label {
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.sort-dropdown-copy strong {
    display: block;
    min-width: 0;
    color: #0f172a;
    font-size: 1.02rem;
    font-weight: 900;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sort-dropdown-caret {
    width: 12px;
    height: 12px;
    flex: 0 0 12px;
    border-right: 2px solid #64748b;
    border-bottom: 2px solid #64748b;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 140ms ease, border-color 140ms ease;
}

.sort-dropdown.is-open .sort-dropdown-caret {
    border-color: var(--mc-green);
    transform: rotate(-135deg) translateX(-1px);
}

.sort-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    z-index: 50;
    display: grid;
    gap: 6px;
    padding: 10px;
    border: 1px solid rgba(32, 84, 51, 0.14);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.995), rgba(245, 248, 251, 0.98));
    box-shadow: 0 24px 54px rgba(15, 23, 42, 0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
}

.sort-dropdown.is-open .sort-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.sort-dropdown-option {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #0f172a;
    font-size: 0.98rem;
    font-weight: 800;
    text-align: left;
    transition: background-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.sort-dropdown-option:hover,
.sort-dropdown-option:focus-visible {
    background: rgba(46, 164, 79, 0.1);
    color: #134e2a;
    outline: none;
    transform: translateX(2px);
}

.sort-dropdown-option.is-active {
    background: linear-gradient(135deg, rgba(46, 164, 79, 0.16), rgba(24, 120, 54, 0.1));
    color: #14532d;
}

.sort-dropdown-check {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, #2ea44f, #1f7c3a);
    box-shadow: 0 8px 18px rgba(46, 164, 79, 0.22);
    position: relative;
}

.sort-dropdown-check::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 6px;
    width: 5px;
    height: 9px;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    transform: rotate(45deg);
}

.panel,
.server-card {
    background: var(--mc-surface);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.panel {
    border: 2px solid var(--mc-line);
}

.server-card {
    border: 0;
}

.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):not(.server-card-link-layer) {
    position: relative;
    z-index: 1;
}

.server-card-link-layer {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: block;
    border-radius: inherit;
}

.server-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-5px);
}

.server-card {
    cursor: pointer;
}

.server-card:focus-visible {
    outline: 3px solid rgba(46, 164, 79, 0.28);
    outline-offset: 1px;
}

.rank {
    display: grid;
    place-items: center;
    width: 76px;
    flex: 0 0 76px;
    min-height: 112px;
    border-radius: 0;
    background: transparent;
    color: var(--mc-text);
    font-size: 1.3rem;
    font-weight: 900;
    border-right: 0;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

.rank.is-gold {
    color: #d4a017;
    background: transparent;
    text-shadow: 0 0 16px rgba(212, 160, 23, 0.18);
}

.rank.is-silver {
    color: #b6c0cc;
    background: transparent;
    text-shadow: 0 0 16px rgba(182, 192, 204, 0.18);
}

.rank.is-bronze {
    color: #b8662e;
    background: transparent;
    text-shadow: 0 0 16px rgba(184, 102, 46, 0.18);
}

.server-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    padding: 22px 24px;
}

.server-quick-panel {
    position: relative;
    z-index: 3;
    flex: 0 0 214px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 12px;
    padding: 18px 18px 18px 0;
}

.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.97) 0%, rgba(255, 255, 255, 0.82) 38%, rgba(255, 255, 255, 0.3) 74%, rgba(255, 255, 255, 0.16) 100%),
        var(--server-background) center/cover;
}

.new-servers-panel {
    padding: 22px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--mc-line);
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.new-servers-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.new-servers-head h2 {
    margin: 2px 0 0;
    color: var(--mc-text);
    font-size: 1.35rem;
    font-weight: 900;
}

.new-server-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.new-server-row,
.new-server-empty {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 0;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.new-server-row {
    color: inherit;
    text-decoration: none;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.new-server-row:hover {
    color: inherit;
    background: #f3fbf5;
    border-color: #cfead5;
    transform: translateY(-1px);
}

.new-server-row img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    image-rendering: pixelated;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.10);
}

.new-server-row > div {
    min-width: 0;
    display: grid;
    align-content: center;
    gap: 2px;
}

.new-server-headline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}

.new-server-row strong,
.new-server-row span {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.new-server-row strong {
    color: var(--mc-text);
    font-size: 0.9rem;
    font-weight: 900;
}

.new-server-headline strong {
    min-width: 0;
    flex: 1 1 auto;
}

.new-server-row span,
.new-server-empty span {
    color: var(--mc-muted);
    font-size: 0.75rem;
    font-weight: 700;
}

.new-server-row em {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    margin-top: 0;
    color: #5f6f7f;
    font-style: normal;
    font-size: 0.7rem;
    font-weight: 800;
    white-space: nowrap;
}

.new-server-empty {
    grid-template-columns: 1fr;
    min-height: 0;
    text-align: center;
}

.new-server-empty strong {
    color: var(--mc-text);
    font-weight: 900;
}

.server-background-preview {
    width: 100%;
    min-height: 140px;
    border: 1px solid var(--mc-line);
    border-radius: 8px;
    overflow: hidden;
    background: #f5f7fa;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
}

.server-background-preview-image {
    display: block;
    width: 100%;
    min-height: 140px;
    max-height: 240px;
    object-fit: cover;
}

.server-content {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 760px;
}

.server-copy {
    min-width: 0;
    flex: 1 1 auto;
    width: clamp(420px, 46vw, 620px);
    max-width: 620px;
}

.server-card.has-custom-background .server-copy {
    padding: 10px 14px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.42));
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(10px);
}

.server-title-link {
    color: var(--mc-text);
    text-decoration: none;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.server-card:hover .server-title-link {
    color: var(--mc-green-dark);
}

.server-list-description {
    max-width: 100%;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #5f6f64 !important;
    font-size: 0.92rem;
    line-height: 1.48;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.46);
}

.server-quick-stats {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 8px;
}

.server-quick-chip {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.64);
    border: 1px solid rgba(255, 255, 255, 0.34);
    color: #274233;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(8px);
}

.server-quick-chip svg {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    color: #3b5d4a;
}

.server-quick-chip i {
    font-size: 0.82rem;
    color: #3b5d4a;
}

.server-quick-chip strong {
    font-size: 0.95rem;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

.server-quick-chip.is-highlight {
    background: rgba(197, 242, 210, 0.62);
    border-color: rgba(36, 132, 73, 0.16);
    color: #1d5a34;
}

.server-quick-chip.is-highlight svg {
    color: #1f7a3b;
}

.server-quick-copy {
    width: 100%;
    max-width: 214px;
}

.server-quick-copy-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 46px;
    padding: 7px 8px 7px 8px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.56);
    color: #1f2f25;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(10px);
    text-align: left;
    position: relative;
    z-index: 4;
    pointer-events: auto;
}

.server-quick-copy-button * {
    pointer-events: none;
}

.server-quick-copy-prefix {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 30px;
    padding: 0 9px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.08);
    color: #5d6d63;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.server-quick-copy-button strong {
    min-width: 0;
    flex: 1 1 auto;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.96rem;
    font-weight: 900;
    line-height: 1.2;
    color: #223228;
}

.server-quick-copy-button strong.is-copied {
    color: #166534;
}

.server-quick-copy-button.is-copied {
    border-color: rgba(31, 122, 59, 0.28);
    background: rgba(236, 249, 240, 0.96);
}

.server-quick-copy-button.is-copied .server-quick-copy-icon {
    background: linear-gradient(180deg, #28a745, #1f7a3b);
    box-shadow: 0 10px 22px rgba(31, 122, 59, 0.22);
}

.server-quick-copy-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 10px;
    background: rgba(46, 164, 79, 0.92);
    color: #ffffff;
}

.server-quick-copy-icon i {
    font-size: 0.92rem;
}

.server-icon {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    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);
}

.server-pending::before {
    content: "";
    width: 8px;
    height: 8px;
    margin-right: 6px;
    border-radius: 50%;
    background: #f0b429;
    box-shadow: 0 0 0 3px rgba(240, 180, 41, 0.18);
}

.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: 3;
}

.server-card > .vote-button {
    z-index: 3;
}

.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: var(--mc-btn-radius);
    font-weight: 900;
    border-width: 1px;
    box-shadow: var(--mc-btn-shadow);
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease, filter 160ms ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--mc-btn-shadow-hover);
}

.btn:focus,
.btn:focus-visible,
.btn-check:focus + .btn {
    outline: 0;
    box-shadow: 0 0 0 4px var(--mc-green-glow), 0 10px 22px rgba(15, 23, 42, 0.12);
}

.btn:focus:not(:focus-visible) {
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.btn:active,
.btn.active,
.btn.show {
    transform: translateY(0);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.10);
}

.btn,
.btn-auth-login,
.btn-auth-register,
.btn-auth-submit,
.btn-auth-logout,
.btn-dashboard-view,
.btn-dashboard-log,
.vote-button,
.search-button,
.detail-vote-button,
.discord-button,
.server-address-copy button,
.server-info-copy button,
.comment-report-button {
    -webkit-appearance: none;
    appearance: none;
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
}

.btn,
.btn-auth-login,
.btn-auth-register,
.btn-auth-submit,
.btn-auth-logout,
.btn-dashboard-view,
.btn-dashboard-log,
.vote-button,
.search-button,
.detail-vote-button,
.discord-button,
.server-address-copy button,
.server-info-copy button,
.comment-report-button {
    border-radius: var(--mc-btn-radius);
}

.btn,
.btn-auth-login,
.btn-auth-register,
.btn-auth-submit,
.btn-auth-logout,
.btn-dashboard-view,
.btn-dashboard-log,
.vote-button,
.search-button,
.detail-vote-button,
.discord-button,
.server-address-copy button,
.server-info-copy button,
.comment-report-button {
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease, filter 160ms ease;
}

.btn-auth-login:focus,
.btn-auth-login:focus-visible,
.btn-auth-register:focus,
.btn-auth-register:focus-visible,
.btn-auth-submit:focus,
.btn-auth-submit:focus-visible,
.btn-auth-logout:focus,
.btn-auth-logout:focus-visible,
.btn-dashboard-view:focus,
.btn-dashboard-view:focus-visible,
.btn-dashboard-log:focus,
.btn-dashboard-log:focus-visible,
.vote-button:focus,
.vote-button:focus-visible,
.search-button:focus,
.search-button:focus-visible,
.detail-vote-button:focus,
.detail-vote-button:focus-visible,
.discord-button:focus,
.discord-button:focus-visible,
.server-address-copy button:focus,
.server-address-copy button:focus-visible,
.server-info-copy button:focus,
.server-info-copy button:focus-visible,
.comment-report-button:focus,
.comment-report-button:focus-visible {
    outline: 0;
}

.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);
    --bs-btn-active-bg: var(--mc-green-dark);
    --bs-btn-active-border-color: var(--mc-green-dark);
    --bs-btn-disabled-bg: #9ccfa9;
    --bs-btn-disabled-border-color: #9ccfa9;
    color: #ffffff;
    box-shadow: 0 8px 20px -8px var(--mc-green-glow);
}

.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);
    --bs-btn-active-bg: #edf2f6;
    --bs-btn-active-border-color: var(--mc-line);
    --bs-btn-active-color: var(--mc-text);
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.btn-outline-secondary,
.btn-outline-primary {
    color: #1f7a3b;
    background: #ffffff;
    border-color: #bfe8cb;
}

.btn-outline-secondary:hover,
.btn-outline-primary:hover,
.btn-outline-secondary:active,
.btn-outline-primary:active {
    color: #16662f;
    background: #ecf9f0;
    border-color: #a7dfb8;
}

.btn-primary {
    --bs-btn-bg: var(--mc-blue);
    --bs-btn-border-color: var(--mc-blue);
    --bs-btn-hover-bg: var(--mc-blue-dark);
    --bs-btn-hover-border-color: var(--mc-blue-dark);
    --bs-btn-active-bg: var(--mc-blue-dark);
    --bs-btn-active-border-color: var(--mc-blue-dark);
}

.btn-danger {
    --bs-btn-bg: var(--mc-red);
    --bs-btn-border-color: var(--mc-red);
    --bs-btn-hover-bg: var(--mc-red-dark);
    --bs-btn-hover-border-color: var(--mc-red-dark);
    --bs-btn-active-bg: var(--mc-red-dark);
    --bs-btn-active-border-color: var(--mc-red-dark);
}

.btn-outline-warning,
.btn-outline-danger {
    background: #ffffff;
}

.btn-outline-warning {
    color: #936515;
    border-color: #f0d58a;
}

.btn-outline-warning:hover,
.btn-outline-warning:active {
    color: #6e4a0d;
    background: #fff6db;
    border-color: #ecc765;
}

.btn-outline-danger {
    color: var(--mc-red);
    border-color: #f0b8bf;
}

.btn-outline-danger:hover,
.btn-outline-danger:active {
    color: var(--mc-red-dark);
    background: #fff0f2;
    border-color: #e899a4;
}

.nav-actions {
    flex-wrap: wrap;
}

.nav-submit-server-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-left: 0;
    color: var(--mc-green);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: inherit;
    font-weight: 500;
    line-height: inherit;
    vertical-align: middle;
    transition: color 160ms ease, background 160ms ease;
}

.nav-submit-server-link:hover {
    color: var(--mc-green-dark);
}

.nav-submit-server-link:focus,
.nav-submit-server-link:focus-visible {
    color: var(--mc-green-dark);
    outline: 0;
}

.nav-submit-server-link:focus:not(:focus-visible) {
    color: var(--mc-green-dark);
}

.nav-submit-server-link.is-active {
    color: var(--mc-green-dark);
}

.navbar .nav-link.nav-submit-server-link,
.navbar .nav-link.nav-submit-server-link:hover,
.navbar .nav-link.nav-submit-server-link:focus,
.navbar .nav-link.nav-submit-server-link:focus-visible,
.navbar .nav-link.nav-submit-server-link.active {
    color: var(--mc-green-dark) !important;
}

.nav-submit-server-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    font-size: 0.98rem;
    font-weight: 900;
    color: currentColor;
    transform: translateY(1px);
}

.nav-submit-server-icon i {
    font-size: 0.95rem;
}

.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-chip:focus,
.nav-account-chip:focus-visible,
.admin-tab:focus,
.admin-tab:focus-visible,
.auth-helper-links a:focus,
.auth-helper-links a:focus-visible,
.accordion-button:focus,
.detail-tabs button:focus,
.detail-tabs button:focus-visible,
.btn-close:focus,
.flash-close:focus,
.flash-close:focus-visible,
.server-address-copy button:focus,
.server-address-copy button:focus-visible,
.auth-helper-links button:focus,
.auth-helper-links button:focus-visible,
.navbar-toggler:focus {
    outline: 0;
    box-shadow: 0 0 0 4px var(--mc-green-glow), 0 10px 22px rgba(15, 23, 42, 0.12);
}

.nav-account-chip:focus:not(:focus-visible),
.admin-tab:focus:not(:focus-visible),
.auth-helper-links a:focus:not(:focus-visible),
.accordion-button:focus:not(:focus-visible),
.detail-tabs button:focus:not(:focus-visible),
.btn-close:focus:not(:focus-visible),
.flash-close:focus:not(:focus-visible),
.server-address-copy button:focus:not(:focus-visible),
.auth-helper-links button:focus:not(:focus-visible),
.navbar-toggler:focus:not(:focus-visible) {
    box-shadow: none;
}

.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);
    overflow: hidden;
}

.nav-account-avatar img,
.account-profile-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
}

.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: var(--mc-btn-radius);
    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, border-color 160ms ease, color 160ms ease, filter 160ms ease;
}

.btn-auth-login {
    color: var(--mc-text);
    background: #f8fafc;
    border: 1px solid #dbe4ef;
    box-shadow: var(--mc-btn-shadow);
}

.btn-auth-login:hover {
    color: var(--mc-text);
    background: #eef3f8;
    transform: translateY(-2px);
    box-shadow: var(--mc-btn-shadow-hover);
}

.btn-auth-login:active,
.btn-auth-login:focus,
.btn-auth-login:focus-visible {
    color: var(--mc-text);
    background: #eef3f8;
    border-color: #cdd9e5;
    box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.16), var(--mc-btn-shadow-hover);
}

.btn-auth-register,
.btn-auth-submit {
    color: #ffffff;
    background: linear-gradient(45deg, var(--mc-green), var(--mc-green-dark));
    border: 1px solid var(--mc-green);
    box-shadow: 0 8px 20px -8px var(--mc-green-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-green-glow);
}

.btn-auth-register:active,
.btn-auth-register:focus,
.btn-auth-submit:active,
.btn-auth-submit:focus,
.btn-auth-register:focus-visible,
.btn-auth-submit:focus-visible {
    color: #ffffff;
    border-color: var(--mc-green);
    box-shadow: 0 0 0 4px rgba(46, 164, 79, 0.18), 0 12px 24px -8px var(--mc-green-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);
}

.btn-auth-logout:active,
.btn-auth-logout:focus,
.btn-auth-logout:focus-visible {
    color: #ffffff;
    border-color: #dc3545;
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.16), 0 12px 24px -8px rgba(220, 53, 69, 0.58);
}

.mc-nav .btn-success,
.search-button,
.vote-button {
    border-radius: var(--mc-btn-radius);
    background: #2ea44f;
    border-color: #2ea44f;
    --bs-btn-hover-color: #ffffff;
    --bs-btn-active-color: #ffffff;
    box-shadow: 0 4px 12px rgba(46, 164, 79, 0.24);
}

.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 {
    -webkit-appearance: none;
    appearance: none;
    color: var(--mc-text);
    background-color: #ffffff;
    background-image:
        linear-gradient(45deg, transparent 50%, #64748b 50%),
        linear-gradient(135deg, #64748b 50%, transparent 50%),
        linear-gradient(to right, rgba(219, 228, 239, 0.9), rgba(219, 228, 239, 0.9));
    background-position:
        calc(100% - 20px) calc(50% - 3px),
        calc(100% - 14px) calc(50% - 3px),
        calc(100% - 42px) 50%;
    background-size: 6px 6px, 6px 6px, 1px 24px;
    background-repeat: no-repeat;
    border: 1px solid #c8dccf;
    border-radius: var(--mc-btn-radius);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
    cursor: pointer;
}

.form-control:focus {
    color: var(--mc-text);
    background: #ffffff;
    border-color: var(--mc-blue);
    box-shadow: 0 0 0 3px var(--mc-blue-glow);
}

.form-select:focus {
    color: var(--mc-text);
    background-color: #ffffff;
    border-color: var(--mc-green);
    box-shadow: 0 0 0 4px rgba(46, 164, 79, 0.14);
    outline: 0;
}

.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: "!";
}

.flash-icon::before {
    display: inline-block;
    font-family: "Font Awesome 7 Free";
    font-weight: 900;
}

.flash-success .flash-icon::before {
    content: "\f00c";
}

.flash-error .flash-icon::before {
    content: "\f071";
}

.text-secondary {
    color: var(--mc-muted) !important;
}

.text-light-emphasis {
    color: #eef7f1 !important;
}

