/* CSS VERSION FINAL FIX */
*, ::before, ::after {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}
::backdrop {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}
/* ! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com */
/*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
*/
*,
::before,
::after {
  box-sizing: border-box; /* 1 */
  border-width: 0; /* 2 */
  border-style: solid; /* 2 */
  border-color: #e5e7eb; /* 2 */
}
::before,
::after {
  --tw-content: '';
}
/*
1. Use a consistent sensible line-height in all browsers.
2. Prevent adjustments of font size after orientation changes in iOS.
3. Use a more readable tab size.
4. Use the user's configured `sans` font-family by default.
5. Use the user's configured `sans` font-feature-settings by default.
6. Use the user's configured `sans` font-variation-settings by default.
7. Disable tap highlights on iOS
*/
html,
:host {
  line-height: 1.5; /* 1 */
  -webkit-text-size-adjust: 100%; /* 2 */
  -moz-tab-size: 4; /* 3 */
  -o-tab-size: 4;
     tab-size: 4; /* 3 */
  font-family: Inter Variable, Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, sans-serif; /* 4 */
  font-feature-settings: normal; /* 5 */
  font-variation-settings: normal; /* 6 */
  -webkit-tap-highlight-color: transparent; /* 7 */
}
/*
1. Remove the margin in all browsers.
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
*/
body {
  margin: 0; /* 1 */
  line-height: inherit; /* 2 */
}
/*
1. Add the correct height in Firefox.
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
3. Ensure horizontal rules are visible by default.
*/
hr {
  height: 0; /* 1 */
  color: inherit; /* 2 */
  border-top-width: 1px; /* 3 */
}
/*
Add the correct text decoration in Chrome, Edge, and Safari.
*/
abbr:where([title]) {
  -webkit-text-decoration: underline dotted;
          text-decoration: underline dotted;
}
/*
Remove the default font size and weight for headings.
*/
h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}
/*
Reset links to optimize for opt-in styling instead of opt-out.
*/
a {
  color: inherit;
  text-decoration: inherit;
}
/*
Add the correct font weight in Edge and Safari.
*/
b,
strong {
  font-weight: bolder;
}
/*
1. Use the user's configured `mono` font-family by default.
2. Use the user's configured `mono` font-feature-settings by default.
3. Use the user's configured `mono` font-variation-settings by default.
4. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
samp,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */
  font-feature-settings: normal; /* 2 */
  font-variation-settings: normal; /* 3 */
  font-size: 1em; /* 4 */
}
/*
Add the correct font size in all browsers.
*/
small {
  font-size: 80%;
}
/*
Prevent `sub` and `sup` elements from affecting the line height in all browsers.
*/
sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}
sub {
  bottom: -0.25em;
}
sup {
  top: -0.5em;
}
/*
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
3. Remove gaps between table borders by default.
*/
table {
  text-indent: 0; /* 1 */
  border-color: inherit; /* 2 */
  border-collapse: collapse; /* 3 */
}
/*
1. Change the font styles in all browsers.
2. Remove the margin in Firefox and Safari.
3. Remove default padding in all browsers.
*/
button,
input,
optgroup,
select,
textarea {
  font-family: inherit; /* 1 */
  font-feature-settings: inherit; /* 1 */
  font-variation-settings: inherit; /* 1 */
  font-size: 100%; /* 1 */
  font-weight: inherit; /* 1 */
  line-height: inherit; /* 1 */
  letter-spacing: inherit; /* 1 */
  color: inherit; /* 1 */
  margin: 0; /* 2 */
  padding: 0; /* 3 */
}
/*
Remove the inheritance of text transform in Edge and Firefox.
*/
button,
select {
  text-transform: none;
}
/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Remove default button styles.
*/
button,
input:where([type='button']),
input:where([type='reset']),
input:where([type='submit']) {
  -webkit-appearance: button; /* 1 */
  background-color: transparent; /* 2 */
  background-image: none; /* 2 */
}
/*
Use the modern Firefox focus style for all focusable elements.
*/
:-moz-focusring {
  outline: auto;
}
/*
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
*/
:-moz-ui-invalid {
  box-shadow: none;
}
/*
Add the correct vertical alignment in Chrome and Firefox.
*/
progress {
  vertical-align: baseline;
}
/*
Correct the cursor style of increment and decrement buttons in Safari.
*/
::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
  height: auto;
}
/*
1. Correct the odd appearance in Chrome and Safari.
2. Correct the outline style in Safari.
*/
[type='search'] {
  -webkit-appearance: textfield; /* 1 */
  outline-offset: -2px; /* 2 */
}
/*
Remove the inner padding in Chrome and Safari on macOS.
*/
::-webkit-search-decoration {
  -webkit-appearance: none;
}
/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
  -webkit-appearance: button; /* 1 */
  font: inherit; /* 2 */
}
/*
Add the correct display in Chrome and Safari.
*/
summary {
  display: list-item;
}
/*
Removes the default spacing and border for appropriate elements.
*/
blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
  margin: 0;
}
fieldset {
  margin: 0;
  padding: 0;
}
legend {
  padding: 0;
}
ol,
ul,
menu {
  list-style: none;
  margin: 0;
  padding: 0;
}
/*
Reset default styling for dialogs.
*/
dialog {
  padding: 0;
}
/*
Prevent resizing textareas horizontally by default.
*/
textarea {
  resize: vertical;
}
/*
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
2. Set the default placeholder color to the user's configured gray 400 color.
*/
input::-moz-placeholder, textarea::-moz-placeholder {
  opacity: 1; /* 1 */
  color: #9ca3af; /* 2 */
}
input::placeholder,
textarea::placeholder {
  opacity: 1; /* 1 */
  color: #9ca3af; /* 2 */
}
/*
Set the default cursor for buttons.
*/
button,
[role="button"] {
  cursor: pointer;
}
/*
Make sure disabled buttons don't get the pointer cursor.
*/
:disabled {
  cursor: default;
}
/*
1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
   This can trigger a poorly considered lint error in some tools but is included by design.
*/
img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block; /* 1 */
  vertical-align: middle; /* 2 */
}
/*
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
*/
img,
video {
  max-width: 100%;
  height: auto;
}
/* Make elements with the HTML hidden attribute stay hidden by default */
[hidden]:where(:not([hidden="until-found"])) {
  display: none;
}
.container {
  width: 100%;
}
@media (min-width: 640px) {
  .container {
    max-width: 640px;
  }
}
@media (min-width: 768px) {
  .container {
    max-width: 768px;
  }
}
@media (min-width: 1024px) {
  .container {
    max-width: 1024px;
  }
}
@media (min-width: 1280px) {
  .container {
    max-width: 1280px;
  }
}
@media (min-width: 1536px) {
  .container {
    max-width: 1536px;
  }
}
.visible {
  visibility: visible;
}
.collapse {
  visibility: collapse;
}
.static {
  position: static;
}
.fixed {
  position: fixed;
}
.absolute {
  position: absolute;
}
.relative {
  position: relative;
}
.sticky {
  position: sticky;
}
.z-0 {
  z-index: 0;
}
.block {
  display: block;
}
.inline-block {
  display: inline-block;
}
.inline {
  display: inline;
}
.flex {
  display: flex;
}
.inline-flex {
  display: inline-flex;
}
.table {
  display: table;
}
.flow-root {
  display: flow-root;
}
.grid {
  display: grid;
}
.contents {
  display: contents;
}
.hidden {
  display: none;
}
.min-h-screen {
  min-height: 100vh;
}
.flex-1 {
  flex: 1 1 0%;
}
.flex-shrink {
  flex-shrink: 1;
}
.border-collapse {
  border-collapse: collapse;
}
.transform {
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.animate-spin {
  animation: spin 1s linear infinite;
}
.resize {
  resize: both;
}
.flex-col {
  flex-direction: column;
}
.flex-wrap {
  flex-wrap: wrap;
}
.break-all {
  word-break: break-all;
}
.border {
  border-width: 1px;
}
.font-sans {
  font-family: Inter Variable, Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, sans-serif;
}
.uppercase {
  text-transform: uppercase;
}
.lowercase {
  text-transform: lowercase;
}
.capitalize {
  text-transform: capitalize;
}
.italic {
  font-style: italic;
}
.tabular-nums {
  --tw-numeric-spacing: tabular-nums;
  font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);
}
.text-white {
  --tw-text-opacity: 1;
  color: rgb(255 255 255 / var(--tw-text-opacity, 1));
}
.underline {
  text-decoration-line: underline;
}
.shadow {
  --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}
.outline {
  outline-style: solid;
}
.ring {
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}
.blur {
  --tw-blur: blur(8px);
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.drop-shadow {
  --tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / 0.1)) drop-shadow(0 1px 1px rgb(0 0 0 / 0.06));
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.filter {
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.transition {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.ease-in-out {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

:root {
  --bg-primary: #09090b;
  --bg-secondary: #18181b;

  /* Liquid glass, after Apple's material: one flat translucent fill, the
     backdrop blurred behind it, a hairline edge and a single thin top light.
     No gradients, no coloured glows. Fill is dark enough for AA text. */
  /* Content panels: near-zero blur so the scene behind stays visible (a heavy
     blur turned the pixel-art backgrounds into a flat grey slab); the tint does
     the readability work. Bars that float over scrolling content (navbar) use
     the heavy "bar" blur instead, so text under them never clashes. */
  --glass-fill: rgba(20, 20, 24, 0.5);
  --glass-fill-hover: rgba(30, 30, 36, 0.56);
  --glass-blur: blur(2px) saturate(150%);
  --glass-bar-fill: rgba(22, 22, 26, 0.6);
  --glass-bar-blur: blur(24px) saturate(180%);
  --glass-edge: rgba(255, 255, 255, 0.11);
  --glass-edge-hover: rgba(255, 255, 255, 0.2);
  --glass-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.025),
    0 12px 32px -16px rgba(0, 0, 0, 0.65);

  --accent: #ef4444;
  /* Hover stays saturated (brighter red, not pinker). */
  --accent-hover: #f33b3b;
  --accent-pressed: #d92626;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  /* Keep the scrollbar's space even when it is hidden (popups lock scrolling), so the
     page never re-centres sideways when it appears or disappears. */
  scrollbar-gutter: stable;
  /* Nothing may push the page sideways on phones (decorative glows, wide tables). */
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-primary);
  color: #fff;
  font-family: 'Inter Variable', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img,
video,
iframe {
  max-width: 100%;
}

/* Form fields in flex rows must be allowed to shrink below their intrinsic
   ~20ch width, or they push their siblings off small screens. */
input,
textarea,
select {
  min-width: 0;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Rank Colors */
.rank-owner,
.rank-admin {
  color: #ef4444;
}

.rank-mod,
.rank-helper {
  color: #22c55e;
}

.rank-developer {
  color: #06b6d4;
}

.rank-builder {
  color: #eab308;
}

.rank-media {
  color: #a855f7;
}

.rank-famous {
  color: #f59e0b;
}

.rank-donator {
  color: #3b82f6;
}

.rank-default {
  color: #a1a1aa;
}

/* Glass Effects */
.glass {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: var(--glass-blur);
}

::-moz-selection {
  background: rgba(239, 68, 68, 0.3);
  color: #fff;
}

::selection {
  background: rgba(239, 68, 68, 0.3);
  color: #fff;
}

:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.2);
  outline-offset: 2px;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fadeIn {
  animation: fadeIn 0.3s ease-out;
}

@keyframes pulseGlow {

  0%,
  100% {
    filter: drop-shadow(0 0 25px rgba(239, 68, 68, 0.6)) drop-shadow(0 0 50px rgba(239, 68, 68, 0.3)) drop-shadow(0 0 80px rgba(239, 68, 68, 0.15));
  }

  50% {
    filter: drop-shadow(0 0 40px rgba(239, 68, 68, 0.9)) drop-shadow(0 0 80px rgba(239, 68, 68, 0.5)) drop-shadow(0 0 120px rgba(239, 68, 68, 0.25));
  }
}

.logo-pulse {
  animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes breatheGlow {

  0%,
  100% {
    filter: drop-shadow(0 0 12px rgba(239, 68, 68, 0.6)) drop-shadow(0 0 24px rgba(239, 68, 68, 0.3));
  }

  50% {
    filter: drop-shadow(0 0 20px rgba(239, 68, 68, 0.9)) drop-shadow(0 0 40px rgba(239, 68, 68, 0.5));
  }
}

.logo-breathe {
  animation: breatheGlow 2.5s ease-in-out infinite;
}

/* ---------- Liquid Glass ----------
   Panels never move or re-light on hover. Only real controls react, and only
   by a small change of fill/edge. */
/* ---------- Glass-safe fades ----------
   Browsers drop backdrop-filter on anything inside a parent with opacity < 1, so
   fading a wrapper made its glass panels flat for the whole fade and "pop" when it
   ended. Animations therefore fade the --fade variable instead of opacity (framer
   writes it inline), and these rules hand that fade to the right elements: glass
   panels fade themselves (keeping their own blur) and glass-free branches fade as a
   block. They only match while a fade is in progress (--fade below 1), so opacity
   set elsewhere is left alone at rest.
   --fade-o carries the value of the nearest fade that is running: an animated block
   resting inside a fading one (e.g. a list inside a tab that is switching) must not
   hide the outer fade with its own resting --fade: 1. */
[style*="--fade:"]:not([style*="--fade: 1;"]) {
  --fade-o: var(--fade);
}
/* the animated element has no glass inside: fade it as a whole */
[style*="--fade:"]:not([style*="--fade: 1;"]):not(:is(.liquid-glass, .glass-card)):not(:has(.liquid-glass, .glass-card)),
/* the animated element is a glass panel: it fades itself */
[style*="--fade:"]:not([style*="--fade: 1;"]):is(.liquid-glass, .glass-card),
/* inside another glass panel, nested blur cannot be kept: fade the element itself */
:is(.liquid-glass, .glass-card) [style*="--fade:"]:not([style*="--fade: 1;"]):has(.liquid-glass, .glass-card),
/* contains glass: each top-level glass panel inside fades itself ... */
[style*="--fade:"]:not([style*="--fade: 1;"]):not(:is(.liquid-glass, .glass-card)) :is(.liquid-glass, .glass-card):not(:is(.liquid-glass, .glass-card) *),
/* ... and so does every glass-free branch around them */
:is([style*="--fade:"]:not([style*="--fade: 1;"]), [style*="--fade:"]:not([style*="--fade: 1;"]) :has(.liquid-glass, .glass-card)):not(:is(.liquid-glass, .glass-card)):not(:is(.liquid-glass, .glass-card) *) > :not(:is(.liquid-glass, .glass-card)):not(:has(.liquid-glass, .glass-card)) {
  opacity: var(--fade-o);
}

.liquid-glass {
  position: relative;
  background: var(--glass-fill);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-shadow);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

/* Floating bars (navbar and its mobile menu) blur strongly: content scrolls under them. */
.liquid-glass.glass-bar {
  background: var(--glass-bar-fill);
  backdrop-filter: var(--glass-bar-blur);
}

a.liquid-glass:hover,
button.liquid-glass:hover {
  background: var(--glass-fill-hover);
  border-color: var(--glass-edge-hover);
}

/* Controls on glass: inputs, chips, secondary buttons. Same clear material as
   the panels (near-zero blur), so nothing turns into a grey slab. */
.glass-card {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.16);
}

/* Floating surfaces (dropdown menus, search results, modal dialogs) sit on top
   of other content, so they use the bar material: strong blur, darker fill. */
.glass-card.glass-float {
  background: var(--glass-bar-fill);
  backdrop-filter: var(--glass-bar-blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 16px 40px -12px rgba(0, 0, 0, 0.7);
}

.glass-card.glass-float:hover {
  background: var(--glass-bar-fill);
  border-color: rgba(255, 255, 255, 0.10);
}

input.glass-card:hover,
textarea.glass-card:hover {
  background: rgba(255, 255, 255, 0.06);
}

input.glass-card:focus,
textarea.glass-card:focus,
select.glass-card:focus {
  border-color: rgba(239, 68, 68, 0.6) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18);
}

input::-moz-placeholder, textarea::-moz-placeholder {
  color: rgba(255, 255, 255, 0.45);
}

input::placeholder,
textarea::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

/* ---------- Primary button ----------
   Flat accent fill with a soft red glow. The glow has no offset, so it is
   even on every side (never reads as "cut"), and only grows a little on
   hover. No filter, no movement. */
.btn-glow {
  background: var(--accent) !important;
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 0 18px rgba(239, 68, 68, 0.35);
  transition: background-color 0.15s ease, box-shadow 0.2s ease;
}

.btn-glow:hover {
  background: var(--accent-hover) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 0 26px rgba(239, 68, 68, 0.55);
}

.btn-glow:active {
  background: var(--accent-pressed) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 14px rgba(239, 68, 68, 0.35);
}

.btn-glow:disabled,
.btn-glow[disabled] {
  box-shadow: none;
}

.btn-glow:focus-visible,
.glass-card:focus-visible {
  outline: 2px solid rgba(239, 68, 68, 0.7);
  outline-offset: 2px;
}

/* No backdrop-filter support: an opaque surface instead of a see-through
   box with unreadable text. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .liquid-glass {
    background: rgba(24, 24, 28, 0.96);
  }

  .glass-card {
    background: rgba(40, 40, 46, 0.96);
  }
}

@media (prefers-reduced-transparency: reduce) {
  .liquid-glass {
    background: rgba(24, 24, 28, 0.97);
  }
}

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
  :root {
    /* Phones: a touch more tint (small text, bright outdoor screens) and a
       lighter blur (GPU cost on low-end devices). Still glass, not a slab. */
    --glass-fill: rgba(18, 18, 22, 0.58);
    --glass-bar-fill: rgba(20, 20, 24, 0.7);
  }

  body {
    font-size: 15px;
    line-height: 1.5;
  }

  /* Inputs under 16px make iOS Safari zoom the whole page on focus. */
  input,
  textarea,
  select {
    font-size: 16px !important;
  }
}

@media (max-width: 640px) {
  .leaderboard-row {
    font-size: 12px !important;
  }
}

.animate-slideUp {
  animation: slideUp 0.5s ease-out forwards;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Button press animation */
.btn-press {
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn-press:active {
  transform: translateY(1px);
}

/* Pulse animation for notification dots */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Utility to disable CSS transitions on elements managed by Framer Motion */
.no-transition {
  transition: none !important;
}

/* Staff Guide Styles */
.staff-guide-content {
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
}

.staff-guide-content h1.guide-section-title {
  font-size: 22px;
  font-weight: 700;
  color: #ef4444;
  margin: 32px 0 8px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(239, 68, 68, 0.2);
  text-align: center;
  letter-spacing: 0.5px;
}

.staff-guide-content h1.guide-section-title:first-child {
  margin-top: 0;
}

.staff-guide-content h2.guide-h2 {
  font-size: 17px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin: 24px 0 8px 0;
}

.staff-guide-content h2.guide-h2 em {
  font-style: italic;
  color: rgba(255, 255, 255, 0.85);
}

.staff-guide-content p {
  margin: 8px 0;
  line-height: 1.7;
}

.staff-guide-content strong {
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
}

.staff-guide-content em {
  color: rgba(255, 255, 255, 0.7);
}

.staff-guide-content ul {
  margin: 8px 0;
  padding-left: 24px;
  list-style: none;
}

.staff-guide-content ul li {
  position: relative;
  padding: 4px 0 4px 12px;
  line-height: 1.6;
}

.staff-guide-content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ef4444;
}

.staff-guide-content hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: 16px 0;
}

/* TipTap Editor Styles */
.staff-guide-editor .tiptap {
  min-height: 500px;
  padding: 24px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  line-height: 1.8;
  outline: none;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 0 0 12px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: none;
}

.staff-guide-editor .tiptap:focus {
  border-color: rgba(239, 68, 68, 0.3);
}

/* Read-only rendering (forum threads/replies): keep the shared typography
   above but drop the empty editing-box chrome (min-height, padding, border,
   background) that only makes sense for the interactive editor. */
.staff-guide-editor.read-only .tiptap {
  min-height: 0;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
}

.staff-guide-editor .tiptap h1 {
  font-size: 22px;
  font-weight: 700;
  color: #ef4444;
  margin: 28px 0 8px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(239, 68, 68, 0.2);
}

.staff-guide-editor .tiptap h1:first-child {
  margin-top: 0;
}

.staff-guide-editor .tiptap h2 {
  font-size: 17px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin: 20px 0 8px 0;
}

.staff-guide-editor .tiptap h3 {
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  margin: 16px 0 6px 0;
}

.staff-guide-editor .tiptap p {
  margin: 6px 0;
}

.staff-guide-editor .tiptap strong {
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
}

.staff-guide-editor .tiptap em {
  color: rgba(255, 255, 255, 0.7);
}

.staff-guide-editor .tiptap ul,
.staff-guide-editor .tiptap ol {
  margin: 8px 0;
  padding-left: 24px;
}

.staff-guide-editor .tiptap ul li {
  position: relative;
  padding: 2px 0;
}

.staff-guide-editor .tiptap ul li::marker {
  color: #ef4444;
}

.staff-guide-editor .tiptap ol li::marker {
  color: rgba(255, 255, 255, 0.5);
}

.staff-guide-editor .tiptap hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: 16px 0;
}

.staff-guide-editor .tiptap mark {
  background: rgba(239, 68, 68, 0.25);
  color: inherit;
  border-radius: 2px;
  padding: 1px 3px;
}

.staff-guide-editor .tiptap table {
  border-collapse: collapse;
  width: 100%;
  margin: 12px 0;
}

.staff-guide-editor .tiptap table td,
.staff-guide-editor .tiptap table th {
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 12px;
  min-width: 80px;
  vertical-align: top;
}

.staff-guide-editor .tiptap table th {
  background: rgba(255, 255, 255, 0.05);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.staff-guide-editor .tiptap table td {
  background: rgba(255, 255, 255, 0.02);
}

.staff-guide-editor .tiptap .selectedCell {
  background: rgba(239, 68, 68, 0.1);
}

.staff-guide-editor .tiptap p.is-editor-empty:first-child::before {
  content: 'Start writing your staff guide...';
  color: rgba(255, 255, 255, 0.2);
  float: left;
  pointer-events: none;
  height: 0;
}
/* Wide tables inside glass panels scroll sideways on small screens. */
.table-scroll {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
}

/* Clickable list rows (ticket lists): colour-only hover, no movement. */
.staff-ticket-row {
  transition: background-color 0.15s ease;
}

.staff-ticket-row:hover {
  background-color: rgba(255, 255, 255, 0.04);
}

/* A forum reply opened from a link (#reply-<id>): brief highlight so it's easy to spot. */
.forum-reply {
  scroll-margin-top: 110px;
  transition: background-color 0.6s ease;
}

.forum-reply-target {
  background-color: rgba(239, 68, 68, 0.12);
}

/* ---------- Menus & dialogs ----------
   One look for every dropdown, popover and dialog: the floating glass material
   (.glass-card.glass-float), rounded, with inset items that only change colour. */
.menu-panel {
  border-radius: 12px !important;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  font-family: inherit;
  font-size: 13px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.menu-item:hover,
.menu-item.is-active,
.menu-item:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  outline: none;
}

.menu-item.is-danger {
  color: #f87171;
}

.menu-item.is-danger:hover,
.menu-item.is-danger:focus-visible {
  background: rgba(239, 68, 68, 0.14);
  color: #fca5a5;
}

.menu-item.is-selected {
  color: #f87171;
}

.menu-divider {
  height: 1px;
  margin: 4px 6px;
  background: rgba(255, 255, 255, 0.1);
}

.modal-panel {
  border-radius: 16px !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.menu-item.is-unread {
  background: rgba(239, 68, 68, 0.06);
}

/* Phones/tablets: the bell sits next to the menu button, not at the screen edge, so the
   notification list spans the bar's width just under it instead of hanging off-screen.
   (The bar's backdrop-filter makes it the containing block of fixed children, so these
   offsets are relative to the bar, not the viewport.) */
@media (max-width: 1099px) {
  .notif-menu {
    position: fixed !important;
    top: calc(100% + 8px) !important;
    left: 0 !important;
    right: 0 !important;
    width: auto !important;
    margin-top: 0 !important;
    max-height: min(400px, calc(100vh - 100px)) !important;
  }
}

/* Phones/tablets: only logo, bell and menu button are visible in the bar, and the bar
   spreads its items apart; keep the bell grouped with the menu button on the right. */
@media (max-width: 1099px) {
  .nav-bell {
    margin-left: auto;
    margin-right: -10px;
  }
}

/* ---------- Burger → cross ----------
   Top and bottom lines slide to the centre and rotate into an X while the middle
   one fades out; the reverse on close. Same 22px box as the old icons. */
.burger {
  position: relative;
  display: block;
  width: 22px;
  height: 22px;
}

.burger > span {
  position: absolute;
  left: 3px;
  right: 3px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition:
    transform 0.32s cubic-bezier(0.65, 0, 0.35, 1),
    opacity 0.2s ease,
    top 0.32s cubic-bezier(0.65, 0, 0.35, 1);
}

.burger > span:nth-child(1) { top: 5px; }
.burger > span:nth-child(2) { top: 10px; }
.burger > span:nth-child(3) { top: 15px; }

.burger.is-open > span:nth-child(1) { top: 10px; transform: rotate(45deg); }
.burger.is-open > span:nth-child(2) { opacity: 0; transform: scaleX(0.2); }
.burger.is-open > span:nth-child(3) { top: 10px; transform: rotate(-45deg); }

@media (prefers-reduced-motion: reduce) {
  .burger > span { transition: none; }
}

/* ---------- Client panel ----------
   Same materials as the rest of the site (liquid-glass panels, glass-card
   controls, btn-glow primary), with real hover/focus/disabled states. */
.cp-page {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px 96px;
}

.cp-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cp-card {
  border-radius: 16px;
  padding: 24px;
}

.cp-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.cp-card-head h3 {
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
}

.cp-card-head-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cp-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.cp-desc {
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  line-height: 1.65;
  margin: 12px 0 20px;
}

.cp-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

/* Header */
.cp-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.cp-header-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
}

.cp-header h1 {
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
}

.cp-header p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  margin-top: 4px;
}

/* Tabs: one glass bar, active tab tinted red like the Staff Panel. */
.cp-tabs {
  display: flex;
  gap: 4px;
  padding: 6px;
  border-radius: 14px;
  margin-bottom: 24px;
  overflow-x: auto;
  scrollbar-width: none;
}

.cp-tabs::-webkit-scrollbar {
  display: none;
}

.cp-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 1 0 auto;
  justify-content: center;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.cp-tab:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.cp-tab.is-active {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

/* Inputs */
.cp-input {
  flex: 1 1 200px;
  height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  outline: none;
}

.cp-search {
  position: relative;
}

.cp-search > svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.5);
  pointer-events: none;
  z-index: 1;
}

.cp-search .cp-input {
  width: 100%;
  height: 48px;
  padding-left: 44px;
  border-radius: 12px;
}

/* Buttons */
.cp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.2s ease;
}

.cp-btn-sm {
  height: 36px;
  padding: 0 14px;
  font-size: 13px;
  border-radius: 9px;
}

.cp-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cp-btn.btn-glow:disabled:hover {
  background: var(--accent) !important;
  box-shadow: none;
}

.cp-btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.cp-btn-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.cp-btn-danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.32);
  color: #f87171;
}

.cp-btn-danger:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.55);
  color: #fca5a5;
}

.cp-btn:focus-visible {
  outline: 2px solid rgba(239, 68, 68, 0.7);
  outline-offset: 2px;
}

.cp-link {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  color: #fff;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.3);
  text-underline-offset: 3px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.cp-link:hover {
  color: #f87171;
  text-decoration-color: #f87171;
}

/* Status chips */
.cp-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

button.cp-chip-button {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  border-radius: 999px;
  transition: filter 0.15s ease;
}

button.cp-chip-button:hover {
  filter: brightness(1.25);
}

/* Player / ban cards */
.cp-player-top {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.cp-player-id {
  flex: 1;
  min-width: 200px;
}

.cp-player-name {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: #fff;
  font-weight: 600;
  font-size: 16px;
}

.cp-player-uuid {
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  margin-top: 4px;
  word-break: break-all;
}

.cp-player-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cp-head {
  border-radius: 10px;
  flex-shrink: 0;
  image-rendering: pixelated;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.cp-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px 24px;
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.cp-meta-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.cp-meta-value {
  color: #fff;
  font-size: 13px;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.cp-meta-value.is-warn {
  color: #facc15;
}

.cp-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Hidden IP: a small chip that reveals the value on click. */
.cp-reveal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.6);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.cp-reveal:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.32);
  color: #fff;
}

.cp-reveal.is-shown {
  border-style: solid;
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.08);
  color: #fff;
}

.cp-reveal > svg {
  flex-shrink: 0;
}

.cp-reveal span {
  overflow-wrap: anywhere;
}

.cp-reveal:focus-visible {
  outline: 2px solid rgba(239, 68, 68, 0.7);
  outline-offset: 2px;
}

.cp-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.cp-alert > svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.cp-alert.is-warn {
  color: #fde68a;
  background: rgba(250, 204, 21, 0.08);
  border: 1px solid rgba(250, 204, 21, 0.22);
}

.cp-alert.is-danger {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.22);
}

.cp-alert.is-info {
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.cp-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.cp-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.cp-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Cosmetic grant pills */
.cp-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.6);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.cp-pill:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.cp-pill.is-on {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.55);
  color: #fff;
}

.cp-pill.is-on:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.24);
  border-color: rgba(239, 68, 68, 0.75);
}

.cp-pill:disabled {
  cursor: wait;
  opacity: 0.7;
}

.cp-pill-type {
  font-size: 11px;
  opacity: 0.55;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Tiles (online players, uploaded cosmetics) */
.cp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.cp-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-width: 0;
}

.cp-tile-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.cp-tile-title {
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.cp-tile-sub {
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
}

.cp-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 48px 16px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
  text-align: center;
}

.cp-empty > svg {
  color: rgba(255, 255, 255, 0.25);
}

.cp-select {
  flex: 0 1 150px;
  min-width: 120px;
}

/* File picker: the native control is hidden behind a styled label. */
.cp-file {
  position: relative;
  display: inline-flex;
  max-width: 100%;
}

.cp-file input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.cp-file input:focus-visible + .cp-btn {
  outline: 2px solid rgba(239, 68, 68, 0.7);
  outline-offset: 2px;
}

.cp-file .cp-btn {
  max-width: 100%;
  width: 100%;
}

.cp-file .cp-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.cp-preview {
  margin-top: 20px;
  display: inline-flex;
  max-width: 100%;
  padding: 12px;
  border-radius: 12px;
  background:
    repeating-conic-gradient(rgba(255, 255, 255, 0.06) 0% 25%, transparent 0% 50%) 0 0 / 16px 16px,
    rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.cp-preview img {
  display: block;
  max-width: 100%;
  width: 256px;
  height: auto;
  max-height: 160px;
  -o-object-fit: contain;
     object-fit: contain;
  image-rendering: pixelated;
}

.cp-file input:disabled + .cp-btn {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Uploaded cosmetics: texture thumbnail, then Rename / Replace / Delete under it. */
.cp-grid.is-cosmetics {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
}

.cp-cosmetic {
  flex-wrap: wrap;
}

/* One row of equal buttons; they wrap only when the tile is too narrow for all three. */
.cp-cosmetic-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
}

.cp-cosmetic-actions > * {
  flex: 1 1 0;
  min-width: -moz-max-content;
  min-width: max-content;
}

.cp-cosmetic-actions .cp-btn {
  width: 100%;
  padding: 0 8px;
}

/* --s: screen pixels per texture pixel of a 64x32 cape; the back panel is 10x16 at (1, 1). */
.cp-thumb {
  --s: 3px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.3);
  background:
    repeating-conic-gradient(rgba(255, 255, 255, 0.06) 0% 25%, transparent 0% 50%) 0 0 / 12px 12px,
    rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.cp-thumb.is-large {
  --s: 5px;
  width: 112px;
  height: 112px;
}

.cp-thumb img {
  display: block;
  max-width: 88%;
  max-height: 88%;
  -o-object-fit: contain;
     object-fit: contain;
  image-rendering: pixelated;
}

.cp-thumb-cape {
  display: block;
  width: calc(var(--s) * 10);
  height: calc(var(--s) * 16);
  background-repeat: no-repeat;
  background-size: calc(var(--s) * 64) calc(var(--s) * 32);
  background-position: calc(var(--s) * -1) calc(var(--s) * -1);
  image-rendering: pixelated;
}

.cp-swap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.45);
}

.cp-swap figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
}

.cp-swap figcaption {
  max-width: 112px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Switch (show lifted bans) */
.cp-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.cp-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.cp-switch-track {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: background-color 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
}

.cp-switch-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease;
}

.cp-switch input:checked + .cp-switch-track {
  background: var(--accent);
  border-color: rgba(255, 255, 255, 0.12);
}

.cp-switch input:checked + .cp-switch-track::after {
  transform: translateX(16px);
}

.cp-switch input:focus-visible + .cp-switch-track {
  outline: 2px solid rgba(239, 68, 68, 0.7);
  outline-offset: 2px;
}

/* Confirmation dialog */
@keyframes cpFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes cpPop {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

.cp-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  animation: cpFade 0.15s ease-out;
}

.cp-dialog {
  width: 100%;
  max-width: 440px;
  padding: 28px;
  animation: cpPop 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.cp-dialog-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  margin-bottom: 16px;
}

.cp-dialog h3 {
  color: #fff;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
}

.cp-dialog p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  line-height: 1.6;
  margin-top: 8px;
}

.cp-dialog .cp-input {
  width: 100%;
  margin-top: 18px;
}

.cp-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

/* Toast: action results float at the bottom so they are seen wherever the row was. */
@keyframes cpToastIn {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.cp-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 1100;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  width: -moz-max-content;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 12px 10px 12px 16px;
  border-radius: 12px !important;
  font-size: 14px;
  line-height: 1.45;
  animation: cpToastIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.cp-toast > svg {
  flex-shrink: 0;
}

.cp-toast.is-success { border-color: rgba(34, 197, 94, 0.35) !important; color: #86efac; }
.cp-toast.is-error { border-color: rgba(239, 68, 68, 0.4) !important; color: #fca5a5; }

.cp-toast button {
  display: flex;
  flex-shrink: 0;
  border: none;
  background: none;
  color: rgba(255, 255, 255, 0.5);
  padding: 4px;
  border-radius: 6px;
  cursor: pointer;
}

.cp-toast button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 640px) {
  .cp-page { padding: 0 16px 96px; }
  .cp-card { padding: 18px; }
  .cp-header { gap: 14px; margin-bottom: 24px; }
  .cp-header h1 { font-size: 26px; }
  .cp-header p { font-size: 14px; }
  .cp-header-icon { width: 48px; height: 48px; }
  .cp-tabs { display: grid; grid-template-columns: 1fr 1fr; }
  .cp-tab { padding: 10px 8px; font-size: 13px; gap: 6px; white-space: normal; text-align: center; line-height: 1.25; }
  .cp-row > .cp-btn,
  .cp-row > .cp-file,
  .cp-row > .cp-select { flex: 1 1 100%; }
  .cp-card-head-actions { margin-left: 0; width: 100%; }
  .cp-card-head-actions > .cp-btn { flex: 1; }
  .cp-player-actions { width: 100%; }
  .cp-player-actions > .cp-btn { flex: 1 1 auto; }
  .cp-meta { grid-template-columns: 1fr 1fr; gap: 14px 16px; padding: 14px; }
  .cp-dialog { padding: 22px; }
  .cp-dialog-actions > .cp-btn { flex: 1; }
}

@media (max-width: 340px) {
  .cp-meta { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .cp-backdrop, .cp-dialog, .cp-toast { animation: none; }
}

.selection\:bg-red-500\/30 *::-moz-selection {
  background-color: rgb(239 68 68 / 0.3);
}

.selection\:bg-red-500\/30 *::selection {
  background-color: rgb(239 68 68 / 0.3);
}

.selection\:text-white *::-moz-selection {
  --tw-text-opacity: 1;
  color: rgb(255 255 255 / var(--tw-text-opacity, 1));
}

.selection\:text-white *::selection {
  --tw-text-opacity: 1;
  color: rgb(255 255 255 / var(--tw-text-opacity, 1));
}

.selection\:bg-red-500\/30::-moz-selection {
  background-color: rgb(239 68 68 / 0.3);
}

.selection\:bg-red-500\/30::selection {
  background-color: rgb(239 68 68 / 0.3);
}

.selection\:text-white::-moz-selection {
  --tw-text-opacity: 1;
  color: rgb(255 255 255 / var(--tw-text-opacity, 1));
}

.selection\:text-white::selection {
  --tw-text-opacity: 1;
  color: rgb(255 255 255 / var(--tw-text-opacity, 1));
}
