﻿:root {
    --ml-blue: #173f8f;
    --ml-blue-2: #235aae;
    --ml-green: #0fa87a;
    --ml-ink: #111827;
    --ml-muted: #5f6675;
    --ml-border: #d9e0ea;
    --ml-surface: #ffffff;
    --ml-soft: rgba(244, 248, 252, 0.92);
    --ml-shadow: 0 10px 28px rgba(20, 35, 58, 0.14);
}

.ml-wrap {
    width: min(1480px, calc(100% - 48px));
    margin: 0 auto;
    padding: 28px 0 48px;
}

.ml-narrow {
    max-width: 920px;
}

.ml-hero,
.ml-form-card,
.ml-detail-card,
.ml-profile-card,
.ml-panel-card,
.ml-widget-card,
.ml-event-card {
    background: var(--ml-surface);
    border: 1px solid var(--ml-border);
    box-shadow: var(--ml-shadow);
}

.ml-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 32px;
    padding: 30px 34px;
    border-radius: 7px;
}

.ml-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ml-blue);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.ml-hero h1,
.ml-heading h1,
.ml-heading h2 {
    margin: 8px 0 10px;
    color: var(--ml-ink);
    font-weight: 500;
    line-height: 1.15;
}

.ml-hero h1 {
    font-size: 42px;
}

.ml-hero p,
.ml-heading p,
.ml-muted {
    color: var(--ml-muted);
    font-size: 18px;
    line-height: 1.55;
}

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

.ml-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.ml-section-title h2 {
    margin: 0;
    color: var(--ml-ink);
    font-size: 28px;
    font-weight: 500;
}

.ml-info-dot {
    display: inline-grid;
    place-items: center;
    width: 23px;
    height: 23px;
    border: 2px solid var(--ml-blue);
    border-radius: 50%;
    color: var(--ml-blue);
    font-weight: 800;
    font-style: italic;
}

.ml-random-section {
    margin-bottom: 34px;
}

.ml-random-row {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 2px 2px 14px;
    scroll-snap-type: x proximity;
}

.ml-random-row .ml-server-card {
    flex: 0 0 430px;
    scroll-snap-align: start;
}

.ml-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 32px;
    align-items: start;
}

.ml-heading {
    margin-bottom: 24px;
}

.ml-heading h2,
.ml-heading h1 {
    font-size: 38px;
}

.ml-server-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    align-items: start;
}

.ml-server-card {
    position: relative;
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-width: 0;
    min-height: 315px;
    overflow: hidden;
    border: 1px solid var(--ml-border);
    border-radius: 7px;
    background: var(--ml-surface);
    box-shadow: var(--ml-shadow);
}

.ml-server-card-compact {
    min-height: 255px;
}

.ml-card-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
}

.ml-card-banner {
    min-height: 82px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--ml-blue), var(--ml-blue-2));
    background-position: center;
    background-size: cover;
    color: #fff;
    font-size: 30px;
    font-weight: 900;
    text-align: center;
    text-shadow: 0 2px 6px rgba(0, 0, 0, .42);
}

.ml-server-card-compact .ml-card-banner {
    min-height: 64px;
    font-size: 22px;
}

.ml-card-content {
    padding: 24px 28px 22px;
}

.ml-server-card-compact .ml-card-content {
    padding: 18px 20px 16px;
}

.ml-card-content h3 {
    margin: 0 0 12px;
    color: var(--ml-ink);
    font-size: 28px;
    font-weight: 500;
    line-height: 1.2;
}

.ml-server-card-compact .ml-card-content h3 {
    font-size: 21px;
}

.ml-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 16px;
}

.ml-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 10px;
    border-radius: 6px;
    background: #0d1b34;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
}

.ml-tags .ml-rank {
    background: var(--ml-blue);
}

.ml-tags .ml-online {
    background: var(--ml-green);
}

.ml-card-content p {
    margin: 0;
    color: #252b36;
    font-family: Consolas, 'Courier New', monospace;
    font-size: 18px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ml-server-card-compact .ml-card-content p {
    font-size: 14px;
}

.ml-ip-row {
    position: relative;
    z-index: 4;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    border-top: 1px solid var(--ml-border);
    background: #fff;
}

.ml-ip-row strong,
.ml-ip-row code,
.ml-ip-row span {
    min-height: 50px;
    display: flex;
    align-items: center;
}

.ml-ip-row strong {
    padding: 0 14px;
    color: var(--ml-ink);
    font-size: 17px;
}

.ml-ip-row code {
    padding: 0 20px;
    border-left: 1px solid var(--ml-border);
    color: #1f2937;
    background: #fff;
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ml-ip-row span {
    justify-content: center;
    padding: 0 24px;
    background: var(--ml-blue);
    color: #fff;
    font-size: 17px;
    font-weight: 900;
    white-space: nowrap;
}

.ml-add-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 64px;
    margin-bottom: 18px;
    border: 2px solid #6d3fd0;
    background: #9058ed;
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    box-shadow: var(--ml-shadow);
}

.ml-add-card:hover {
    color: #fff;
    background: #814be0;
}

.ml-widget-card {
    margin-bottom: 18px;
    overflow: hidden;
    border-radius: 6px;
}

.ml-widget-card h3 {
    margin: 0;
    padding: 16px 18px;
    background: var(--ml-blue);
    color: #fff;
    font-size: 18px;
}

.ml-widget-list {
    padding: 0;
}

.ml-widget-item,
.ml-widget-empty {
    display: block;
    padding: 15px 18px;
    border-top: 1px solid var(--ml-border);
    color: var(--ml-ink);
}

.ml-widget-item strong,
.ml-widget-item span {
    display: block;
}

.ml-widget-item span,
.ml-widget-empty {
    color: var(--ml-muted);
}

.ml-detail-grid {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 26px;
    align-items: start;
}

.ml-profile-card,
.ml-detail-card,
.ml-panel-card,
.ml-form-card,
.ml-event-card {
    border-radius: 7px;
    overflow: hidden;
}

.ml-profile-head {
    padding: 22px;
    background: var(--ml-blue);
    color: #fff;
}

.ml-profile-head h2 {
    margin: 8px 0 0;
    color: #fff;
    font-size: 22px;
}

.ml-status {
    padding: 13px 18px;
    background: var(--ml-green);
    color: #fff;
    text-align: center;
    font-weight: 900;
}

.ml-facts {
    padding: 20px 22px;
    margin: 0;
}

.ml-facts dt {
    color: var(--ml-muted);
    font-weight: 800;
}

.ml-facts dd {
    margin: 4px 0 16px;
    color: var(--ml-ink);
}

.ml-profile-card .button {
    margin: 0 22px 22px !important;
}

.ml-detail-banner {
    min-height: 170px;
}

.ml-detail-body,
.ml-form-card {
    padding: 30px;
}

.ml-detail-body h1,
.ml-form-head h1 {
    margin: 0 0 14px;
    color: var(--ml-ink);
    font-size: 36px;
    font-weight: 500;
}

.ml-detail-body p {
    color: #242b36;
    font-size: 17px;
    line-height: 1.65;
}

.ml-panel-card h3 {
    margin: 0;
    padding: 16px 22px;
    background: var(--ml-blue);
    color: #fff;
    font-size: 20px;
}

.ml-comment-list {
    background: var(--ml-surface);
}

.ml-comment {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 16px;
    padding: 20px 24px;
    border-top: 1px solid var(--ml-border);
}

.ml-comment img {
    width: 48px;
    height: 48px;
    border-radius: 4px;
}

.ml-comment header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 7px;
    color: var(--ml-ink);
    font-size: 18px;
}

.ml-comment p {
    margin: 0;
    color: #1f2937;
    font-size: 16px;
}

.ml-stars {
    color: #a17300;
    font-weight: 900;
}

.ml-empty {
    padding: 20px 24px;
    color: var(--ml-muted);
}

.ml-form-head {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 26px;
}

.ml-form-head > i {
    color: var(--ml-blue);
    font-size: 32px;
}

.ml-form-head p {
    margin: 0;
    color: var(--ml-muted);
    font-size: 17px;
}

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

.ml-event-card {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 18px;
    padding: 24px;
}

.ml-event-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 7px;
    background: var(--ml-blue);
    color: #fff;
    font-size: 24px;
}

.ml-event-card h2 {
    margin: 0 0 4px;
    color: var(--ml-ink);
}

.ml-prize {
    display: inline-flex;
    gap: 7px;
    align-items: center;
    padding: 7px 11px;
    border-radius: 6px;
    background: rgba(15, 168, 122, .12);
    color: #087453;
    font-weight: 900;
}

body.dark .ml-hero,
body.dark .ml-form-card,
body.dark .ml-detail-card,
body.dark .ml-profile-card,
body.dark .ml-panel-card,
body.dark .ml-widget-card,
body.dark .ml-event-card,
body.dark .ml-server-card,
body[data-theme='dark'] .ml-hero,
body[data-theme='dark'] .ml-form-card,
body[data-theme='dark'] .ml-detail-card,
body[data-theme='dark'] .ml-profile-card,
body[data-theme='dark'] .ml-panel-card,
body[data-theme='dark'] .ml-widget-card,
body[data-theme='dark'] .ml-event-card,
body[data-theme='dark'] .ml-server-card,
body.dark-mode .ml-hero,
body.dark-mode .ml-form-card,
body.dark-mode .ml-detail-card,
body.dark-mode .ml-profile-card,
body.dark-mode .ml-panel-card,
body.dark-mode .ml-widget-card,
body.dark-mode .ml-event-card,
body.dark-mode .ml-server-card {
    --ml-surface: #111a2a;
    --ml-border: #2b3950;
    --ml-ink: #f4f7fb;
    --ml-muted: #b9c4d4;
    background: #111a2a;
    border-color: #2b3950;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
}

body.dark .ml-card-content p,
body.dark .ml-detail-body p,
body.dark .ml-comment p,
body.dark .ml-ip-row strong,
body.dark .ml-ip-row code,
body.dark .ml-widget-item,
body.dark .ml-facts dd,
body[data-theme='dark'] .ml-card-content p,
body[data-theme='dark'] .ml-detail-body p,
body[data-theme='dark'] .ml-comment p,
body[data-theme='dark'] .ml-ip-row strong,
body[data-theme='dark'] .ml-ip-row code,
body[data-theme='dark'] .ml-widget-item,
body[data-theme='dark'] .ml-facts dd,
body.dark-mode .ml-card-content p,
body.dark-mode .ml-detail-body p,
body.dark-mode .ml-comment p,
body.dark-mode .ml-ip-row strong,
body.dark-mode .ml-ip-row code,
body.dark-mode .ml-widget-item,
body.dark-mode .ml-facts dd {
    color: #eef3fb;
}

body.dark .ml-ip-row,
body.dark .ml-ip-row code,
body.dark .ml-comment-list,
body[data-theme='dark'] .ml-ip-row,
body[data-theme='dark'] .ml-ip-row code,
body[data-theme='dark'] .ml-comment-list,
body.dark-mode .ml-ip-row,
body.dark-mode .ml-ip-row code,
body.dark-mode .ml-comment-list {
    background: #0d1524;
}

@media (max-width: 1050px) {
    .ml-main-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 991px) {
    .ml-wrap {
        width: min(100% - 28px, 980px);
    }

    .ml-hero,
    .ml-detail-grid {
        grid-template-columns: 1fr;
    }

    .ml-hero {
        display: block;
    }

    .ml-hero-actions {
        justify-content: flex-start;
        margin-top: 18px;
    }

    .ml-server-grid,
    .ml-event-grid,
    .ml-sidebar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .ml-wrap {
        width: calc(100% - 20px);
        padding-top: 18px;
    }

    .ml-random-row .ml-server-card {
        flex-basis: 86vw;
    }

    .ml-server-grid {
        gap: 18px;
    }

    .ml-card-content {
        padding: 18px;
    }

    .ml-card-content h3 {
        font-size: 23px;
    }

    .ml-ip-row {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .ml-ip-row span {
        grid-column: 1 / -1;
        min-height: 44px;
    }
}


.ml-owned-card {
    overflow: visible;
}

.ml-state {
    display: inline-flex;
    align-items: center;
    margin: 0 0 12px;
    padding: 6px 10px;
    border-radius: 6px;
    font-weight: 900;
}

.ml-state-pending {
    background: #fff7d6;
    color: #8a6200;
}

.ml-state-rejected {
    background: #ffe5e5;
    color: #a40000;
}

.ml-state-approved {
    background: #dff8ec;
    color: #076b49;
}

.ml-status-pending {
    border: 3px solid #dca900;
}

.ml-status-rejected {
    border: 3px solid #d93030;
}

.ml-status-approved {
    border: 3px solid #0fa87a;
}

body.dark .ml-state-pending,
body[data-theme='dark'] .ml-state-pending,
body.dark-mode .ml-state-pending {
    background: rgba(220, 169, 0, .2);
    color: #ffd86b;
}

body.dark .ml-state-rejected,
body[data-theme='dark'] .ml-state-rejected,
body.dark-mode .ml-state-rejected {
    background: rgba(217, 48, 48, .2);
    color: #ff8b8b;
}

body.dark .ml-state-approved,
body[data-theme='dark'] .ml-state-approved,
body.dark-mode .ml-state-approved {
    background: rgba(15, 168, 122, .18);
    color: #5ff0bd;
}
