/* EpicBot: a quiet listening room, with a little rhythm. */
html { scroll-behavior: smooth; scroll-padding-top: 85px; }
body { min-height: 100dvh; background: var(--bg-color); font-size: 14px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
body.sidebar-open { overflow: hidden; }
::selection { color: var(--accent-ink); background: var(--accent-color); }
h1, h2, h3, h4, h5, h6 { letter-spacing: -.035em; overflow-wrap: anywhere; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:disabled, .btn:disabled { opacity: .5; cursor: wait; }
:focus-visible { outline: 2px solid var(--warm-color); outline-offset: 4px; }
img { max-width: 100%; }
code { background: var(--accent-soft); color: #cdbfff; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 18px; top: -80px; z-index: 1000; padding: 12px 18px; border-radius: 8px; background: var(--warm-color); color: var(--accent-ink); font-weight: 700; }
.skip-link:focus { top: 12px; }
.sidebar { width: 254px; flex: 0 0 254px; height: 100dvh; padding: 29px 19px 22px; border-color: var(--line-color); transition: transform .3s var(--ease-out); }
.sidebar .brand { gap: 11px; margin: 0 10px 35px; color: var(--text-color); font-family: var(--font-heading); font-size: 1.6rem; letter-spacing: -.06em; }
.sidebar .brand img { width: 39px; height: 39px; border-radius: 13px; box-shadow: 0 0 0 1px var(--line-color); }
.brand-wordmark { display: flex; flex-direction: column; line-height: 1.1; }
.brand-wordmark small { margin-top: 6px; color: var(--text-muted); font-family: var(--font-mono); font-size: .54rem; font-weight: 400; letter-spacing: .18em; text-transform: uppercase; }
.brand-equalizer { display: flex; gap: 3px; height: 18px; align-items: center; margin-left: auto; color: var(--warm-color); }
.brand-equalizer i { width: 3px; border-radius: 3px; background: currentColor; height: 8px; }
.brand-equalizer i:nth-child(2) { height: 17px; }
.brand-equalizer i:nth-child(3) { height: 12px; }
.nav-links { direction: ltr; padding: 0 3px 20px; min-height: 0; scrollbar-width: thin; }
.nav-links li { margin-bottom: 4px; }
.nav-links a { min-height: 44px; padding: 10px 13px; border: 1px solid transparent; border-radius: 10px; font-size: .86rem; font-weight: 600; }
.nav-links a > i { width: 18px; text-align: center; font-size: .95rem; }
.nav-links a:hover { background: #ffffff09; color: var(--text-color); }
.nav-links a.active { background: var(--accent-soft); color: #d3c5ff; border-color: #b7a6f81f; }
.nav-links a.active::after { content: ''; width: 5px; height: 5px; border-radius: 50%; margin-left: auto; background: var(--accent-color); flex: 0 0 auto; }
.nav-links .section-title { margin: 26px 13px 10px; color: #8d849e; font-family: var(--font-mono); font-size: .62rem; letter-spacing: .12em; overflow-wrap: anywhere; }
.user-profile { gap: 11px; padding: 18px 9px 0; border-color: var(--line-color); }
.user-profile img { width: 36px; height: 36px; border-radius: 12px; }
.user-info { min-width: 0; }
.user-info .username { font-size: .82rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.logout-btn { font-size: .72rem; color: var(--text-muted); }
.logout-btn:hover { color: var(--danger); }
.lang-dropdown { position: relative; margin: 12px 3px 17px; }
.lang-dropdown-btn { display: flex; gap: 10px; align-items: center; width: 100%; background: transparent; border: 1px solid var(--line-color); padding: 10px 12px; color: var(--text-muted); border-radius: 10px; cursor: pointer; font-size: .78rem; }
.lang-dropdown-btn:hover, .lang-dropdown-btn[aria-expanded="true"] { background: #ffffff09; color: var(--text-color); }
.lang-dropdown-menu { display: none; position: absolute; bottom: calc(100% + 8px); left: 0; right: 0; padding: 5px; background: #2b2537; border: 1px solid var(--line-color); border-radius: 12px; box-shadow: 0 12px 35px #0005; z-index: 10; }
.lang-dropdown-menu.show { display: block; }
.lang-option { display: block; width: 100%; padding: 10px; background: transparent; border: 0; border-radius: 7px; color: var(--text-color); text-align: left; font-size: .82rem; cursor: pointer; }
.lang-option:hover, .lang-option.active { background: var(--accent-soft); color: #d3c5ff; }
.sidebar-close { border: 1px solid var(--line-color); border-radius: 10px; background: var(--card-bg); }
.sidebar-overlay { background: #0b0813aa; backdrop-filter: blur(4px); }
.main-content { min-width: 0; padding: 38px clamp(24px, 3.4vw, 58px); }
.content-wrapper { max-width: 1220px; padding-top: 8px; }
.page-context { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 0 2px 26px; margin-bottom: 8px; color: var(--text-muted); font-family: var(--font-mono); font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; }
.context-location { display: flex; align-items: center; gap: 9px; min-width: 0; overflow-wrap: anywhere; }
.context-location i { color: var(--warm-color); }
.context-brand { flex: 0 0 auto; color: #91869e; }
.card { padding: 27px; margin-bottom: 22px; border-color: var(--line-color); box-shadow: 0 8px 30px #08050f14; min-width: 0; }
.card > .card { box-shadow: none; }
.grid-2, .mediaplayer-responsive, .rank-card-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 > .card, .grid-3 > .card { margin-bottom: 0; }
.grid-2, .grid-3 { margin-bottom: 20px; }
a.card { transition: transform .25s var(--ease-out), border-color .25s, box-shadow .25s !important; }
a.card::before { display: none; }
a.card:hover, a.card:focus-visible { transform: translateY(-4px) !important; border-color: #b7a6f866 !important; box-shadow: 0 12px 30px #08050f40 !important; }
a.card:active { transform: translateY(-1px) !important; }
a.card:hover img { transform: rotate(-3deg) !important; box-shadow: none !important; }
.btn { min-height: 43px; padding: 11px 20px; border: 1px solid transparent; border-radius: 10px; color: var(--accent-ink); font-size: .83rem; line-height: 1.3; font-weight: 800; white-space: normal; text-align: center; transition: transform .2s, background .2s, box-shadow .2s; }
.btn:hover { background: #cbbcff; filter: none; transform: translateY(-2px); box-shadow: 0 5px 18px #b7a6f81a; }
.btn:active { transform: translateY(0); }
.btn-danger { color: #351320; }
.btn-danger:hover { background: #ffb1bf; }
.btn-secondary { background: #ffffff0a; color: var(--text-color); border-color: var(--line-color); }
.btn-secondary:hover { background: #ffffff14; }
input[type="text"], input[type="search"], input[type="number"], input[type="color"], input[type="password"], input[type="email"], select, textarea { min-width: 0; padding: 12px 14px; border-color: #dbd1f126; border-radius: 10px; color: var(--text-color); background: #17131f; font-size: .9rem; transition: border-color .2s, box-shadow .2s; }
input::placeholder, textarea::placeholder { color: #93899f; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent-color); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type="checkbox"], input[type="radio"], input[type="range"] { accent-color: var(--accent-color); }
table { border-collapse: collapse; max-width: 100%; font-size: .85rem; }
th { color: var(--text-muted); font-weight: 600; }
th, td { border-color: var(--line-color); }
tbody tr:hover { background: #b7a6f809; }
/* Keep the centered home introduction, three features, and primary action. */
.home-stage { position: relative; overflow: hidden; padding: clamp(30px, 5vw, 68px) clamp(18px, 3.4vw, 48px) 34px; text-align: center; }
.home-stage::before { content: ''; position: absolute; width: 540px; height: 540px; top: -365px; left: calc(50% - 270px); border-radius: 50%; border: 1px solid #b7a6f81a; box-shadow: 0 0 0 40px #b7a6f804, 0 0 0 80px #b7a6f804, 0 0 0 120px #b7a6f803; pointer-events: none; }
.home-eyebrow { position: relative; display: inline-flex; align-items: center; gap: 8px; margin-bottom: 25px; color: var(--warm-color); font-family: var(--font-mono); font-size: .65rem; letter-spacing: .14em; text-transform: uppercase; }
.home-title { display: flex; align-items: center; justify-content: center; gap: clamp(14px, 3vw, 32px); margin-bottom: 19px; }
.home-title h1 { font-size: clamp(3.4rem, 8vw, 6.8rem); letter-spacing: -.075em; font-weight: 700; line-height: 1; }
.sound-wave { display: flex; align-items: center; gap: 5px; height: 65px; color: var(--warm-color); }
.sound-wave i { display: block; width: 6px; height: var(--bar-height); border-radius: 10px; background: currentColor; transform-origin: center; animation: soundwave 2.6s ease-in-out infinite; animation-delay: var(--bar-delay); }
.home-description { max-width: 540px; margin: 0 auto 39px; font-size: 1rem; color: var(--text-muted); }
.home-features { gap: 14px; text-align: left; margin: 0; }
.feature-card { padding: 24px 21px; margin: 0; border-radius: 13px; background: #191620; box-shadow: none; }
.feature-icon { display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; margin-bottom: 20px; border: 1px solid var(--line-color); border-radius: 12px; color: var(--accent-color); background: var(--accent-soft); font-size: 1rem; }
.feature-card:nth-child(2) .feature-icon { color: var(--success); background: #93d9bb0d; }
.feature-card:nth-child(3) .feature-icon { color: var(--warm-color); background: #ffbe9b0d; }
.feature-card h2 { font-size: 1.05rem; margin-bottom: 9px; }
.feature-card p { color: var(--text-muted); font-size: .8rem; }
.home-action { margin: 31px 0 6px; min-height: 48px; padding-inline: 25px; }
.home-footer-note { font-size: .67rem; color: #a097ad; margin-top: 15px; }
.server-selection-title { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line-color); padding-bottom: 20px; margin-bottom: 18px; }
.server-selection-title i { color: var(--warm-color); }
.server-selection-description { color: var(--text-muted); margin-bottom: 26px; }
.server-picker-empty { grid-column: 1 / -1; color: var(--text-muted); text-align: center; padding: 30px 20px; border: 1px dashed var(--line-color); border-radius: var(--border-radius); }
.server-picker-empty > i { color: var(--accent-color); font-size: 1.5rem; margin-bottom: 15px; }
.server-picker-empty h3 { color: var(--text-color); margin-bottom: 10px; font-size: 1.1rem; }
.server-picker-empty p { max-width: 520px; margin-inline: auto; font-size: .85rem; }
.server-tile { display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 17px; text-align: center; background: #191620; min-height: 216px; padding-top: 38px; }
.server-tile img, .server-monogram { width: 68px; height: 68px; border-radius: 22px; }
.server-monogram { display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent-color); font-family: var(--font-heading); font-weight: 700; font-size: 1.5rem; }
.server-tile h3 { font-size: 1rem; letter-spacing: -.02em; }
.server-status { position: absolute; top: 13px; right: 13px; color: var(--success); font-size: .59rem; font-family: var(--font-mono); }
.server-status::before { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: currentColor; margin-right: 6px; vertical-align: 1px; }
.server-add { border-style: dashed; background: transparent; color: var(--text-muted); padding-top: 27px; }
.server-add i { width: 56px; height: 56px; display: grid; place-items: center; border: 1px dashed var(--line-color); border-radius: 50%; color: var(--accent-color); font-size: 1.3rem; }
.server-add span { max-width: 140px; font-size: .8rem; }
@keyframes soundwave { 0%, 100% { transform: scaleY(.65); } 50% { transform: scaleY(1); } }
@media (min-width: 769px) and (max-width: 1100px) {
    .sidebar { width: 230px; flex-basis: 230px; padding-inline: 14px; }
    .main-content { padding: 30px 24px; }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-features { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .feature-card { padding: 20px 16px; }
}
@media (max-width: 768px) {
    .sidebar { width: min(86vw, 310px); visibility: hidden; transition: transform .3s var(--ease-out), visibility .3s; }
    .sidebar.active { visibility: visible; }
    .sidebar .brand { margin-right: 40px; }
    .brand-equalizer { display: none; }
    .main-content { padding: 85px 16px calc(28px + env(safe-area-inset-bottom, 0px)); }
    .mobile-header { height: 64px; justify-content: flex-start; gap: 14px; padding: 11px 18px; background: #191620f0; backdrop-filter: blur(16px); }
    .mobile-header button { width: 38px; height: 38px; padding: 0; border: 1px solid var(--line-color); border-radius: 10px; background: transparent; }
    .mobile-header span { font-family: var(--font-heading); color: var(--text-color); letter-spacing: -.05em; }
    .mobile-header .mobile-mark { margin-left: auto; width: 6px; height: 6px; background: var(--warm-color); border-radius: 50%; }
    .page-context { padding-bottom: 18px; font-size: .58rem; }
    .context-brand { display: none; }
    .card { padding: 21px 18px; border-radius: 15px; }
    .grid-2, .grid-3, .rank-card-layout, .mediaplayer-responsive { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .btn { width: auto; }
    .home-stage { padding: 38px 20px 28px; }
    .home-eyebrow { font-size: .55rem; margin-bottom: 23px; }
    .home-description { font-size: .86rem; margin-bottom: 29px; }
    .sound-wave { gap: 4px; height: 44px; }
    .sound-wave i { width: 4px; }
    .home-features { gap: 10px; }
    .feature-card { padding: 19px 18px 19px 70px; position: relative; }
    .feature-icon { position: absolute; left: 18px; top: 21px; margin: 0; width: 35px; height: 35px; }
    .feature-card h2 { margin-bottom: 5px; }
    .home-action { width: 100%; font-size: .8rem; }
    .server-tile { min-height: 194px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    a.card:hover, a.card:focus, a.card:active, a.card:hover img, .btn:hover { transform: none !important; }
}
