:root {
    --bg: #111216;
    --panel: #181920;
    --panel-2: #20222a;
    --panel-3: #272a33;
    --panel-4: #2f323c;
    --border: #2b2d35;
    --soft-border: #3a3d46;
    --text: #f2f4f5;
    --muted: #aeb3bd;
    --muted-2: #7e838f;
    --link: #ffffff;
    --blue: #335fff;
    --blue-2: #2944d3;
    --chip: #262932;
    --success: #2cb66f;
    --danger: #d1565b;
    --sidebar-width: 276px;
    --topbar-height: 48px;
    --content-width: 1600px;
    --tile-width: 158px;
    --shadow: 0 12px 38px rgba(0, 0, 0, 0.32);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: "Builder Sans", "Segoe UI", Arial, sans-serif;
    text-rendering: optimizeLegibility;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.rbx-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: var(--topbar-height);
    background: #18191e;
    border-bottom: 1px solid #2a2c31;
}

.rbx-topbar-inner {
    display: grid;
    grid-template-columns: 150px 1fr auto;
    align-items: center;
    gap: 18px;
    height: 100%;
    max-width: 100%;
    padding: 0 14px 0 18px;
    position: relative;
}

.rbx-logo {
    position: relative;
    font-weight: 900;
    letter-spacing: 0.03em;
    font-size: 19px;
    line-height: 1;
}

.rbx-topnav {
    display: flex;
    gap: 12px;
    align-self: stretch;
    justify-content: flex-start;
    width: auto;
    max-width: none;
}

.rbx-topnav a,
.rbx-iconlink {
    color: #f5f5f5;
    font-weight: 600;
    font-size: 15px;
}

.rbx-topnav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 0 24px;
    min-width: 176px;
    height: 100%;
    justify-content: center;
    opacity: 0.96;
}

.rbx-topnav a::after {
    content: "";
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: -1px;
    height: 3px;
    background: white;
    opacity: 0;
}

.rbx-topnav a:hover::after {
    opacity: 1;
}

.rbx-search input {
    width: 100%;
    height: 30px;
    border: 1px solid #343741;
    border-radius: 8px;
    background: #23252b;
    color: white;
    padding: 0 14px;
    outline: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.rbx-search {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: min(520px, calc(100vw - 640px));
    display: flex;
    justify-content: center;
}

.rbx-search input::placeholder {
    color: #a4a9b2;
}

.rbx-userbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
}

.rbx-userpill {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: transparent;
    font-size: 14px;
}

.rbx-shell {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    min-height: calc(100vh - var(--topbar-height));
}

.rbx-sidebar {
    background: #111216;
    border-right: 1px solid #262933;
    padding: 14px 0 22px;
}

.rbx-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 28px 18px;
}

.rbx-profile-avatar,
.private-server-avatar,
.fallback-avatar {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: #313543;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    overflow: hidden;
}

.rbx-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.private-server-avatar img,
.game-tile-thumb img,
.experience-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rbx-profile-name,
.rbx-profile-sub {
    margin: 0;
}

.rbx-profile-name {
    font-weight: 700;
    font-size: 14px;
}

.rbx-profile-sub {
    color: #c7ccd6;
    font-size: 12px;
}

.rbx-sidenav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 16px;
}

.rbx-sidenav a {
    padding: 12px 18px;
    color: #f1f1f1;
    font-weight: 600;
    border-radius: 10px;
    font-size: 15px;
    line-height: 1.15;
}

.rbx-sidenav a.is-active,
.rbx-sidenav a:hover {
    background: #262932;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.rbx-main {
    width: min(calc(100vw - var(--sidebar-width)), var(--content-width));
    padding: 28px 24px 56px;
    min-width: 0;
}

.page-head h1,
.page-head p,
.rbx-section-head h2,
.rbx-section-head p {
    margin: 0;
}

.page-head {
    margin-bottom: 26px;
}

.page-head h1 {
    font-size: 23px;
    line-height: 1.2;
    margin-bottom: 8px;
}

.page-head p,
.rbx-section-head span,
.private-server-detail,
.private-server-name,
.game-tile-creator,
.experience-byline,
.experience-maturity,
.about-description,
.rbx-section-head p {
    color: var(--muted);
}

.page-head-discover p,
.page-head-library p {
    max-width: 760px;
    font-size: 15px;
}

.charts-toolbar {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.charts-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 999px;
    background: #262932;
    color: #f1f3f4;
    font-weight: 700;
    font-size: 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.charts-chip::after {
    content: "";
    width: 7px;
    height: 7px;
    border-right: 2px solid #cbd0d9;
    border-bottom: 2px solid #cbd0d9;
    transform: rotate(45deg) translateY(-1px);
}

.flash {
    margin-bottom: 18px;
    border-radius: 10px;
    padding: 12px 14px;
    background: var(--panel-2);
    border: 1px solid var(--border);
}

.flash.error {
    border-color: rgba(209, 86, 91, 0.5);
}

.flash.success {
    border-color: rgba(44, 182, 111, 0.45);
}

.rbx-section,
.about-panel {
    background: transparent;
    margin-bottom: 34px;
}

.rbx-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.rbx-section-head h2 {
    font-size: 17px;
    font-weight: 800;
}

.empty-block {
    background: linear-gradient(180deg, rgba(36, 38, 47, 0.78), rgba(22, 23, 29, 0.92));
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: var(--shadow);
    color: var(--muted);
    border-radius: 12px;
    padding: 24px;
}

.discover-empty {
    max-width: 820px;
}

.discover-loading {
    margin-top: 18px;
    color: var(--muted);
    text-align: center;
}

.profile-shell {
    max-width: 1200px;
}

.profile-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.profile-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px 24px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(30, 32, 39, 0.98), rgba(21, 22, 28, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: var(--shadow);
    flex: 1;
}

.profile-card-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    overflow: hidden;
    background: #313543;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 800;
}

.profile-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-card-copy h1,
.profile-card-copy p,
.profile-card-copy span {
    margin: 0;
}

.profile-card-copy h1 {
    font-size: 32px;
    line-height: 1.15;
}

.profile-card-copy p {
    margin-top: 6px;
    color: var(--muted);
    font-size: 15px;
}

.profile-card-copy span {
    display: inline-block;
    margin-top: 12px;
    color: var(--muted-2);
    font-size: 13px;
}

.profile-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.profile-stat-card,
.profile-panel {
    padding: 18px 20px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(30, 32, 39, 0.98), rgba(21, 22, 28, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: var(--shadow);
}

.profile-stat-card span,
.profile-summary-list span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.profile-stat-card strong {
    display: block;
    margin-top: 10px;
    font-size: 24px;
}

.profile-panels {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
    gap: 18px;
}

.admin-login-shell {
    display: grid;
    place-items: center;
    min-height: calc(100vh - 160px);
}

.admin-login-card,
.admin-server-card {
    background: linear-gradient(180deg, rgba(30, 32, 39, 0.98), rgba(21, 22, 28, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: var(--shadow);
}

.admin-login-card {
    width: min(520px, 100%);
    border-radius: 18px;
    padding: 28px;
}

.admin-kicker {
    margin: 0 0 10px;
    color: #c6d6ff;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 700;
}

.admin-login-card h1,
.admin-login-card p {
    margin: 0;
}

.admin-login-card h1 {
    font-size: 30px;
    line-height: 1.15;
}

.admin-login-card > p:last-of-type {
    margin-top: 10px;
    color: var(--muted);
    line-height: 1.6;
}

.admin-login-form,
.admin-link-form {
    display: grid;
    gap: 14px;
}

.admin-login-form {
    margin-top: 22px;
}

.admin-login-form label,
.admin-link-form label {
    display: grid;
    gap: 8px;
}

.admin-login-form label span,
.admin-link-form label span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.admin-login-form input,
.admin-link-form input {
    width: 100%;
    min-height: 42px;
    border-radius: 10px;
    border: 1px solid var(--soft-border);
    background: #20222a;
    color: var(--text);
    padding: 0 14px;
}

.admin-shell {
    max-width: 1200px;
}

.admin-stats {
    margin-bottom: 18px;
}

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

.admin-server-card {
    border-radius: 16px;
    padding: 18px;
}

.admin-server-head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.admin-server-copy h3,
.admin-server-copy p,
.admin-server-copy span {
    margin: 0;
}

.admin-server-copy h3 {
    font-size: 20px;
}

.admin-server-copy p {
    margin-top: 4px;
    color: var(--muted);
}

.admin-server-copy span {
    display: inline-block;
    margin-top: 8px;
    color: var(--muted-2);
    font-size: 13px;
}

.admin-server-meta,
.admin-server-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.admin-server-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-server-meta span,
.admin-server-links span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.admin-server-meta strong,
.admin-server-links a {
    display: block;
    color: var(--text);
    font-size: 14px;
    word-break: break-word;
}

.admin-link-form {
    margin-top: 18px;
    grid-template-columns: minmax(0, 1fr) 220px auto;
    align-items: end;
}

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

.profile-summary-list strong {
    display: block;
    margin-top: 6px;
    font-size: 16px;
    color: var(--text);
}

.hidden {
    display: none;
}

.queue-body {
    overflow: hidden;
    min-height: 100vh;
    background: #000;
}

.queue-circles {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.queue-circle {
    position: absolute;
    border-radius: 9999px;
    opacity: 1;
}

.queue-circle-1 {
    left: 30vw;
    top: 25vh;
    width: 30vw;
    height: 30vw;
    background: radial-gradient(50% 50% at 50% 50%, rgba(12, 119, 255, 0.3) 15.62%, rgba(12, 119, 255, 0) 100%);
    animation: queueCircleOne 12s infinite alternate, queueFadeCircleIn 1332ms ease-out;
}

.queue-circle-2 {
    left: 45vw;
    top: 30vh;
    width: 20vw;
    height: 20vw;
    background: radial-gradient(50% 50% at 50% 50%, rgba(0, 56, 255, 0.3) 15.62%, rgba(12, 119, 255, 0) 100%);
    animation: queueCircleTwo 11.5s infinite alternate, queueFadeCircleIn 1332ms ease-out;
}

.queue-circle-3 {
    left: 35vw;
    top: 30vh;
    width: 20vw;
    height: 20vw;
    background: radial-gradient(50% 50% at 50% 50%, rgba(65, 56, 210, 0.5) 15.62%, rgba(65, 56, 210, 0) 100%);
    animation: queueCircleThree 15s infinite alternate, queueFadeCircleIn 1332ms ease-out;
}

.queue-shell {
    position: relative;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.queue-card {
    position: relative;
    z-index: 1;
    width: min(720px, 100%);
    padding: 36px;
    border-radius: 24px;
    background: rgba(14, 16, 22, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.09);
    backdrop-filter: blur(18px);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
    text-align: center;
}

.queue-kicker,
.queue-game,
.queue-message {
    margin: 0;
}

.queue-kicker {
    color: #c6d6ff;
    letter-spacing: 0.14em;
    font-size: 12px;
    font-weight: 700;
}

.queue-card h1 {
    margin: 14px 0 10px;
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.02;
}

.queue-game {
    color: var(--muted);
    font-size: 18px;
}

.queue-status-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 30px;
}

.queue-stat {
    padding: 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.queue-stat span,
.queue-message {
    color: var(--muted);
}

.queue-stat span {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}

.queue-stat strong {
    font-size: 20px;
}

.queue-message {
    margin-top: 22px;
    line-height: 1.6;
}

.queue-progress {
    margin-top: 24px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
    position: relative;
}

.queue-progress-bar {
    position: absolute;
    left: -35%;
    top: 0;
    width: 35%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2148ff, #56a6ff, #2148ff);
    box-shadow: 0 0 18px rgba(86, 166, 255, 0.5);
    animation: queueProgressSlide 1.8s ease-in-out infinite;
}

.queue-actions {
    margin-top: 24px;
    display: flex;
    justify-content: center;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--tile-width), 1fr));
    gap: 18px 14px;
    align-items: start;
}

.charts-section {
    max-width: 100%;
}

.game-tile-thumb {
    display: block;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    background: #292c34;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}

.game-tile-title {
    display: block;
    margin-top: 8px;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.28;
    min-height: 38px;
}

.game-tile-creator {
    margin: 3px 0 0;
    font-size: 12px;
    min-height: 16px;
}

.game-tile-meta {
    display: flex;
    gap: 14px;
    margin-top: 10px;
    font-size: 12px;
    color: #d9d9d9;
}

.game-tile-meta span {
    position: relative;
    padding-left: 16px;
}

.game-tile-meta span::before {
    content: "";
    position: absolute;
    left: 0;
    top: 2px;
    width: 11px;
    height: 11px;
    opacity: 0.8;
}

.game-tile-meta span:first-child::before {
    background: linear-gradient(180deg, #ffffff 0%, #d7dbe3 100%);
    clip-path: polygon(20% 42%, 44% 42%, 44% 0, 86% 0, 86% 42%, 100% 42%, 100% 56%, 86% 56%, 86% 100%, 44% 100%, 44% 56%, 20% 56%);
}

.game-tile-meta span:last-child::before {
    border-radius: 50%;
    background: radial-gradient(circle at 50% 34%, #dde1e7 0 32%, transparent 34%),
        linear-gradient(180deg, transparent 0 48%, #dde1e7 48% 100%);
}

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

.private-server-row {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 12px 18px;
    min-height: 86px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(28, 30, 37, 0.96), rgba(22, 23, 28, 0.96));
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: var(--shadow);
}

.private-server-copy p,
.private-server-copy a {
    margin: 0;
}

.private-server-game {
    font-size: 18px;
    font-weight: 700;
}

.private-server-name {
    margin-top: 3px;
    font-size: 14px;
}

.private-server-detail {
    margin-top: 4px;
    font-size: 13px;
}

.private-server-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.primary-pill,
.ghost-pill,
.icon-pill,
.play-button-large,
.text-button {
    border: 0;
    border-radius: 10px;
    padding: 11px 18px;
    cursor: pointer;
    color: white;
    transition: background 120ms ease, transform 120ms ease;
}

.primary-pill,
.play-button-large {
    background: var(--blue);
    min-width: 140px;
    text-align: center;
    font-weight: 700;
}

.ghost-pill,
.icon-pill,
.text-button {
    background: #2c2f37;
}

.primary-pill:hover,
.play-button-large:hover {
    background: var(--blue-2);
}

.ghost-pill:hover,
.icon-pill:hover,
.text-button:hover {
    background: #363a44;
}

.ghost-pill.large,
.play-button-large {
    min-height: 44px;
}

.text-button {
    padding: 10px 14px;
}

.experience-hero {
    display: grid;
    grid-template-columns: minmax(520px, 674px) minmax(310px, 360px);
    gap: 16px;
    align-items: start;
    margin-bottom: 18px;
    justify-content: center;
}

.experience-media {
    position: relative;
    height: 362px;
    overflow: hidden;
    background: #1e2128;
    border-radius: 0;
}

.experience-backdrop {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    filter: blur(18px) brightness(0.7);
    transform: scale(1.08);
}

.experience-cover {
    position: absolute;
    inset: 28px auto auto 50%;
    width: 302px;
    height: 302px;
    transform: translateX(-50%);
    overflow: hidden;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.experience-summary h1,
.engagement-row {
    margin: 0;
}

.experience-summary h1 {
    font-size: 30px;
    line-height: 1.24;
    font-weight: 800;
}

.experience-byline {
    margin-top: 10px;
    font-size: 16px;
}

.experience-maturity {
    margin-top: 8px;
    font-size: 16px;
}

.experience-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 28px;
    align-items: flex-start;
}

.engagement-row {
    display: flex;
    gap: 8px;
    margin-top: 18px;
    color: #dfe2eb;
    font-size: 14px;
    flex-wrap: wrap;
}

.engagement-chip {
    padding: 0;
}

.tabbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    background: #2a2d35;
    margin-bottom: 18px;
    max-width: 970px;
    margin-left: auto;
    margin-right: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.tabbar a {
    padding: 8px 18px 10px;
    text-align: center;
    font-weight: 600;
    border-bottom: 4px solid transparent;
}

.tabbar a:hover {
    background: #2d3038;
}

.tabbar a.is-active {
    border-bottom-color: white;
}

.about-panel h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.about-panel,
#user-private-servers {
    max-width: 970px;
    margin-left: auto;
    margin-right: auto;
}

.about-description {
    max-width: 980px;
    white-space: pre-wrap;
    line-height: 1.65;
    font-size: 15px;
}

.fact-grid {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 14px;
}

.fact-grid div span,
.fact-grid div strong {
    display: block;
}

.fact-grid div span {
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 8px;
}

.fact-grid div strong {
    font-size: 14px;
}

#user-private-servers .rbx-section-head {
    margin-bottom: 22px;
}

#user-private-servers .rbx-section-head h2 {
    font-size: 21px;
    margin: 0 0 4px;
}

#user-private-servers .rbx-section-head p {
    font-size: 15px;
}

.placeholder {
    background: #2d3038;
}

@media (max-width: 1280px) {
    .rbx-search {
        width: min(400px, calc(100vw - 680px));
    }

    .experience-hero {
        grid-template-columns: 1fr;
    }

    .fact-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1120px) {
    .rbx-topbar-inner {
        grid-template-columns: 128px 1fr auto;
        gap: 12px;
        padding: 0 12px 0 14px;
    }

    .rbx-topnav {
        gap: 8px;
    }

    .rbx-topnav a {
        min-width: 132px;
        padding: 0 14px;
        font-size: 14px;
    }

    .rbx-topnav a::after {
        left: 14px;
        right: 14px;
    }

    .rbx-search {
        width: min(320px, calc(100vw - 620px));
    }

    .rbx-userbar {
        gap: 8px;
    }

    .rbx-userpill,
    .rbx-iconlink {
        font-size: 13px;
    }
}

@media (max-width: 980px) {
    .rbx-topbar {
        height: auto;
    }

    .rbx-shell {
        grid-template-columns: 1fr;
    }

    .rbx-sidebar {
        display: none;
    }

    .rbx-topbar-inner {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "logo user"
            "search search"
            "nav nav";
        align-items: center;
        gap: 10px;
        padding: 12px 16px;
    }

    .rbx-logo {
        grid-area: logo;
    }

    .rbx-userbar {
        grid-area: user;
        display: flex;
        min-width: 0;
        gap: 10px;
    }

    .rbx-topnav {
        grid-area: nav;
        display: flex;
        gap: 10px;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: none;
    }

    .rbx-topnav::-webkit-scrollbar {
        display: none;
    }

    .rbx-topnav a {
        min-width: 148px;
        height: 40px;
        border-radius: 10px;
        background: #20222a;
        padding: 0 18px;
        flex: 0 0 auto;
    }

    .rbx-topnav a::after {
        left: 18px;
        right: 18px;
    }

    .rbx-search {
        grid-area: search;
        position: static;
        transform: none;
        width: 100%;
    }

    .rbx-search input {
        height: 38px;
    }

    .rbx-main {
        width: 100%;
        padding: 18px 16px 42px;
    }

    .fact-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .queue-status-grid {
        grid-template-columns: 1fr;
    }

    .profile-hero,
    .profile-panels,
    .profile-stats {
        grid-template-columns: 1fr;
        display: grid;
    }

    .admin-server-meta,
    .admin-server-links,
    .admin-link-form {
        grid-template-columns: 1fr;
    }

    .profile-actions {
        width: 100%;
    }

    .private-server-row {
        grid-template-columns: 48px minmax(0, 1fr);
        align-items: start;
    }

    .private-server-controls {
        grid-column: 1 / -1;
        width: 100%;
    }
}

@media (max-width: 720px) {
    .rbx-topbar-inner {
        grid-template-columns: 1fr;
        grid-template-areas:
            "logo"
            "search"
            "nav"
            "user";
        align-items: stretch;
    }

    .rbx-userbar {
        justify-content: space-between;
    }

    .rbx-userpill,
    .rbx-iconlink {
        font-size: 13px;
    }

    .page-head h1 {
        font-size: 28px;
    }

    .charts-toolbar {
        flex-wrap: wrap;
    }

    .charts-chip {
        width: fit-content;
    }

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

    .private-server-row {
        grid-template-columns: 48px 1fr;
    }

    .private-server-controls {
        grid-column: 1 / -1;
    }

    .experience-media {
        height: 220px;
    }

    .experience-cover {
        width: 156px;
        height: 156px;
        inset: 20px auto auto 50%;
    }

    .tabbar {
        grid-template-columns: repeat(2, 1fr);
        max-width: 100%;
    }

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

    .profile-card-copy h1,
    .admin-login-card h1,
    .experience-summary h1 {
        font-size: 24px;
    }

    .profile-stat-card strong {
        font-size: 20px;
    }

    .private-server-controls .primary-pill,
    .private-server-controls .ghost-pill,
    .private-server-controls .icon-pill,
    .profile-actions .ghost-pill,
    .profile-actions .play-button-large {
        width: 100%;
    }

    .admin-server-card {
        padding: 16px;
    }

    .admin-server-head {
        align-items: flex-start;
    }
}

@media (max-width: 540px) {
    .rbx-main {
        padding: 16px 12px 34px;
    }

    .rbx-topnav a {
        min-width: 132px;
        font-size: 14px;
    }

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

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

    .tabbar a {
        font-size: 14px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .experience-actions,
    .private-server-controls,
    .profile-actions {
        width: 100%;
    }

    .experience-actions form,
    .experience-actions a,
    .experience-actions button {
        width: 100%;
    }

    .experience-actions .play-button-large,
    .experience-actions .ghost-pill.large {
        width: 100%;
    }

    .admin-login-card,
    .profile-card,
    .profile-stat-card,
    .profile-panel,
    .admin-server-card,
    .private-server-row,
    .empty-block {
        padding-left: 14px;
        padding-right: 14px;
    }
}

@keyframes queueCircleOne {
    from {
        transform: translate(0vw, 0vh);
        width: 30vw;
        height: 30vw;
    }
    to {
        transform: translate(0vw, -35vh);
        width: 80vw;
        height: 80vw;
    }
}

@keyframes queueCircleTwo {
    from {
        transform: translate(0vw, 0vh);
        width: 20vw;
        height: 20vw;
    }
    to {
        transform: translate(-45vw, -40vh);
        width: 80vw;
        height: 80vw;
    }
}

@keyframes queueCircleThree {
    from {
        transform: translate(0vw, 0vh);
        width: 20vw;
        height: 20vw;
    }
    to {
        transform: translate(-55vw, -80vh);
        width: 120vw;
        height: 120vw;
    }
}

@keyframes queueFadeCircleIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes queueProgressSlide {
    0% {
        left: -35%;
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
    100% {
        left: 100%;
        opacity: 0.7;
    }
}
