:root {
    --mu97-bg: #080604;
    --mu97-panel: rgba(18, 14, 10, 0.9);
    --mu97-panel-soft: rgba(32, 24, 16, 0.84);
    --mu97-line: rgba(222, 175, 91, 0.24);
    --mu97-gold: #d9a441;
    --mu97-gold-bright: #ffd37a;
    --mu97-red: #8d1d18;
    --mu97-text: #f4ecdc;
    --mu97-muted: #b8a991;
    --mu97-shadow: rgba(0, 0, 0, 0.58);
}

body.theme-97d {
    color: var(--mu97-text);
    font-family: Inter, Arial, sans-serif;
    background:
        radial-gradient(circle at 50% 0%, rgba(173, 48, 31, 0.34), transparent 38rem),
        linear-gradient(rgba(8, 6, 4, 0.74), rgba(8, 6, 4, 0.97)),
        url("../images/bg.png") center top / cover fixed,
        var(--mu97-bg);
}

.theme-97d a {
    text-decoration: none;
}

.mu97-navbar {
    min-height: 78px;
    border-bottom: 1px solid var(--mu97-line);
    background: rgba(8, 6, 4, 0.9);
    backdrop-filter: blur(10px);
}

.mu97-navbar .container {
    gap: 14px;
}

.mu97-brand-mini {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--mu97-text);
}

.mu97-brand-mini span {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: #1c1007;
    font-family: Cinzel, serif;
    font-weight: 800;
    background: linear-gradient(135deg, var(--mu97-gold-bright), var(--mu97-gold));
    border: 1px solid rgba(255, 246, 201, 0.5);
    box-shadow: 0 12px 30px var(--mu97-shadow);
}

.mu97-brand-mini strong,
.mu97-hero-copy h1,
.mu97-section-title h2,
.mu97-download-call h2,
.top-class-name,
.castle-siege-header,
.sidebar-title,
.page h1 {
    font-family: Cinzel, Georgia, serif;
}

.mu97-navbar .nav-link {
    color: var(--mu97-muted);
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
}

.mu97-navbar .nav-link:hover,
.mu97-navbar .nav-link:focus {
    color: var(--mu97-gold-bright);
}

.mu97-navbar .dropdown-menu,
.theme-97d .dropdown-menu {
    color: var(--mu97-text);
    border: 1px solid var(--mu97-line);
    background: rgba(12, 9, 7, 0.98);
    box-shadow: 0 20px 50px var(--mu97-shadow);
}

.theme-97d .dropdown-item {
    color: var(--mu97-muted);
}

.theme-97d .dropdown-item:hover {
    color: var(--mu97-gold-bright);
    background: rgba(217, 164, 65, 0.1);
}

.theme-97d .btn,
.theme-97d .form-control,
.theme-97d .form-select,
.theme-97d input,
.theme-97d select,
.theme-97d textarea {
    border-radius: 0;
}

.theme-97d .btn-primary {
    color: #1c1007;
    background: linear-gradient(180deg, var(--mu97-gold-bright), var(--mu97-gold));
    border-color: rgba(255, 245, 195, 0.58);
    font-weight: 800;
    text-transform: uppercase;
}

.theme-97d .btn-primary:hover {
    color: #1c1007;
    filter: brightness(1.08);
}

.theme-97d .btn-header,
.theme-97d .btn-outline-light {
    color: var(--mu97-gold-bright);
    border: 1px solid var(--mu97-line);
    background: rgba(0, 0, 0, 0.34);
}

.mu97-hero-shell {
    min-height: 620px;
    padding: 132px 0 70px;
    background:
        linear-gradient(180deg, rgba(8, 6, 4, 0.2), rgba(8, 6, 4, 0.82)),
        url("../images/banner-home.jpg") center top / cover no-repeat;
    border-bottom: 1px solid var(--mu97-line);
}

.mu97-hero-shell .container {
    position: relative;
}

.mu97-countdowns {
    min-height: 36px;
    margin-bottom: 22px;
}

.mu97-logo {
    display: inline-block;
    max-width: min(420px, 80vw);
    margin-bottom: 24px;
    filter: drop-shadow(0 22px 34px #000);
}

.mu97-hero-copy {
    max-width: 720px;
}

.mu97-hero-copy span,
.mu97-section-title span,
.mu97-download-call span {
    display: block;
    margin-bottom: 10px;
    color: var(--mu97-gold-bright);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.mu97-hero-copy h1 {
    margin: 0;
    font-size: clamp(2.8rem, 7vw, 6.4rem);
    font-weight: 800;
    line-height: 0.92;
    text-shadow: 0 14px 36px #000;
}

.mu97-hero-copy p {
    max-width: 620px;
    margin: 22px 0 0;
    color: #e2d4be;
    font-size: 1.08rem;
    line-height: 1.7;
}

.mu97-hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.mu97-main {
    padding: 34px 0;
}

.mu97-home-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 24px;
    align-items: start;
}

.mu97-home-main,
.mu97-home-side,
.sidebar .row {
    min-width: 0;
}

.mu97-panel,
.theme-97d .page,
.theme-97d .sidebar > .row > [class*="col-"],
.theme-97d .dropdown-auth,
.theme-97d .dropdown-services,
.theme-97d .list-group-item {
    color: var(--mu97-text);
    border: 1px solid var(--mu97-line);
    background: linear-gradient(180deg, var(--mu97-panel), rgba(10, 8, 6, 0.94));
    box-shadow: 0 20px 60px var(--mu97-shadow);
}

.mu97-panel,
.theme-97d .page {
    padding: 24px;
}

.theme-97d .sidebar > .row {
    gap: 16px 0;
}

.theme-97d .sidebar > .row > [class*="col-"] {
    padding: 18px;
}

.mu97-section-title {
    position: relative;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.mu97-section-title h2 {
    margin: 0;
    font-size: 1.55rem;
}

.theme-97d .btn-more {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: #1c1007;
    background: var(--mu97-gold);
    border: 1px solid rgba(255, 245, 195, 0.48);
}

.theme-97d .progress {
    height: 8px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(222, 175, 91, 0.12);
}

.theme-97d .progress-bar {
    background: linear-gradient(90deg, #307a38, #81de79) !important;
}

.sidebar-title {
    margin: 0 0 14px;
    color: var(--mu97-gold-bright);
    font-size: 1.08rem;
    font-weight: 800;
    text-transform: uppercase;
}

.sidebar-list {
    padding: 0;
    margin: 0;
    list-style: none;
}

.sidebar-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    color: var(--mu97-muted);
    border-top: 1px solid rgba(222, 175, 91, 0.12);
}

.sidebar-list .text,
.theme-97d strong,
.theme-97d .text-warning {
    color: var(--mu97-gold-bright) !important;
}

.mu97-download-call {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    margin-top: 24px;
    padding: 30px;
    border: 1px solid rgba(255, 211, 122, 0.32);
    background:
        linear-gradient(90deg, rgba(141, 29, 24, 0.78), rgba(32, 24, 16, 0.76)),
        var(--mu97-panel-soft);
    box-shadow: 0 20px 60px var(--mu97-shadow);
}

.mu97-download-call h2,
.mu97-download-call p {
    margin: 0;
}

.mu97-download-call p,
.theme-97d p,
.theme-97d .text-muted {
    color: var(--mu97-muted) !important;
}

.theme-97d .top-class,
.theme-97d .castle-siege,
.theme-97d .mu97-top-guild {
    min-height: 100%;
    border: 1px solid var(--mu97-line);
    background: linear-gradient(180deg, rgba(18, 14, 10, 0.92), rgba(10, 8, 6, 0.95));
    box-shadow: 0 20px 60px var(--mu97-shadow);
}

.theme-97d .top-class-header,
.theme-97d .castle-siege-header,
.theme-97d .mu97-top-guild-header {
    color: var(--mu97-gold-bright);
    border-bottom: 1px solid var(--mu97-line);
    background: rgba(0, 0, 0, 0.28);
}

.theme-97d .top-class-content .info .name,
.theme-97d .castle-siege .name {
    color: var(--mu97-gold-bright);
}

.theme-97d .mu97-top-guild-header {
    padding: 24px 16px;
    font-family: Cinzel, Georgia, serif;
    font-size: 1.35rem;
    font-weight: 800;
    text-align: center;
}

.theme-97d .mu97-top-guild-list {
    display: grid;
    gap: 12px;
    padding: 18px;
    margin: 0;
    list-style: none;
}

.theme-97d .mu97-top-guild-list li {
    display: grid;
    grid-template-columns: 30px 38px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 58px;
    padding: 10px;
    border: 1px solid rgba(222, 175, 91, 0.14);
    background: rgba(0, 0, 0, 0.28);
}

.theme-97d .mu97-guild-rank {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    color: #1c1007;
    font-weight: 900;
    background: var(--mu97-gold);
}

.theme-97d .mu97-guild-mark {
    display: grid;
    place-items: center;
}

.theme-97d .mu97-guild-info {
    min-width: 0;
}

.theme-97d .mu97-guild-info strong,
.theme-97d .mu97-guild-info a {
    display: block;
    overflow: hidden;
    color: var(--mu97-text);
    font-size: 0.95rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.theme-97d .mu97-guild-info small {
    display: block;
    margin-top: 3px;
    color: var(--mu97-gold-bright);
    font-weight: 800;
}

.theme-97d .mu97-top-guild-empty {
    padding: 24px;
    color: var(--mu97-muted);
    text-align: center;
}

.theme-97d .mu97-top-guild-siege {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.theme-97d .mu97-top-guild-siege .mu97-top-guild-header {
    padding: 31px 16px 22px;
    font-size: 1.35rem;
}

.theme-97d .mu97-top-guild-owner {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    width: min(226px, calc(100% - 32px));
    margin: 28px auto 0;
    padding: 16px;
    background: rgba(0, 0, 0, 0.34);
}

.theme-97d .mu97-top-guild-logo {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    background: rgba(0, 0, 0, 0.28);
}

.theme-97d .mu97-top-guild-owner-guild .text,
.theme-97d .mu97-top-guild-score .text {
    color: var(--mu97-text);
    font-size: 1rem;
    font-weight: 700;
}

.theme-97d .mu97-top-guild-owner-guild .name,
.theme-97d .mu97-top-guild-owner-guild .name a,
.theme-97d .mu97-top-guild-score .name {
    overflow: hidden;
    color: var(--mu97-gold-bright);
    font-size: 1.45rem;
    font-weight: 900;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.theme-97d .mu97-top-guild-score {
    width: min(226px, calc(100% - 32px));
    margin: 28px auto 0;
    padding: 18px;
    text-align: center;
    background: rgba(0, 0, 0, 0.34);
}

.theme-97d .form-control,
.theme-97d input,
.theme-97d select,
.theme-97d textarea {
    color: var(--mu97-text);
    border: 1px solid rgba(222, 175, 91, 0.28);
    background: rgba(0, 0, 0, 0.42);
}

.theme-97d .form-control:focus,
.theme-97d input:focus,
.theme-97d select:focus,
.theme-97d textarea:focus {
    color: var(--mu97-text);
    border-color: var(--mu97-gold);
    background: rgba(0, 0, 0, 0.58);
    box-shadow: 0 0 0 0.2rem rgba(217, 164, 65, 0.16);
}

.theme-97d .table {
    --bs-table-color: var(--mu97-text);
    --bs-table-bg: transparent;
    --bs-table-border-color: rgba(222, 175, 91, 0.16);
    --bs-table-striped-color: var(--mu97-text);
    --bs-table-striped-bg: rgba(255, 255, 255, 0.03);
    --bs-table-hover-color: var(--mu97-gold-bright);
    --bs-table-hover-bg: rgba(217, 164, 65, 0.08);
}

.theme-97d .table > :not(caption) > * > * {
    color: var(--mu97-text);
    background-color: rgba(12, 9, 7, 0.72) !important;
    border-color: rgba(222, 175, 91, 0.16);
    box-shadow: none;
}

.theme-97d .table-striped > tbody > tr:nth-of-type(odd) > *,
.theme-97d .table-striped > tbody > tr:nth-of-type(even) > * {
    color: var(--mu97-text);
    background-color: rgba(24, 18, 12, 0.78) !important;
}

.theme-97d .table-bordered,
.theme-97d .table-responsive {
    border-color: rgba(222, 175, 91, 0.18);
}

.theme-97d .card {
    color: var(--mu97-text);
    border: 1px solid var(--mu97-line);
    background: linear-gradient(180deg, rgba(18, 14, 10, 0.94), rgba(8, 6, 4, 0.94));
}

.theme-97d .card-header,
.theme-97d .card-footer,
.theme-97d .character-avatar {
    color: var(--mu97-text);
    border-color: rgba(222, 175, 91, 0.18);
    background: rgba(0, 0, 0, 0.28);
}

.theme-97d .character-avatar {
    display: grid;
    place-items: center;
    min-height: 146px;
}

.theme-97d .page .table,
.theme-97d .page table {
    color: var(--mu97-text) !important;
    border-color: rgba(222, 175, 91, 0.18) !important;
    background: rgba(10, 8, 6, 0.72) !important;
}

.theme-97d .page .table tr,
.theme-97d .page .table td,
.theme-97d .page .table th,
.theme-97d .page table tr,
.theme-97d .page table td,
.theme-97d .page table th {
    color: var(--mu97-text) !important;
    border-color: rgba(222, 175, 91, 0.18) !important;
    background: rgba(14, 10, 7, 0.86) !important;
    --bs-table-bg: rgba(14, 10, 7, 0.86) !important;
    --bs-table-striped-bg: rgba(28, 21, 14, 0.9) !important;
    --bs-table-accent-bg: transparent !important;
    box-shadow: none !important;
}

.theme-97d .page .table-striped > tbody > tr:nth-of-type(odd) > *,
.theme-97d .page .table-striped > tbody > tr:nth-of-type(even) > * {
    color: var(--mu97-text) !important;
    background: rgba(24, 18, 12, 0.92) !important;
}

.theme-97d .page .text-success {
    color: #64d879 !important;
}

.theme-97d .page .text-danger {
    color: #ff6060 !important;
}

.theme-97d .mu97-reset-table th,
.theme-97d .mu97-reset-table td {
    text-align: center;
}

.theme-97d .page .mu97-points-free {
    color: #ffad0a !important;
    font-weight: 900;
}

.theme-97d .page .mu97-points-vip {
    color: #1ee3a1 !important;
    font-weight: 900;
}

.theme-97d .pagination {
    --bs-pagination-color: var(--mu97-gold-bright);
    --bs-pagination-bg: rgba(0, 0, 0, 0.32);
    --bs-pagination-border-color: var(--mu97-line);
    --bs-pagination-hover-color: #1c1007;
    --bs-pagination-hover-bg: var(--mu97-gold);
    --bs-pagination-hover-border-color: var(--mu97-gold);
    --bs-pagination-active-color: #1c1007;
    --bs-pagination-active-bg: var(--mu97-gold);
    --bs-pagination-active-border-color: var(--mu97-gold);
}

.mu97-footer {
    margin-top: 30px;
    padding: 34px 0;
    color: var(--mu97-muted);
    border-top: 1px solid var(--mu97-line);
    background: rgba(0, 0, 0, 0.36);
}

@media (max-width: 991.98px) {
    .mu97-navbar .navbar-collapse {
        margin-top: 12px;
        padding: 12px;
        border: 1px solid var(--mu97-line);
        background: rgba(8, 6, 4, 0.98);
    }

    .mu97-header-actions {
        margin-left: auto;
    }

    .mu97-home-grid {
        grid-template-columns: 1fr;
    }

    .mu97-hero-shell {
        min-height: auto;
        padding: 116px 0 54px;
    }
}

@media (max-width: 575.98px) {
    .mu97-brand-mini strong {
        display: none;
    }

    .mu97-hero-copy h1 {
        font-size: 2.6rem;
    }

    .mu97-download-call,
    .mu97-hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .mu97-download-call .btn,
    .mu97-hero-buttons .btn {
        width: 100%;
    }
}
