

:root {
  --bg: #0a0a0f;
  --bg-secondary: #111118;
  --surface: rgba(20, 20, 35, 0.65);
  --surface-border: rgba(255, 255, 255, 0.06);
  --text: #e0e0e0;
  --text-muted: #888;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-glow: rgba(59, 130, 246, 0.3);
  --red: #ef4444;
  --green: #22c55e;
  --green-yellow: #a3e635;
  --yellow: #eab308;
  --yellow-red: #f97316;
  --popular-yellow: #f59e0b;
  --toast-bg: rgba(20, 20, 35, 0.95);
  --star-color: #f59e0b;
  --nav-bg: rgba(18, 18, 30, 0.7);
  --tube-bg: rgba(22, 22, 40, 0.55);
  --tube-hover: rgba(30, 30, 55, 0.7);
  --btn-bg: rgba(59, 130, 246, 0.15);
  --btn-border: rgba(59, 130, 246, 0.3);
  --accent-soft: rgba(59, 130, 246, 0.16);
  --warn-red: #ff4d4d;
  --modal-bg: rgba(18, 18, 35, 0.95);
  --transition-speed: 0.4s;
}

body.theme-red {
  --bg: #0f0a0a;
  --bg-secondary: #180f0f;
  --surface: rgba(35, 15, 15, 0.65);
  --surface-border: rgba(255, 80, 80, 0.08);
  --text: #e8d0d0;
  --text-muted: #997777;
  --accent: #ef4444;
  --accent-hover: #dc2626;
  --accent-glow: rgba(239, 68, 68, 0.3);
  --toast-bg: rgba(35, 15, 15, 0.95);
  --nav-bg: rgba(30, 12, 12, 0.7);
  --tube-bg: rgba(35, 15, 15, 0.55);
  --tube-hover: rgba(50, 20, 20, 0.7);
  --btn-bg: rgba(239, 68, 68, 0.15);
  --btn-border: rgba(239, 68, 68, 0.3);
  --accent-soft: rgba(239, 68, 68, 0.16);
  --modal-bg: rgba(25, 10, 10, 0.95);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-weight: 500;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background var(--transition-speed), color var(--transition-speed);
  overflow-x: hidden;
}

img, svg {
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 20%, var(--accent-glow) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 70%, rgba(139, 92, 246, 0.1) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
  transition: background var(--transition-speed);
}

.brand-area {
  position: fixed;
  top: 1.2rem;
  left: 1.2rem;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.brand-logo {
  height: 52px;
  width: 52px;
  object-fit: cover;
  border-radius: 10px;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}
.brand-text {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  color: var(--text);
  transition: color var(--transition-speed);
}
.brand-labels {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.18rem;
}
.brand-slogan {
  display: block;
  font-family: 'Bebas Neue', 'Inter', sans-serif;
  font-weight: 400;
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  line-height: 1.05;
  max-width: 22rem;
  color: var(--text);
  opacity: 0.5;
  transition: opacity var(--transition-speed);
}
.theme-toggle {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--surface-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text);
  flex-shrink: 0;
}
.theme-toggle:hover {
  transform: scale(1.08);
  border-color: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow);
}
.theme-icon { transition: opacity 0.3s, transform 0.3s; }
.theme-icon.sun { opacity: 1; transform: rotate(0); }
.theme-icon.moon { opacity: 0; transform: rotate(-90deg); position: absolute; }
body.theme-red .theme-icon.sun { opacity: 0; transform: rotate(90deg); }
body.theme-red .theme-icon.moon { opacity: 1; transform: rotate(0); }

.navbar {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 900;
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  padding: 0.45rem 0.6rem;
  transition: all var(--transition-speed);
}
.nav-tabs { display: flex; gap: 0.3rem; }

.site-ver {
  position: fixed;
  right: 0.6rem;
  bottom: 0.5rem;
  z-index: 4000;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  opacity: 0.5;
  pointer-events: none;
  user-select: none;
}
.nav-tab {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.nav-tab:hover { color: var(--text); background: var(--btn-bg); }
.nav-tab.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}
.nav-version {
  display: block;
  text-align: right;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.5rem;
  color: var(--text-muted);
  opacity: 0.12;
  letter-spacing: 0.06em;
  margin-top: 0.2rem;
  padding-right: 0.2rem;
}

.main-content {
  position: relative;
  z-index: 1;
  padding: 6rem 2rem 3rem;
  max-width: 900px;
  margin: 0 auto;
}
.tab-content { display: none; animation: fadeSlideIn 0.4s ease; }
.tab-content.active { display: block; }

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.servers-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.continent-tube {
  background: var(--tube-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.35s ease;
  cursor: pointer;
}
.continent-tube:hover {
  background: var(--tube-hover);
  border-color: rgba(255,255,255,0.12);
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.continent-tube.expanded {
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}

.tube-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.9rem 1.2rem;
  user-select: none;
}
.tube-name {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
}
.tube-arrow {
  transition: transform 0.35s ease;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.continent-tube.expanded .tube-arrow { transform: rotate(180deg); }

.tube-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.continent-tube.expanded .tube-body { max-height: 1000px; }

.tube-stats-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.2rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 1px solid var(--surface-border);
}
.tube-stats-bar img {
  width: 16px;
  height: 16px;
  opacity: 0.6;
}

.server-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 1.2rem;
  border-top: 1px solid var(--surface-border);
  transition: background 0.2s;
  position: relative;
}
.server-row:hover { background: rgba(255,255,255,0.03); }

.server-flag-img {
  width: 22px;
  height: auto;
  border-radius: 2px;
  flex-shrink: 0;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}
.server-name {
  flex: 1;
  font-size: 0.85rem;
  font-weight: 600;
}
.server-name .city {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.78rem;
}

.popular-tag {
  display: inline-flex;
  align-items: center;
  background: var(--popular-yellow);
  color: #000;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 20px;
  letter-spacing: 0.02em;
  margin-left: 0.4rem;
  vertical-align: middle;
  animation: popularPulse 2s ease-in-out infinite;
}
@keyframes popularPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
}

.ping-bars {
  display: flex;
  gap: 2px;
  align-items: flex-end;
  height: 18px;
  flex-shrink: 0;
}
.ping-bar {
  width: 4px;
  border-radius: 2px;
}
.ping-bar:nth-child(1) { height: 6px; }
.ping-bar:nth-child(2) { height: 9px; }
.ping-bar:nth-child(3) { height: 12px; }
.ping-bar:nth-child(4) { height: 15px; }
.ping-bar:nth-child(5) { height: 18px; }

.ping-bars.excellent .ping-bar,
.ping-bars.excellent .ping-bar:nth-child(1),
.ping-bars.excellent .ping-bar:nth-child(2),
.ping-bars.excellent .ping-bar:nth-child(3),
.ping-bars.excellent .ping-bar:nth-child(4),
.ping-bars.excellent .ping-bar:nth-child(5) { background: var(--green) !important; }

.ping-bars.good .ping-bar:nth-child(1),
.ping-bars.good .ping-bar:nth-child(2),
.ping-bars.good .ping-bar:nth-child(3),
.ping-bars.good .ping-bar:nth-child(4) { background: var(--green-yellow) !important; }
.ping-bars.good .ping-bar:nth-child(5) { background: rgba(255,255,255,0.06) !important; }

.ping-bars.ok .ping-bar:nth-child(1),
.ping-bars.ok .ping-bar:nth-child(2),
.ping-bars.ok .ping-bar:nth-child(3) { background: var(--yellow) !important; }
.ping-bars.ok .ping-bar:nth-child(4),
.ping-bars.ok .ping-bar:nth-child(5) { background: rgba(255,255,255,0.06) !important; }

.ping-bars.poor .ping-bar:nth-child(1),
.ping-bars.poor .ping-bar:nth-child(2) { background: var(--yellow-red) !important; }
.ping-bars.poor .ping-bar:nth-child(3),
.ping-bars.poor .ping-bar:nth-child(4),
.ping-bars.poor .ping-bar:nth-child(5) { background: rgba(255,255,255,0.06) !important; }

.ping-bars.bad .ping-bar { background: rgba(255,255,255,0.06) !important; }
.ping-bars.bad .ping-bar:nth-child(1) { background: var(--red) !important; }

.ping-ms {
  font-size: 0.75rem;
  color: var(--text-muted);
  min-width: 44px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.loading-ms { color: rgba(255,255,255,0.25); }
.ms-dot { animation: msDotPulse 1.2s ease-in-out infinite; }
.ms-dot:nth-child(1) { animation-delay: 0s; }
.ms-dot:nth-child(2) { animation-delay: 0.2s; }
.ms-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes msDotPulse {
  0%, 60%, 100% { opacity: 0.2; }
  30% { opacity: 1; }
}

.btn-join {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.4rem 1rem;
  border-radius: 8px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.25s;
  white-space: nowrap;
}
.btn-join:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 14px var(--accent-glow);
  transform: scale(1.04);
}

.values-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 420px;
  margin: 2rem auto;
}
.value-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 2rem 1.5rem;
  border-radius: 18px;
  text-decoration: none;
  transition: all 0.35s ease;
  border: 1px solid var(--surface-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.value-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}
.mm2values-btn {
  background: rgba(30, 30, 45, 0.7);
  color: #d0d0d0;
}
.mm2values-btn:hover {
  border-color: rgba(255,255,255,0.2);
  background: rgba(40, 40, 60, 0.75);
}
.supreme-btn {
  background: rgba(180, 20, 20, 0.2);
  color: #f0c0c0;
  border-color: rgba(239, 68, 68, 0.25);
}
.supreme-btn:hover {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(180, 20, 20, 0.3);
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.2);
}
.value-btn-text {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 2rem;
}

.about-container {
  max-width: 600px;
  margin: 2rem auto;
  text-align: center;
}
.about-container h2 {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 1.8rem;
  margin-bottom: 1.2rem;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.about-container p {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 0.9rem;
  font-weight: 500;
}
.about-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin: 1.5rem 0;
}
.about-feature {
  font-weight: 600;
  background: var(--surface);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--surface-border);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
}
.about-footer { margin-top: 1.5rem; font-size: 0.85rem; opacity: 0.5; }

.announce-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 640px;
  margin: 0 auto;
}
.announce-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent-soft), rgba(139, 92, 246, 0.06)), var(--surface);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--surface-border);
  border-radius: 18px;
  padding: 1.5rem 1.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}
.announce-badge {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  margin-bottom: 0.8rem;
  box-shadow: 0 0 14px var(--accent-glow);
}
.announce-title {
  font-family: 'Inter', sans-serif;
  font-weight: 900;
  font-size: 1.45rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.announce-text {
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 0.9rem;
  margin-bottom: 0.9rem;
  font-weight: 500;
}
.announce-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.announce-bullets li {
  position: relative;
  padding-left: 1.5rem;
  font-weight: 600;
  font-size: 0.88rem;
}
.announce-bullets li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: -0.05rem;
  color: var(--green);
  font-weight: 800;
}
.announce-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.1rem;
}
.announce-stat {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--surface-border);
  border-radius: 10px;
  padding: 0.35rem 0.8rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}
.announce-stat strong {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 800;
  margin-right: 0.25rem;
  font-variant-numeric: tabular-nums;
}
.btn-join-japan {
  width: 100%;
  max-width: 280px;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  animation: joinPulse 2.4s ease-in-out infinite;
}
@keyframes joinPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 var(--accent-glow); }
  50% { transform: scale(1.035); box-shadow: 0 0 0 14px transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .btn-join-japan { animation: none; }
}

.red-warning {
  color: var(--warn-red);
  font-weight: 700;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
#joinOverlay { z-index: 2600; }
.modal-overlay.show { opacity: 1; pointer-events: auto; }

.modal-window {
  background: var(--modal-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--surface-border);
  border-radius: 20px;
  padding: 2rem;
  max-width: 420px;
  width: 90%;
  text-align: center;
  transform: translateY(-30px) scale(0.94);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.modal-overlay.show .modal-window { transform: translateY(0) scale(1); }
.modal-overlay.closing .modal-window {
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  transition: all 0.25s ease-in;
}

.iframe-overlay { z-index: 3000; }
.iframe-window {
  position: relative;
  max-width: 1100px;
  width: 92%;
  height: 85vh;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-align: left;
  border-radius: 16px;
}
.iframe-window iframe {
  flex: 1;
  width: 100%;
  border: 0;
  background: #fff;
}
.btn-iframe-reload,
.btn-iframe-close {
  position: absolute;
  top: 12px;
  z-index: 10;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}
.btn-iframe-reload { right: 12px; }
.btn-iframe-close { left: 12px; }
.btn-iframe-reload:hover,
.btn-iframe-close:hover { background: rgba(0,0,0,0.85); }

.step-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 1.5rem;
}
.step-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(255,255,255,0.15);
  transition: all 0.4s ease;
}
.step-dot.active {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}
.step-dot.done {
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.3);
}
.step-line {
  width: 40px;
  height: 2px;
  background: rgba(255,255,255,0.1);
  transition: background 0.4s ease;
}
.step-line.done { background: var(--green); }

.join-step { animation: fadeSlideIn 0.35s ease; }

.search-animation { padding: 1.5rem 0; }
.magnifying-glass {
  animation: searchFloat 1.2s ease-in-out infinite;
  color: var(--accent);
  margin-bottom: 1rem;
}
@keyframes searchFloat {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-10px) rotate(5deg); }
}
.search-text {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}
.dots::after {
  content: '';
  animation: dotsAnim 1.4s steps(4, end) infinite;
}
@keyframes dotsAnim {
  0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } 100% { content: ''; }
}
.search-server-name { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }

.found-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.found-check-icon {
  width: 28px; height: 28px;
  -webkit-user-select: none; user-select: none; -webkit-user-drag: none;
}
.found-header h3 { font-family: 'Inter', sans-serif; font-weight: 800; font-size: 1.3rem; }
.found-details {
  background: var(--surface);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.2rem;
}
.found-server-name { font-weight: 700; margin-bottom: 0.3rem; }
.found-players {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.verify-img-glow {
  border: 2px solid rgba(255,255,255,0.12);
  box-shadow: 0 0 20px rgba(255,255,255,0.05);
  transition: all 0.35s ease;
  cursor: pointer;
}
.verify-img-glow:hover {
  border-color: var(--accent);
  box-shadow: 0 0 24px var(--accent-glow);
  transform: scale(1.06);
}

.verify-img {
  max-width: 180px;
  border-radius: 12px;
  margin-bottom: 1rem;
  -webkit-user-select: none; user-select: none; -webkit-user-drag: none;
}
.verify-img-bot { max-width: 150px; }
.verify-text { font-size: 0.95rem; margin-bottom: 0.4rem; line-height: 1.5; font-weight: 500; }
.verify-sub { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 1.2rem; font-weight: 500; }

.btn-primary {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 12px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 20px var(--accent-glow);
  transform: scale(1.03);
}
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-fill-bar {
  width: 100%;
  padding: 0;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}
.btn-fill-bar.filled {
  border-color: var(--accent);
  cursor: pointer;
}
.fill-bar-bg {
  position: absolute;
  inset: 0;
}
.fill-bar-progress {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--accent), rgba(139, 92, 246, 0.7));
  width: 0%;
  border-radius: 12px;
  filter: blur(0.5px);
  transition: width 2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.fill-bar-progress::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.08);
  border-radius: 12px;
}
.btn-label {
  position: relative;
  z-index: 1;
  padding: 0.75rem 2rem;
}

.btn-join-bot { gap: 0.6rem; }
.btn-headshot {
  width: 26px; height: 26px;
  border-radius: 50%;
  object-fit: cover;
  -webkit-user-select: none; user-select: none; -webkit-user-drag: none;
}

.modal-rate h3 { font-family: 'Inter', sans-serif; font-weight: 800; font-size: 1.3rem; margin-bottom: 0.3rem; }
.rate-question { color: var(--text-muted); margin-bottom: 1.2rem; font-weight: 500; }
.stars-container { display: flex; justify-content: center; gap: 0.5rem; margin-bottom: 1.5rem; }
.star {
  background: none; border: none;
  font-size: 2.4rem;
  color: rgba(255,255,255,0.15);
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}
.star:hover { transform: scale(1.15); }
.star.active { color: var(--star-color); }
.star.active:hover { transform: scale(1.08); }
.btn-rate-submit { min-width: 120px; }

.toast-container {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--toast-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--surface-border);
  padding: 0.75rem 1.4rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  animation: toastIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
             toastOut 0.35s ease 1.8s forwards;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
  pointer-events: auto;
}
.toast .toast-icon {
  width: 20px; height: 20px;
  flex-shrink: 0;
  -webkit-user-select: none; user-select: none; -webkit-user-drag: none;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-20px) scale(0.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(-10px) scale(0.9); }
}

::-webkit-scrollbar { width: 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); }

::selection { background: var(--accent); color: #fff; }

.hidden { display: none !important; }

@media (max-width: 480px) {

  
  .brand-area { top: 0.7rem; left: 0.7rem; gap: 0.4rem; }
  .brand-logo { height: 36px; width: 36px; }
  .brand-text { display: none; }
  .brand-slogan { display: none; }
  .theme-toggle { width: 28px; height: 28px; border-radius: 8px; }

  
  .navbar { top: 0.6rem; right: 0.6rem; }
  .nav-inner { padding: 0.3rem 0.35rem; gap: 0.25rem; border-radius: 10px; }
  .nav-tab { padding: 0.35rem 0.6rem; font-size: 0.75rem; border-radius: 7px; }

  
  .main-content { padding: 4.5rem 0.7rem 2rem; max-width: 100%; }

  
  .servers-list { gap: 0.5rem; }

  
  .continent-tube { border-radius: 12px; }
  .tube-header { padding: 0.65rem 0.8rem; gap: 0.4rem; }
  .tube-name { font-size: 0.82rem; }

  
  .tube-stats-bar { padding: 0.4rem 0.8rem; font-size: 0.7rem; gap: 0.25rem; }
  .tube-stats-bar img { width: 13px; height: 13px; }

  
  .server-row { padding: 0.5rem 0.8rem; gap: 0.4rem; flex-wrap: wrap; }
  .server-flag-img { width: 18px; }
  .server-name { font-size: 0.75rem; }
  .server-name .city { font-size: 0.68rem; }
  .popular-tag { font-size: 0.5rem; padding: 0.1rem 0.35rem; margin-left: 0.25rem; }

  
  .ping-bars { height: 14px; gap: 1px; }
  .ping-bar { width: 3px; }
  .ping-bar:nth-child(1) { height: 5px; }
  .ping-bar:nth-child(2) { height: 7px; }
  .ping-bar:nth-child(3) { height: 9px; }
  .ping-bar:nth-child(4) { height: 11px; }
  .ping-bar:nth-child(5) { height: 14px; }
  .ping-ms { font-size: 0.68rem; min-width: 36px; }

  
  .btn-join { padding: 0.3rem 0.6rem; font-size: 0.7rem; border-radius: 6px; }

  
  .values-container { max-width: 100%; margin: 1rem auto; gap: 1rem; }
  .value-btn { padding: 1.5rem 1rem; border-radius: 14px; }
  .value-btn-text { font-size: 1.6rem; }

  
  .about-container { padding: 0 0.5rem; }
  .about-container h2 { font-size: 1.4rem; }
  .about-container p { font-size: 0.85rem; }
  .about-features { gap: 0.4rem; }
  .about-feature { font-size: 0.72rem; padding: 0.35rem 0.7rem; }

  
  .modal-window { max-width: 92%; padding: 1.5rem; border-radius: 14px; }
  .verify-img { max-width: 130px; }
  .verify-img-bot { max-width: 110px; }
  .found-header h3 { font-size: 1.1rem; }
  .search-text { font-size: 0.95rem; }
  .btn-primary { padding: 0.6rem 1.5rem; font-size: 0.9rem; }

  
  .star { font-size: 1.8rem; }

  
  .toast { font-size: 0.78rem; padding: 0.6rem 1rem; }
  .toast .toast-icon { width: 16px; height: 16px; }

  
  .announce-list { max-width: 100%; }
  .announce-card { padding: 1.1rem 0.9rem; border-radius: 14px; }
  .announce-title { font-size: 1.2rem; }
  .announce-text { font-size: 0.82rem; }
  .announce-bullets li { font-size: 0.82rem; }
  .announce-stats { gap: 0.5rem; }
  .announce-stat { font-size: 0.72rem; padding: 0.3rem 0.7rem; }
  .btn-join-japan { max-width: 100%; font-size: 0.85rem; }
}

.ripple {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  width: 8px;
  height: 8px;
  transform: translate(-50%, -50%) scale(0);
  animation: rippleOut 0.5s ease-out forwards;
}
@keyframes rippleOut {
  to { transform: translate(-50%, -50%) scale(2); opacity: 0; }
}

.swap-container {
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 1.1rem;
}
.swap-panel {
  flex: 1 1 0;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 18px;
  padding: 1.1rem;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.swap-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}
.swap-panel-title {
  font-family: 'Bebas Neue', 'Inter', sans-serif;
  font-weight: 400;
  font-size: 1.45rem;
  letter-spacing: 0.1em;
  color: var(--text);
}
.swap-total {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color 0.3s;
}
.swap-total.ok { color: var(--green); }

.swap-slots {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.7rem;
}
.swap-slot {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  border: 2px dashed var(--surface-border);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.45rem;
  overflow: hidden;
  transition: all 0.25s;
  font-family: 'Inter', sans-serif;
}
.swap-slot:hover { border-color: var(--accent); background: var(--accent-soft); transform: scale(1.03); }
.swap-slot .slot-plus { font-size: 2.2rem; font-weight: 800; color: var(--text-muted); line-height: 1; transition: color 0.25s; }
.swap-slot.empty:hover .slot-plus { color: var(--accent); }
.swap-slot.filled { border-style: solid; border-color: var(--accent-glow); background: var(--accent-soft); }
.swap-slot.filled img {
  width: 52%;
  height: 52%;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}
.swap-slot .slot-name {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  line-height: 1.15;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.swap-slot .slot-value { font-size: 0.78rem; font-weight: 800; color: #4fc3f7; }

.swap-trade {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  flex: 0 0 auto;
  min-width: 120px;
}
.swap-arrows {
  font-size: 2.5rem;
  line-height: 1;
  color: var(--accent);
  text-shadow: 0 0 24px var(--accent-glow);
  animation: swapPulse 2.4s ease-in-out infinite;
}
@keyframes swapPulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.12); opacity: 1; }
}
.btn-swap { width: 100%; padding: 0.85rem 1.3rem; font-size: 1rem; letter-spacing: 0.12em; }
.btn-swap.ready { box-shadow: 0 0 26px var(--accent-glow); }
.swap-hint {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 130px;
  line-height: 1.4;
}
.swap-container.shake { animation: swapShake 0.45s ease; }
@keyframes swapShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

.selector-window {
  max-width: none;
  width: min(860px, 94vw);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  text-align: left;
}
.selector-head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.1rem 0.1rem 0.9rem;
  flex: 0 0 auto;
}
.selector-title {
  font-family: 'Bebas Neue', 'Inter', sans-serif;
  font-weight: 400;
  font-size: 1.4rem;
  letter-spacing: 0.06em;
  flex: 1;
  min-width: 0;
}
.selector-search {
  flex: 0 1 240px;
  min-width: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--surface-border);
  color: var(--text);
  border-radius: 10px;
  padding: 0.55rem 0.9rem;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.25s;
}
.selector-search:focus { border-color: var(--accent); }
.selector-search::placeholder { color: var(--text-muted); }
.selector-close {
  flex: 0 0 auto;
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  color: var(--text);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.25s;
}
.selector-close:hover { background: var(--accent); color: #fff; }
.selector-grid {
  flex: 1 1 auto;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 0.6rem;
  padding-right: 0.3rem;
}
.selector-cell {
  background: var(--bg-secondary);
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.6rem 0.4rem;
  transition: all 0.2s;
  font-family: inherit;
}
.selector-cell:hover { border-color: var(--accent); transform: translateY(-2px); }
.selector-cell img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}
.cell-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  line-height: 1.2;
  min-height: 1.9em;
  display: flex;
  align-items: center;
  justify-content: center;
  word-break: break-word;
}
.cell-value { font-size: 0.78rem; font-weight: 800; color: #4fc3f7; }
.selector-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  padding: 2rem 0;
  font-size: 0.9rem;
}

@media (max-width: 700px) {
  .swap-container { flex-direction: row; gap: 0.45rem; }
  .swap-panel { padding: 0.55rem; border-radius: 12px; }
  .swap-panel-head { flex-direction: column; align-items: flex-start; gap: 0.15rem; margin-bottom: 0.5rem; }
  .swap-panel-title { font-size: 0.85rem; letter-spacing: 0.05em; }
  .swap-total { font-size: 0.78rem; }
  .swap-slots { grid-template-columns: 1fr; gap: 0.4rem; }
  .swap-slot { aspect-ratio: auto; min-height: 62px; padding: 0.35rem; gap: 0.1rem; border-radius: 10px; }
  .swap-slot .slot-plus { font-size: 1.4rem; }
  .swap-slot.filled img { width: 32px; height: 32px; }
  .swap-slot .slot-name { font-size: 0.58rem; }
  .swap-slot .slot-value { font-size: 0.64rem; }
  .swap-trade { flex-direction: column; min-width: 0; width: 46px; gap: 0.5rem; }
  .swap-arrows { font-size: 1.15rem; }
  .btn-swap { padding: 0.5rem 0.15rem; font-size: 0.66rem; letter-spacing: 0.04em; border-radius: 8px; }
  .slot-minus, .slot-plus { width: 26px; height: 26px; font-size: 1.05rem; }
  .slot-qty { font-size: 0.72rem; min-width: 20px; }
  .slot-x { width: 18px; height: 18px; font-size: 0.75rem; top: 2px; right: 2px; }
}

.tier-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.55rem;
  padding: 0.3rem 0.2rem 0.05rem;
}
.tier-header:first-child { margin-top: 0; }
.tier-name {
  font-family: 'Bebas Neue', 'Inter', sans-serif;
  font-weight: 400;
  font-size: 1.05rem;
  letter-spacing: 0.09em;
  color: var(--text-muted);
}
.tier-count {
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--text-muted);
  opacity: 0.75;
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  border-radius: 999px;
  padding: 0.05rem 0.5rem;
}

.btn-selector-sort {
  flex: 0 0 auto;
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  color: var(--text);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  font-size: 0.76rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.25s;
  white-space: nowrap;
}
.btn-selector-sort:hover { background: var(--accent); color: #fff; }

.selector-cell.cat-godly {
  background: linear-gradient(150deg, rgba(236, 72, 153, 0.13), rgba(139, 92, 246, 0.15));
  border-color: rgba(217, 70, 239, 0.22);
}
.selector-cell.cat-godly .cell-name { color: #e9a8f2; text-shadow: 0 0 10px rgba(217, 70, 239, 0.35); }

.selector-cell.cat-chroma {
  background: linear-gradient(120deg,
    rgba(255, 80, 80, 0.10), rgba(255, 180, 60, 0.08), rgba(255, 240, 80, 0.07),
    rgba(80, 220, 120, 0.08), rgba(80, 160, 255, 0.10), rgba(160, 90, 255, 0.10));
  border-color: rgba(255, 255, 255, 0.20);
}
.selector-cell.cat-chroma .cell-name {
  background: linear-gradient(90deg, #ff7b7b, #ffc85c, #ffe86b, #7be08f, #7db9ff, #c58bff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.28));
}

.selector-cell.cat-ancient {
  background: linear-gradient(150deg, rgba(88, 28, 135, 0.38), rgba(30, 58, 138, 0.40));
  border-color: rgba(124, 58, 237, 0.45);
}
.selector-cell.cat-ancient .cell-name { color: #c4b5fd; text-shadow: 0 0 10px rgba(124, 58, 237, 0.6); }

.selector-cell.cat-unique {
  background: linear-gradient(150deg, rgba(234, 88, 12, 0.28), rgba(250, 204, 21, 0.13));
  border-color: rgba(234, 88, 12, 0.42);
}
.selector-cell.cat-unique .cell-name { color: #fcd34d; text-shadow: 0 0 10px rgba(234, 88, 12, 0.55); }

.swap-slot.filled.cat-godly { background: linear-gradient(150deg, rgba(236, 72, 153, 0.10), rgba(139, 92, 246, 0.12)); }
.swap-slot.filled.cat-chroma {
  background: linear-gradient(120deg,
    rgba(255, 80, 80, 0.08), rgba(255, 180, 60, 0.06), rgba(255, 240, 80, 0.05),
    rgba(80, 220, 120, 0.06), rgba(80, 160, 255, 0.08), rgba(160, 90, 255, 0.08));
}
.swap-slot.filled.cat-ancient { background: linear-gradient(150deg, rgba(88, 28, 135, 0.28), rgba(30, 58, 138, 0.30)); }
.swap-slot.filled.cat-unique { background: linear-gradient(150deg, rgba(234, 88, 12, 0.20), rgba(250, 204, 21, 0.10)); }

.swap-slot.filled.cat-godly .slot-name { color: #e9a8f2; text-shadow: 0 0 8px rgba(217, 70, 239, 0.35); }
.swap-slot.filled.cat-chroma .slot-name {
  background: linear-gradient(90deg, #ff7b7b, #ffc85c, #ffe86b, #7be08f, #7db9ff, #c58bff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.swap-slot.filled.cat-ancient .slot-name { color: #c4b5fd; text-shadow: 0 0 8px rgba(124, 58, 237, 0.6); }
.swap-slot.filled.cat-unique .slot-name { color: #fcd34d; text-shadow: 0 0 8px rgba(234, 88, 12, 0.55); }

.swap-slot.filled img { width: 40%; height: 40%; }

.slot-x {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--surface-border);
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 2;
}
.slot-x:hover { background: var(--red); color: #fff; border-color: transparent; }

.slot-stepper { display: flex; align-items: center; gap: 0.35rem; margin-top: 0.1rem; }
.slot-minus, .slot-plus {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-family: inherit;
  padding: 0;
}
.slot-minus:hover, .slot-plus:hover { background: var(--accent); color: #fff; }
.slot-qty { font-size: 0.78rem; font-weight: 800; color: var(--text); min-width: 26px; text-align: center; }

body.theme-aurora {
  --bg: #04060f;
  --bg-secondary: #070b1a;
  --surface: rgba(8, 14, 30, 0.7);
  --surface-border: rgba(110, 231, 183, 0.12);
  --text: #d9e8f0;
  --text-muted: #7c94a8;
  --accent: #2dd4bf;
  --accent-hover: #14b8a6;
  --accent-glow: rgba(45, 212, 191, 0.22);
  --toast-bg: rgba(8, 14, 30, 0.95);
  --nav-bg: rgba(6, 10, 24, 0.7);
  --tube-bg: rgba(10, 16, 34, 0.55);
  --tube-hover: rgba(16, 26, 52, 0.7);
  --btn-bg: rgba(45, 212, 191, 0.12);
  --btn-border: rgba(45, 212, 191, 0.28);
  --accent-soft: rgba(45, 212, 191, 0.14);
  --modal-bg: rgba(6, 12, 26, 0.95);
}

body.theme-aurora::before {
  background:
    radial-gradient(ellipse at 12% 22%, rgba(34, 211, 238, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse at 82% 68%, rgba(139, 92, 246, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse at 65% 15%, rgba(52, 211, 153, 0.18) 0%, transparent 50%),
    radial-gradient(ellipse at 30% 85%, rgba(56, 189, 248, 0.14) 0%, transparent 55%);
  animation: auroraDrift 18s ease-in-out infinite alternate;
}

@keyframes auroraDrift {
  0% { transform: translate3d(-2%, -1%, 0) scale(1); }
  50% { transform: translate3d(2%, 2%, 0) scale(1.08); }
  100% { transform: translate3d(-1%, 1%, 0) scale(1.02); }
}

body.theme-aurora::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 18%, rgba(255, 255, 255, 0.7) 50%, transparent 51%),
    radial-gradient(1px 1px at 34% 62%, rgba(255, 255, 255, 0.5) 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 56% 28%, rgba(200, 230, 255, 0.55) 50%, transparent 51%),
    radial-gradient(1px 1px at 71% 78%, rgba(255, 255, 255, 0.45) 50%, transparent 51%),
    radial-gradient(1.1px 1.1px at 88% 14%, rgba(255, 255, 255, 0.6) 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 45% 88%, rgba(220, 240, 255, 0.5) 50%, transparent 51%),
    radial-gradient(1px 1px at 8% 72%, rgba(255, 255, 255, 0.4) 50%, transparent 51%),
    radial-gradient(1.3px 1.3px at 64% 46%, rgba(255, 255, 255, 0.5) 50%, transparent 51%);
  background-size: 260px 260px, 320px 320px, 300px 300px, 280px 280px, 340px 340px, 310px 310px, 270px 270px, 330px 330px;
  opacity: 0.55;
  animation: starTwinkle 6s ease-in-out infinite alternate;
}

@keyframes starTwinkle {
  from { opacity: 0.35; }
  to { opacity: 0.7; }
}

body.theme-aurora .theme-icon.sun { opacity: 0; transform: rotate(90deg); }
body.theme-aurora .theme-icon.moon { opacity: 0; transform: rotate(-90deg); }

@media (max-width: 480px) {
  .brand-area { flex-direction: column; align-items: flex-start; gap: 0.3rem; }
  .theme-toggle { margin-top: 0.1rem; }
}

.theme-icon.aurora { opacity: 0; transform: rotate(-90deg); position: absolute; }
body.theme-aurora .theme-icon.aurora { opacity: 1; transform: rotate(0); }

body.theme-aurora .btn-primary,
body.theme-aurora .btn-join,
body.theme-aurora .btn-join-server,
body.theme-aurora .btn-join-bot,
body.theme-aurora .btn-rate-submit,
body.theme-aurora .btn-selector-sort,
body.theme-aurora .selector-close,
body.theme-aurora .nav-tab,
body.theme-aurora .slot-minus,
body.theme-aurora .slot-plus,
body.theme-aurora .slot-qty {
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.85), 0 1px 2px rgba(0, 0, 0, 0.7);
}

.slot-stepper {
  position: absolute;
  top: 3px;
  left: 3px;
  display: flex;
  align-items: center;
  gap: 2px;
  z-index: 2;
  margin-top: 0;
}
.slot-qty {
  font-size: 0.62rem;
  font-weight: 800;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--surface-border);
  border-radius: 999px;
  padding: 0.05rem 0.4rem;
  line-height: 1.25;
  min-width: 0;
  text-align: center;
}
.slot-minus, .slot-plus { width: 16px; height: 16px; font-size: 0.72rem; }
.slot-x { width: 18px; height: 18px; font-size: 0.72rem; }

@media (max-width: 700px) {
  .slot-minus, .slot-plus { width: 22px; height: 22px; font-size: 0.9rem; }
  .slot-qty { font-size: 0.6rem; }
  .slot-x { width: 20px; height: 20px; font-size: 0.78rem; }
}

.values-wrap { max-width: 920px; margin: 0 auto; }
.values-head { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.values-title { font-family: 'Bebas Neue', 'Inter', sans-serif; font-weight: 400; font-size: 1.8rem; letter-spacing: 0.12em; color: var(--text); }
.values-search { flex: 1 1 180px; max-width: 300px; }
.btn-values-swap { flex: 0 0 auto; }
.values-grid { overflow: visible; flex: none; }

.detail-window { position: relative; width: min(430px, 94vw); max-width: none; text-align: center; padding-top: 1.7rem; }
.detail-close { position: absolute; top: 10px; right: 10px; }
.detail-img { width: 150px; height: 150px; object-fit: contain; filter: drop-shadow(0 8px 26px rgba(0, 0, 0, 0.55)); }
.detail-name { font-family: 'Bebas Neue', 'Inter', sans-serif; font-weight: 400; font-size: 1.9rem; letter-spacing: 0.06em; color: var(--text); margin-top: 0.6rem; }
.detail-value { display: block; font-size: 1.15rem; font-weight: 800; color: #4fc3f7; margin: 0.2rem 0 0.9rem; }
.detail-desc { color: var(--text-muted); font-size: 0.92rem; line-height: 1.6; margin-bottom: 1.2rem; }
.btn-detail-swap { width: 100%; }
.detail-window.cat-godly .detail-name { color: #e9a8f2; text-shadow: 0 0 10px rgba(217, 70, 239, 0.35); }
.detail-window.cat-chroma .detail-name {
  background: linear-gradient(90deg, #ff7b7b, #ffc85c, #ffe86b, #7be08f, #7db9ff, #c58bff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.detail-window.cat-ancient .detail-name { color: #c4b5fd; text-shadow: 0 0 12px rgba(124, 58, 237, 0.6); }
.detail-window.cat-unique .detail-name { color: #fcd34d; text-shadow: 0 0 12px rgba(234, 88, 12, 0.55); }

@media (max-width: 480px) {
  .values-title { font-size: 1.35rem; }
  .values-head { gap: 0.4rem; }
  .btn-values-swap { padding: 0.5rem 0.9rem; font-size: 0.8rem; }
  .detail-img { width: 120px; height: 120px; }
  .detail-name { font-size: 1.5rem; }
}

.swap-slot .slot-plus { font-size: 1.2rem; font-weight: 300; line-height: 1; }
.swap-slot.empty:hover .slot-plus { color: var(--accent); }
.slot-stepper { flex-direction: column; gap: 2px; top: 3px; left: 3px; }
.slot-qty { padding: 0.02rem 0.35rem; }
@media (max-width: 700px) {
  .swap-slot .slot-plus { font-size: 1rem; }
  .slot-stepper { gap: 2px; }
}

.site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 1rem 1rem 1.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  opacity: 0.85;
  letter-spacing: 0.03em;
}

.svu-window { position: relative; width: min(430px, 94vw); max-width: none; text-align: center; padding-top: 1.7rem; }
.svu-close { position: absolute; top: 10px; right: 10px; }
.svu-title { font-family: 'Bebas Neue', 'Inter', sans-serif; font-weight: 400; font-size: 1.7rem; letter-spacing: 0.06em; color: var(--text); margin-bottom: 0.4rem; }
.svu-sub { color: var(--text-muted); font-size: 0.9rem; line-height: 1.5; margin-bottom: 1.1rem; }
.svu-search-row { display: flex; gap: 0.5rem; justify-content: center; }
.svu-input { flex: 1 1 auto; max-width: 280px; text-align: center; }
.svu-search-btn { flex: 0 0 auto; padding: 0.6rem 1.2rem; }
.svu-loading { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.8rem; }
.svu-error { color: var(--red); font-size: 0.85rem; font-weight: 700; margin-top: 0.8rem; min-height: 1.1em; }
.svu-card { display: flex; flex-direction: column; align-items: center; gap: 0.7rem; padding: 1.2rem; background: var(--bg-secondary); border: 1px solid var(--surface-border); border-radius: 16px; margin-bottom: 1.1rem; }
.svu-headshot { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; border: 3px solid var(--accent); box-shadow: 0 0 24px var(--accent-glow); }
.svu-display { font-size: 1.15rem; font-weight: 800; color: var(--text); }
.svu-name { font-size: 0.85rem; color: var(--text-muted); }
.svu-actions { display: flex; gap: 0.6rem; justify-content: center; }
.svu-no { flex: 0 0 auto; padding: 0.6rem 1.2rem; font-size: 0.9rem; }
.svu-yes { flex: 0 0 auto; padding: 0.6rem 1.2rem; font-size: 0.9rem; }
.svu-check { width: 54px; height: 54px; margin-bottom: 0.4rem; }
.svu-done { width: 100%; }
@media (max-width: 480px) {
  .svu-title { font-size: 1.35rem; }
  .svu-headshot { width: 90px; height: 90px; }
  .svu-actions { flex-direction: column; }
}

.selector-head .selector-search { flex: 1 1 200px; max-width: none; }

.ticket-window { position: relative; width: min(420px, 94vw); max-width: none; text-align: center; padding-top: 1.7rem; }
.ticket-logo { width: 64px; height: 64px; object-fit: cover; border-radius: 14px; box-shadow: 0 0 24px var(--accent-glow); margin-bottom: 0.7rem; }
.ticket-title { margin-bottom: 0.25rem; }
.ticket-loading { color: var(--text-muted); font-size: 0.95rem; margin: 0.9rem 0; min-height: 1.4em; }
.ticket-code-wrap { margin: 1rem 0 1.1rem; }
.ticket-code {
  display: inline-block;
  font-family: 'Bebas Neue', 'Inter', sans-serif;
  font-size: 2.2rem;
  letter-spacing: 0.1em;
  color: var(--text);
  background: var(--bg-secondary);
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  padding: 0.45rem 1.4rem;
  margin-bottom: 0.6rem;
  box-shadow: 0 0 22px var(--accent-glow);
}
.ticket-expire { font-size: 0.78rem; margin-top: 0.4rem; }
.ticket-next { width: 100%; }
.ticket-next:disabled { opacity: 0.45; cursor: not-allowed; }


.swap-remove-hint {
  font-size: 0.62rem;
  color: var(--text-muted);
  opacity: 0.7;
  text-align: center;
  letter-spacing: 0.02em;
}

.swap-bot-img { max-width: 300px !important; }

.announce-card.collapsible { cursor: pointer; }
.announce-card.collapsible .announce-collapse { display: none; }
.announce-card.collapsible.open .announce-collapse { display: block; }
.announce-card.collapsible .announce-arrow {
  display: inline-block;
  font-size: 0.8em;
  color: var(--text-muted);
  transition: transform 0.3s ease;
  margin-left: 0.3rem;
}
.announce-card.collapsible.open .announce-arrow { transform: rotate(180deg); }

.found-code {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}
.found-code strong {
  color: var(--accent);
  font-family: 'Bebas Neue', 'Inter', sans-serif;
  letter-spacing: 0.06em;
  font-size: 1.05rem;
}

.swap-header { text-align: center; margin-bottom: 1.1rem; }
.swap-heading {
  font-family: 'Bebas Neue', 'Inter', sans-serif;
  font-weight: 400;
  font-size: 2rem;
  letter-spacing: 0.14em;
  color: var(--text);
  text-transform: uppercase;
  text-shadow: 0 0 18px var(--accent-glow);
}
.swap-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
  margin-top: 0.35rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}
.swap-hint { margin-top: 0.15rem; }

@media (max-width: 700px) {
  .swap-heading { font-size: 1.5rem; }
  .swap-desc { font-size: 0.78rem; }
}

.swap-slot.filled img, .selector-cell img, .detail-img { filter: none !important; }
.selector-cell .cell-name, .swap-slot .slot-name, .detail-name { text-shadow: none !important; }
.selector-cell.cat-chroma .cell-name, .swap-slot.cat-chroma .slot-name { filter: none !important; }
.swap-hint, .swap-remove-hint { display: block !important; }

.found-trade { display: flex; align-items: center; justify-content: center; gap: 0.25rem; margin-top: 0.6rem; flex-wrap: wrap; }
.ft-label { font-size: 0.68rem; font-weight: 800; color: var(--text-muted); letter-spacing: 0.05em; margin-right: 0.1rem; }
.ft-item { position: relative; display: inline-flex; }
.ft-item img { width: 30px; height: 30px; object-fit: contain; }
.ft-qty { position: absolute; bottom: -3px; right: -3px; font-size: 0.55rem; font-weight: 800; color: #fff; background: rgba(0, 0, 0, 0.65); border: 1px solid var(--surface-border); border-radius: 999px; padding: 0 0.22rem; line-height: 1.2; }
.ft-arrow { color: var(--accent); font-size: 0.95rem; margin: 0 0.15rem; }
@media (max-width: 480px) {
  .ft-item img { width: 26px; height: 26px; }
}

.selector-cell.no-stock { position: relative; }
.selector-cell.no-stock img { opacity: 0.5; }
.selector-cell.no-stock .cell-name { opacity: 0.6; }
.selector-cell.no-stock .cell-value { opacity: 0.6; }
.no-stock-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(220, 38, 38, 0.5);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0.18rem 0.45rem;
  border-radius: 6px;
  text-shadow: 0 0 2px #000, 0 1px 2px #000, 1px 1px 2px #000;
  z-index: 2;
  pointer-events: none;
}


@media (max-width: 700px) {
  .swap-panel { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .swap-slot { backdrop-filter: none; -webkit-backdrop-filter: none; }
}

.selector-grid { overscroll-behavior: contain; }
@media (hover: none) {
  .selector-cell:hover { transform: none; }
}

.selector-grid { -webkit-overflow-scrolling: touch; touch-action: pan-y; overscroll-behavior: contain; }
.selector-window, .detail-window, .ticket-window, .svu-window { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }

.selector-window { min-height: 0; }
.selector-grid { min-height: 0; max-height: 60vh; }
body.modal-lock { overflow: hidden; }
.modal-overlay {
  overflow-y: auto;          /* let the overlay itself scroll if window is tiny */
  -webkit-overflow-scrolling: touch;
}

.selector-window { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.selector-head { position: sticky; top: 0; z-index: 3; background: var(--modal-bg); }
.selector-grid { overflow: visible; max-height: none; }

#selectorOverlay { align-items: flex-start; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
#selectorOverlay .modal-window { margin: auto; max-height: none; overflow: visible; }

#selectorOverlay { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; touch-action: pan-y; }
.selector-head { position: static; }

.safari-scroll-help { position: fixed; right: 14px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; gap: 12px; z-index: 2500; }
.ss-btn { width: 58px; height: 58px; border-radius: 50%; background: var(--btn-bg); border: 2px solid var(--btn-border); color: var(--text); font-size: 1.5rem; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45); transition: transform 0.15s, background 0.2s; }
.ss-btn:active { background: var(--accent); color: #fff; transform: scale(0.92); }
.ss-hint { writing-mode: vertical-rl; font-size: 0.62rem; font-weight: 700; color: var(--text-muted); letter-spacing: 0.1em; }
