:root {
    --rt-ink: #070a12;
    --rt-navy: #0b1020;
    --rt-panel: #101725;
    --rt-panel-2: #151f35;
    --rt-line: #25304a;
    --rt-line-soft: #1c263d;
    --rt-text: #f7f4ed;
    --rt-muted: #9aa6bc;
    --rt-gold: #c89a3c;
    --rt-gold-bright: #e9bd5f;
    --rt-purple: #8956ff;
    --rt-green: #4bd29b;
    --rt-red: #f16f78;
    --rt-shadow: 0 22px 55px rgba(0, 0, 0, .32);
}

html { background: var(--rt-ink) !important; scroll-behavior: smooth; }
body {
    min-height: 100vh;
    margin: 0 !important;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 12% 8%, rgba(137, 86, 255, .08), transparent 30rem),
        radial-gradient(circle at 88% 22%, rgba(200, 154, 60, .06), transparent 28rem),
        var(--rt-ink) !important;
    color: var(--rt-text) !important;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    opacity: .55;
    background-image: linear-gradient(rgba(255,255,255,.015) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.015) 1px, transparent 1px);
    background-size: 44px 44px;
}

a { color: #d6c5ff; text-decoration: none; }
a:hover { color: #fff; }
img { max-width: 100%; }
hr { border-color: var(--rt-line) !important; opacity: 1 !important; }

/* Remove every legacy navigation shell. The replacement is rendered once globally. */
.app-topbar,
.navigation-bar,
.sidenav-menu,
.app-menu,
.topnav,
#rt-navbar,
.side-nav { display: none !important; }

.rt-site-notice {
    min-height: 34px;
    padding: 6px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    border-bottom: 1px solid #4a351a;
    background: #17110a;
    color: #d7c5a0;
    font-size: 12px;
    letter-spacing: .02em;
    position: relative;
    z-index: 1051;
}
.rt-site-notice span,
.rt-site-notice a { display: inline-flex; align-items: center; gap: 7px; }
.rt-site-notice i { color: var(--rt-gold-bright); }
.rt-site-notice a { color: var(--rt-gold-bright); font-weight: 750; }

.rt-site-header {
    height: 76px;
    position: sticky;
    top: 0;
    z-index: 1050;
    border-bottom: 1px solid var(--rt-line-soft);
    background: rgba(7, 10, 18, .94);
    box-shadow: 0 12px 35px rgba(0,0,0,.16);
    backdrop-filter: blur(18px);
}
.rt-site-header__inner {
    width: min(1180px, calc(100% - 40px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.rt-site-brand { display: flex; flex-direction: column; align-items: flex-start; flex: 0 0 auto; }
.rt-site-brand img { display: block; width: 174px; max-height: 44px; object-fit: contain; }
.rt-site-brand small { margin: 2px 0 0 3px; color: #6f7b91; font-size: 6px; letter-spacing: .25em; }
.rt-site-nav { height: 100%; display: flex; align-items: center; gap: 3px; }
.rt-site-nav > a {
    height: 100%;
    padding: 0 11px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    position: relative;
    color: #9ca7bb;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .045em;
}
.rt-site-nav > a:hover,
.rt-site-nav > a.is-active { color: #fff; }
.rt-site-nav > a.is-active::after {
    content: "";
    position: absolute;
    left: 11px;
    right: 11px;
    bottom: 0;
    height: 2px;
    background: var(--rt-purple);
}
.rt-coming-chip {
    padding: 2px 4px;
    border: 1px solid #58471f;
    border-radius: 4px;
    color: #d9b45c;
    background: #211b0e;
    font-size: 6px;
    letter-spacing: .06em;
}
.rt-site-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.rt-login-link,
.rt-add-server-link,
.rt-account-menu > summary {
    min-height: 38px;
    padding: 0 13px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    cursor: pointer;
}
.rt-login-link { color: #c7d0df; }
.rt-login-link:hover { color: #fff; }
.rt-add-server-link { border: 1px solid var(--rt-gold-bright); background: var(--rt-gold); color: #171006; box-shadow: 0 8px 25px rgba(200,154,60,.15); }
.rt-add-server-link:hover { background: var(--rt-gold-bright); color: #171006; transform: translateY(-1px); }
.rt-site-menu { display: none; width: 40px; height: 40px; border: 1px solid var(--rt-line); border-radius: 8px; background: #111827; color: #fff; }

.rt-account-menu { position: relative; }
.rt-account-menu > summary { list-style: none; border: 1px solid var(--rt-line); background: #111827; color: #e9edf4; }
.rt-account-menu > summary::-webkit-details-marker { display: none; }
.rt-account-menu > summary img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.rt-account-menu__panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 205px;
    padding: 7px;
    border: 1px solid var(--rt-line);
    border-radius: 10px;
    background: #101725;
    box-shadow: var(--rt-shadow);
}
.rt-account-menu__panel a { display: flex; align-items: center; gap: 9px; padding: 10px; border-radius: 6px; color: #aeb9cb; font-size: 12px; }
.rt-account-menu__panel a:hover { background: #1a2438; color: #fff; }
.rt-account-menu__logout { border-top: 1px solid var(--rt-line-soft); color: #f4959b !important; }

/* One content grid across old and new pages. */
body .wrapper { min-height: calc(100vh - 110px) !important; width: 100% !important; margin: 0 !important; padding: 0 !important; background: transparent !important; }
body .page-content,
body .content-page,
body .main-content { margin: 0 !important; padding: 46px 0 70px !important; min-height: 650px; background: transparent !important; }
body .page-container,
body .container,
body .container-fluid { width: min(1180px, calc(100% - 40px)) !important; max-width: 1180px !important; margin-left: auto !important; margin-right: auto !important; padding-left: 0 !important; padding-right: 0 !important; }
body main[class*="rt-"] { min-height: 650px; }

body h1, body h2, body h3, body h4, body h5, body h6 { color: var(--rt-text); letter-spacing: -.02em; }
body h1 { font-size: clamp(32px, 5vw, 50px); }
body h2 { font-size: clamp(24px, 3vw, 34px); }
body p, body li, body td, body .text-muted { color: var(--rt-muted) !important; }
body .runeGreen, body .rtPurple { color: var(--rt-gold-bright) !important; }
body .runeWhite, body .text-white { color: var(--rt-text) !important; }

body .card,
body .premium-box,
body .modal-content,
body .dropdown-menu,
body .accordion-item,
body .list-group-item,
body .rt-card,
body [class*="Panel"],
body [class*="panel"] {
    color: var(--rt-text) !important;
    border: 1px solid var(--rt-line-soft) !important;
    border-radius: 12px !important;
    background: linear-gradient(145deg, rgba(17,26,45,.98), rgba(13,20,34,.98)) !important;
    box-shadow: 0 18px 45px rgba(0,0,0,.18);
}
body .card-header,
body .card-footer,
body .modal-header,
body .modal-footer,
body .accordion-header { border-color: var(--rt-line-soft) !important; background: rgba(8,13,24,.48) !important; }
body .card-body { color: var(--rt-text); }
body .bg-white,
body .bg-light,
body .bg-dark,
body .bg-success,
body .bg-black { background: #111a2d !important; }

body .btn,
body button[class*="rt-btn"],
body a[class*="rt-btn"] { min-height: 40px; border-radius: 8px !important; font-weight: 750; box-shadow: none !important; }
body .btn-primary,
body .btn-success,
body .btn-warning,
body .btn-rt,
body .rt-btn--purple,
body .rt-btn--gold { border: 1px solid var(--rt-gold-bright) !important; background: var(--rt-gold) !important; color: #171006 !important; }
body .btn-primary:hover,
body .btn-success:hover,
body .btn-warning:hover,
body .btn-rt:hover { background: var(--rt-gold-bright) !important; transform: translateY(-1px); }
body .btn-secondary,
body .btn-outline-primary,
body .btn-outline-light,
body .btn-dark { border-color: var(--rt-line) !important; background: #151e31 !important; color: #d9e0eb !important; }
body .btn-danger { border-color: #7f3841 !important; background: #4f232a !important; color: #ffdce0 !important; }

body .form-control,
body .form-select,
body .input-group-text,
body textarea,
body input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
body select {
    min-height: 43px;
    border: 1px solid #303b54 !important;
    border-radius: 8px !important;
    background: #0d1422 !important;
    color: #edf1f7 !important;
    box-shadow: none !important;
}
body textarea { min-height: 110px; }
body .form-control:focus,
body .form-select:focus,
body textarea:focus,
body input:focus,
body select:focus { border-color: var(--rt-gold) !important; box-shadow: 0 0 0 3px rgba(200,154,60,.12) !important; outline: 0; }
body .form-control::placeholder,
body textarea::placeholder { color: #65728a !important; }
body .form-label, body label { color: #c5cedd; font-weight: 650; }
body .form-check-input { border-color: #44516b !important; background-color: #111a2a !important; }
body .form-check-input:checked { border-color: var(--rt-gold) !important; background-color: var(--rt-gold) !important; }

body .table { --bs-table-bg: transparent; --bs-table-color: #cbd3df; --bs-table-border-color: var(--rt-line-soft); color: #cbd3df !important; }
body .table > :not(caption) > * > * { padding: 14px 12px; border-color: var(--rt-line-soft) !important; background: transparent !important; color: #cbd3df !important; }
body .table thead th { color: #7f8ca3 !important; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; background: #0c121e !important; }
body .table-hover tbody tr:hover > * { background: #151f32 !important; }

body .nav-tabs { gap: 5px; border-color: var(--rt-line) !important; }
body .nav-tabs .nav-link { border: 1px solid transparent !important; border-radius: 7px 7px 0 0 !important; color: #8794a8 !important; }
body .nav-tabs .nav-link.active { border-color: var(--rt-line) var(--rt-line) var(--rt-panel) !important; background: var(--rt-panel) !important; color: #fff !important; }
body .alert { border-radius: 9px !important; border: 1px solid var(--rt-line) !important; background: #151d2c !important; color: #d9e0eb !important; }
body .alert-success { border-color: #295647 !important; background: #10251f !important; }
body .alert-danger { border-color: #67333a !important; background: #29171b !important; }
body .badge { border-radius: 5px; letter-spacing: .03em; }
body .pagination .page-link { border-color: var(--rt-line) !important; background: #111a2a !important; color: #aab5c7 !important; }
body code, body pre { border: 1px solid var(--rt-line-soft); border-radius: 8px; background: #080d17 !important; color: #d9c5ff !important; }
body pre { padding: 16px; overflow: auto; }

body .footer,
body footer.footer {
    position: static !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 54px 0 22px !important;
    border-top: 1px solid var(--rt-line-soft) !important;
    background: #070a11 !important;
    color: #738095 !important;
}
.rt-footer__grid { width: min(1180px, calc(100% - 40px)); margin: 0 auto; display: grid; grid-template-columns: 1.7fr repeat(3, 1fr); gap: 48px; }
.rt-footer__brand img { width: 155px; }
.rt-footer__brand p { max-width: 290px; margin: 17px 0; color: #748095 !important; font-size: 11px; line-height: 1.65; }
.rt-footer__status { color: #8491a5; font-size: 10px; }
.rt-footer__status i { display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--rt-green); box-shadow: 0 0 0 4px rgba(75,210,155,.08); }
.rt-footer__column { display: flex; flex-direction: column; align-items: flex-start; gap: 11px; }
.rt-footer__column strong { margin-bottom: 5px; color: #c0c8d5; font-size: 9px; letter-spacing: .12em; }
.rt-footer__column a { color: #737f94; font-size: 11px; }
.rt-footer__column a:hover { color: #fff; }
.rt-footer__bottom { width: min(1180px, calc(100% - 40px)); margin: 44px auto 0; padding-top: 18px; border-top: 1px solid var(--rt-line-soft); display: flex; justify-content: space-between; gap: 20px; color: #505c70; font-size: 9px; }
.rt-footer__bottom nav { display: flex; gap: 16px; }
.rt-footer__bottom a { color: #596579; }

.rt-bg-layer { display: none !important; }
.pace,
.pace-progress,
.pace-activity { display: none !important; }
.page-content.animate__animated,
.content-page.animate__animated { animation: none !important; transform: none !important; }
#ios-install-banner { z-index: 2000 !important; background: #151f35 !important; border: 1px solid var(--rt-gold) !important; }

@media (max-width: 980px) {
    .rt-site-header__inner { gap: 12px; }
    .rt-site-menu { display: grid; place-items: center; order: 3; }
    .rt-site-nav {
        display: none;
        position: absolute;
        top: 76px;
        left: 20px;
        right: 20px;
        height: auto;
        padding: 10px;
        border: 1px solid var(--rt-line);
        border-radius: 10px;
        background: #0d1422;
        box-shadow: var(--rt-shadow);
    }
    .rt-site-nav.is-open { display: grid; }
    .rt-site-nav > a { height: 43px; border-radius: 6px; }
    .rt-site-nav > a:hover, .rt-site-nav > a.is-active { background: #182237; }
    .rt-site-nav > a.is-active::after { display: none; }
    .rt-site-actions { margin-left: auto; }
    .rt-login-link span { display: none; }
}

@media (max-width: 680px) {
    .rt-site-notice { gap: 7px; text-align: center; font-size: 10px; }
    .rt-site-notice span { display: none; }
    .rt-site-header { height: 66px; }
    .rt-site-header__inner { width: min(100% - 24px, 1180px); }
    .rt-site-brand img { width: 132px; }
    .rt-site-brand small { display: none; }
    .rt-site-nav { top: 66px; left: 12px; right: 12px; }
    .rt-add-server-link { width: 40px; padding: 0; font-size: 0; }
    .rt-add-server-link i { font-size: 13px; }
    .rt-account-menu > summary { width: 40px; padding: 0; }
    .rt-account-menu > summary span,
    .rt-account-menu > summary > i { display: none; }
    .rt-login-link { width: 36px; padding: 0; font-size: 0; }
    .rt-login-link i { font-size: 13px; }
    body .page-content, body .content-page, body .main-content { padding: 30px 0 52px !important; }
    body .page-container, body .container, body .container-fluid { width: min(100% - 24px, 1180px) !important; }
    body .container > .row,
    body .page-container > .row,
    body .container-fluid > .row { margin-left: 0 !important; margin-right: 0 !important; }
    body .row > [class*="col-"] { min-width: 0; }
    body .p-5 { padding: 1.35rem !important; }
    body .p-4 { padding: 1.1rem !important; }
    body .table-responsive { border: 1px solid var(--rt-line-soft); border-radius: 9px; }
    .rt-footer__grid { width: min(100% - 24px, 1180px); grid-template-columns: 1fr 1fr; gap: 32px 18px; }
    .rt-footer__brand { grid-column: 1 / -1; }
    .rt-footer__bottom { width: min(100% - 24px, 1180px); flex-direction: column; }
}

@media (max-width: 430px) {
    .rt-site-brand img { width: 112px; }
    .rt-site-actions { gap: 5px; }
    .rt-site-menu, .rt-add-server-link, .rt-account-menu > summary { width: 36px; height: 36px; min-height: 36px; }
    .rt-footer__grid { grid-template-columns: 1fr; }
    .rt-footer__brand { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
