:root {
  --bg: #0b0b10;
  --bg-card: #15151d;
  --border: rgba(34, 211, 238, 0.25);
  --border-glow: #22d3ee;
  --text: #f2f2f5;
  --text-muted: #9a9aa5;
  --accent: #7c3aed;
  --danger: #ef4444;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Poppins', sans-serif;
  line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}

.brand {
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.brand span { color: var(--accent); }
.brand-logo { height: 30px; width: auto; display: block; }

.nav-links { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; row-gap: 6px; }
.nav-links a { color: var(--text-muted); }
.nav-links a:hover { color: var(--text); text-decoration: none; }

.nav-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 8px;
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 8px;
  background: rgba(34, 211, 238, 0.05);
  color: var(--text) !important;
  font-size: 0.74rem;
  font-weight: 600;
  text-decoration: none !important;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.nav-pill:hover {
  border-color: #22d3ee;
  background: rgba(34, 211, 238, 0.12);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.25);
}
.nav-pill { animation: navPillGlow 2.4s ease-in-out infinite alternate; }
.nav-pill:nth-child(2n) { animation-delay: -1.2s; }
@keyframes navPillGlow {
  0%   { box-shadow: 0 0 3px rgba(56,189,248,0.15); border-color: rgba(56,189,248,0.25); }
  100% { box-shadow: 0 0 10px rgba(56,189,248,0.5); border-color: rgba(56,189,248,0.6); }
}
.nav-pill-icon { font-size: 0.9rem; line-height: 1; }
.nav-pill-icon-img { width: 16px; height: 16px; object-fit: cover; border-radius: 4px; vertical-align: middle; }
.nav-pill-accent { border-color: rgba(34, 211, 238, 0.55); background: rgba(34, 211, 238, 0.1); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 8px;
  background: rgba(34, 211, 238, 0.05);
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
  .topnav { position: relative; flex-wrap: nowrap; padding: 10px 14px; }
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 10px 14px 16px;
    box-shadow: 0 14px 28px rgba(0,0,0,0.4);
    z-index: 40;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
  }
  .nav-links.open { display: flex; }
  .nav-links .nav-pill {
    width: 100%;
    justify-content: flex-start;
    padding: 11px 14px;
    font-size: 0.85rem;
    border-radius: 8px;
  }
  .nav-links .lang-dropdown { width: 100%; }
  .nav-links .lang-dropdown-toggle { width: 100%; justify-content: flex-start; }
}

.nav-shop-link { display: inline-flex; align-items: center; gap: 5px; }
.nav-vip-tag {
  background: linear-gradient(135deg, #facc15, #f59e0b);
  color: #1a1400;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  line-height: 1.4;
}

.btn-accent {
  background: var(--accent);
  color: #fff !important;
  padding: 10px 20px;
  border-radius: 999px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  display: inline-block;
  text-decoration: none !important;
}
.btn-accent:hover { opacity: 0.88; }
.btn-lg { padding: 14px 28px; font-size: 1.05rem; }
.btn-block { width: 100%; margin-top: 8px; }

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.btn-danger:hover { background: rgba(239,68,68,0.12); }

.btn-outline {
  background: transparent;
  color: var(--text) !important;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  display: inline-block;
  text-decoration: none !important;
  padding: 10px 20px;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent) !important; }

.btn-sm { padding: 6px 14px !important; font-size: 0.8rem !important; }

.admin-user-list { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-direction: column; gap: 10px; }
.admin-user-card {
  background: #0e0e14; border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; display: flex; flex-direction: column; gap: 10px;
}
.admin-user-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.admin-user-id { font-weight: 700; color: var(--text-muted); font-size: 0.85rem; }
.admin-user-name { font-weight: 600; color: var(--accent) !important; text-decoration: none !important; }
.admin-user-name:hover { text-decoration: underline !important; }
.admin-user-email, .admin-user-views { color: var(--text-muted); font-size: 0.85rem; }
.admin-badge { font-size: 0.75rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.admin-badge-vip { background: rgba(250,204,21,0.15); color: #facc15; }
.admin-badge-rank { background: rgba(124,58,237,0.18); color: #c4b5fd; }
.admin-user-actions {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding-top: 10px; border-top: 1px solid var(--border);
}
.admin-user-actions form { margin: 0; display: flex; align-items: center; gap: 8px; }
.admin-rank-select { max-width: 170px; padding: 6px 10px; font-size: 0.82rem; }

main { max-width: 880px; margin: 0 auto; padding: 40px 24px 40px; }
main.wide { max-width: 1060px; }

.dashboard-layout { display: flex; gap: 24px; align-items: flex-start; justify-content: center; flex-wrap: wrap; }
.dashboard-layout .dashboard { flex: 1 1 480px; }

.phone-preview-wrapper { position: sticky; top: 20px; flex-shrink: 0; }
.phone-mockup {
  width: 280px; height: 580px;
  border: 10px solid #0e0e14;
  border-radius: 36px;
  background: #000;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  overflow: hidden;
  position: relative;
}
.phone-mockup::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 110px; height: 20px;
  background: #0e0e14;
  border-radius: 0 0 14px 14px;
  z-index: 2;
}
.phone-mockup iframe { width: 100%; height: 100%; border: none; display: block; background: #0b0b10; }
.phone-preview-caption {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 10px;
}
.phone-preview-caption span { font-size: 0.78rem; color: var(--text-muted); }
.phone-refresh-btn {
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text);
  padding: 5px 12px; border-radius: 999px; cursor: pointer; font-size: 0.75rem;
}
.phone-refresh-btn:hover { border-color: var(--accent); }

.site-footer {
  text-align: center;
  padding: 24px 16px 32px;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.site-footer a { color: var(--text-muted); text-decoration: underline; }
.site-footer a:hover { color: var(--text); }

.hero { text-align: center; padding: 60px 0 40px; }
.hero h1 { font-size: 2.4rem; margin-bottom: 12px; }
.accent-text { color: var(--accent); }
.hero p { color: var(--text-muted); max-width: 560px; margin: 0 auto 28px; }

.vip-promo { margin-top: 40px; }
.vip-promo-card {
  background: linear-gradient(160deg, rgba(250,204,21,0.08), var(--bg-card));
  border: 1px solid rgba(250,204,21,0.35);
  border-radius: var(--radius);
  padding: 28px;
  animation: vipCardGlow 2.4s ease-in-out infinite alternate;
}
@keyframes vipCardGlow {
  0%   { box-shadow: 0 0 8px rgba(56,189,248,0.25), 0 0 0 1px rgba(56,189,248,0.25) inset; }
  100% { box-shadow: 0 0 28px rgba(56,189,248,0.6), 0 0 0 1px rgba(56,189,248,0.5) inset; }
}
.roulette-card {
  position: relative;
  overflow: hidden;
  animation: vipCardGlow 2.4s ease-in-out infinite alternate;
}
.roulette-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: conic-gradient(from 0deg, rgba(124,58,237,0.28), rgba(34,211,238,0.22), rgba(250,204,21,0.20), rgba(124,58,237,0.28));
  animation: rouletteBgSpin 14s linear infinite;
  z-index: 0;
  filter: blur(46px);
}
.roulette-card > * { position: relative; z-index: 1; }
@keyframes rouletteBgSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .vip-promo-card, .token-promo-card, .leaderboard-list li, .nav-pill,
  .roulette-card, .roulette-card::before,
  .auth-card, .dashboard, .settings-section, .nav-row { animation: none; }
}
.vip-promo-tag {
  display: inline-block;
  background: linear-gradient(135deg, #facc15, #f59e0b);
  color: #1a1400;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 3px 12px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.vip-promo-card h2 { margin: 4px 0 14px; }

.token-promo-card {
  background: linear-gradient(160deg, rgba(34,211,238,0.08), var(--bg-card));
  border: 1px solid rgba(34,211,238,0.35);
  border-radius: var(--radius);
  padding: 28px;
  animation: vipCardGlow 2.4s ease-in-out infinite alternate;
}
.token-promo-tag {
  display: inline-block;
  background: linear-gradient(135deg, #22d3ee, #0891b2);
  color: #062024;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 3px 12px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.vip-perks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.vip-perks li { color: var(--text-muted); font-size: 0.92rem; }
.vip-price { font-size: 1.4rem; font-weight: 700; margin: 16px 0 12px; }

.sys-console {
  background: #08080b;
  border: 1px solid rgba(74,222,128,0.25);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 16px 0 20px;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.8rem;
  box-shadow: 0 0 20px rgba(74,222,128,0.08);
}
.sys-console-header {
  display: flex; align-items: center; justify-content: space-between;
  color: #6b7280;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sys-console-live { display: inline-flex; align-items: center; gap: 5px; color: #4ade80; }
.sys-console-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #4ade80;
  animation: sysConsolePulse 1.4s ease-in-out infinite;
}
@keyframes sysConsolePulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.sys-console-body { color: #86efac; line-height: 1.8; }
.sys-console-body div { opacity: 0.75; }
.sys-console-highlight { opacity: 1 !important; color: #4ade80; font-weight: 600; }

.leaderboard { margin-top: 40px; }
.leaderboard h2 { margin-bottom: 16px; }
.leaderboard-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.leaderboard-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 18px;
  animation: vipCardGlow 2.4s ease-in-out infinite alternate;
}
.leaderboard-list li:nth-child(2n) { animation-delay: -1.2s; }
.leaderboard-list a { display: flex; align-items: center; gap: 12px; color: var(--text); }
.leaderboard-list a:hover { text-decoration: none; color: var(--accent); }
.rank { color: var(--accent); font-weight: 700; width: 32px; }
.lb-user { color: var(--text-muted); }
.lb-views { color: var(--text-muted); font-size: 0.9rem; }
.lb-rank { color: #facc15; font-size: 0.78rem; font-weight: 600; }
.muted { color: var(--text-muted); }

.auth-card, .dashboard {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 460px;
  margin: 0 auto;
  animation: vipCardGlow 2.4s ease-in-out infinite alternate;
}
.dashboard { max-width: 640px; }

.auth-card h1, .dashboard h1 { margin-top: 0; }

form label { display: block; margin: 16px 0 6px; font-size: 0.9rem; color: var(--text-muted); }
form input[type="text"],
form input[type="password"],
form input[type="url"],
form textarea,
form select {
  width: 100%;
  background: #0e0e14;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
}
form input[type="color"] {
  width: 60px; height: 40px; border: 1px solid var(--border);
  border-radius: 8px; background: transparent; cursor: pointer;
}
form textarea { resize: vertical; }
.hint { font-size: 0.8rem; color: var(--text-muted); margin: 4px 0 0; }

.url-preview { margin: 6px 0 0; }
.url-preview-media {
  max-width: 160px; max-height: 90px;
  border-radius: 8px; border: 1px solid var(--border);
  display: block; object-fit: cover;
}
.url-preview-error { font-size: 0.8rem; color: #fca5a5; }
.url-preview-ok { color: #86efac; }

fieldset { border: none; padding: 0; margin: 0 0 20px; }
.checkbox-label {
  display: flex; align-items: center; gap: 8px;
  font-weight: 400; font-size: 0.9rem; color: var(--text);
  margin: 10px 0; cursor: pointer;
}
.checkbox-label input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

.toggle-switch {
  display: flex; align-items: center; gap: 12px;
  font-weight: 400; font-size: 0.9rem; color: var(--text);
  margin: 12px 0; cursor: pointer; user-select: none;
}
.toggle-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: relative; flex-shrink: 0;
  width: 40px; height: 22px;
  background: rgba(255,255,255,0.14);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: background 0.2s, border-color 0.2s;
}
.toggle-slider::before {
  content: "";
  position: absolute; top: 1px; left: 1px;
  width: 18px; height: 18px;
  background: #f2f2f5;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--accent);
  border-color: var(--accent);
}
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }
.toggle-switch input:focus-visible + .toggle-slider { outline: 2px solid var(--accent); outline-offset: 2px; }
.toggle-text { line-height: 1.3; }
fieldset legend { font-weight: 600; padding: 0 0 8px; border-bottom: 1px solid var(--border); width: 100%; }

.settings-section {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; margin-bottom: 14px; overflow: hidden;
  animation: vipCardGlow 2.4s ease-in-out infinite alternate;
}
.settings-section:nth-of-type(2n) { animation-delay: -1.2s; }
.settings-section summary {
  cursor: pointer; list-style: none; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-weight: 600; user-select: none;
}
.settings-section summary::-webkit-details-marker { display: none; }
.settings-section summary::after {
  content: "▾"; color: var(--text-muted); font-size: 0.8rem; transition: transform 0.15s;
}
.settings-section[open] summary::after { transform: rotate(180deg); }
.settings-section summary:hover { background: rgba(255,255,255,0.03); }
.settings-section .settings-section-body { padding: 0 16px 18px; }
.settings-section-title { display: flex; align-items: center; gap: 8px; }

.embed-preview-section { margin-top: 28px; }
.embed-preview-section h2 { font-size: 1rem; }
.discord-embed-mock {
  background: #2b2d31; border-left: 4px solid var(--accent);
  border-radius: 4px; padding: 12px 14px; max-width: 430px;
  font-family: "gg sans", Poppins, sans-serif;
}
.discord-embed-sitename { color: #949ba4; font-size: 0.72rem; font-weight: 500; margin-bottom: 2px; }
.discord-embed-title { color: #00a8fc; font-size: 0.92rem; font-weight: 600; margin-bottom: 4px; word-break: break-word; }
.discord-embed-desc { color: #dbdee1; font-size: 0.82rem; line-height: 1.4; word-break: break-word; }
.discord-embed-image {
  display: block; margin-top: 10px; max-width: 100%; max-height: 220px;
  border-radius: 5px; object-fit: cover;
}

.links-manager { margin-top: 40px; }
.link-list { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-direction: column; gap: 8px; }
.link-list li {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #0e0e14; border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 12px;
}
.link-platform { font-weight: 600; min-width: 100px; }
.link-list a { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-list form { margin: 0; }

.badge-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.badge-picker-item {
  display: inline-flex; align-items: center; gap: 6px;
  background: #0e0e14; border: 1px solid var(--border);
  border-radius: 999px; padding: 8px 14px;
  cursor: pointer; font-size: 0.85rem;
  transition: border-color 0.15s, background 0.15s;
}
.badge-picker-item input { position: absolute; opacity: 0; width: 0; height: 0; }
.badge-picker-item.checked { border-color: var(--accent); background: rgba(124,58,237,0.15); }
.badge-picker-item input:disabled + .badge-picker-icon { opacity: 0.4; }
.badge-picker-icon { font-size: 1rem; }

.custom-badge-chip {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid; border-radius: 999px;
  padding: 4px 12px; font-size: 0.82rem; font-weight: 600;
  flex: 1;
}
.tag-list .custom-badge-chip { flex: none; }

.add-link-form { display: flex; gap: 8px; }
.add-link-form input { flex: 1; }

.case-opener { margin-top: 16px; }
.case-track-window {
  position: relative;
  height: 90px;
  overflow: hidden;
  background: #0a0a0f;
  border: 1px solid var(--border);
  border-radius: 10px;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.case-track { display: flex; align-items: center; height: 100%; will-change: transform; }
.case-item {
  width: 84px; height: 84px; flex-shrink: 0; margin: 0 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.1rem; border-radius: 10px;
  background: #15151d; border: 2px solid var(--border);
}
.case-item-common { border-color: rgba(255,255,255,0.15); filter: grayscale(0.4) opacity(0.8); }
.case-item-key { border-color: #22d3ee; box-shadow: 0 0 12px rgba(34,211,238,0.35) inset; }
.case-item-vip { border-color: #facc15; box-shadow: 0 0 16px rgba(250,204,21,0.5) inset; }
.case-pointer {
  position: absolute; top: 0; left: 50%; width: 2px; height: 100%;
  background: var(--accent); transform: translateX(-50%);
  box-shadow: 0 0 8px var(--accent);
  pointer-events: none;
}

.chat-page { max-width: 720px; }
.chat-messages {
  height: 520px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 16px;
}
.chat-empty { text-align: center; color: var(--text-muted); font-size: 0.9rem; margin: auto; }

.chat-msg { display: flex; gap: 10px; }
.chat-msg-compact { gap: 10px; margin-top: -6px; }
.chat-msg-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: #1a1a24; }
.chat-msg-compact .chat-msg-avatar { visibility: hidden; }
.chat-msg-body { display: flex; flex-direction: column; gap: 2px; max-width: 72%; min-width: 0; }
.chat-msg-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.chat-msg-name { font-weight: 600; font-size: 0.85rem; text-decoration: none !important; }
.chat-msg-name:hover { text-decoration: underline !important; }
.chat-msg-time { font-size: 0.66rem; color: var(--text-muted); margin-left: auto; }
.chat-msg-text {
  display: inline-block; align-self: flex-start;
  font-size: 0.88rem; color: var(--text); white-space: pre-wrap; word-wrap: break-word;
  background: rgba(255,255,255,0.06); border: 1px solid var(--border);
  padding: 7px 12px; border-radius: 14px;
}
.chat-msg-delete {
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  font-size: 0.75rem; padding: 0 2px;
}
.chat-msg-delete:hover { color: var(--danger); }

.chat-msg-own { flex-direction: row-reverse; }
.chat-msg-own .chat-msg-body { align-items: flex-end; margin-left: auto; }
.chat-msg-own .chat-msg-head { flex-direction: row-reverse; }
.chat-msg-own .chat-msg-time { margin-left: 0; margin-right: auto; }
.chat-msg-own .chat-msg-text {
  align-self: flex-end;
  background: rgba(124,58,237,0.22); border-color: rgba(124,58,237,0.4);
}

.rank-badge-inline { font-size: 0.66rem; font-weight: 600; color: #facc15; }
.rank-badge-inline.rank-user, .rank-badge.rank-user, .lb-rank.lb-rank-user { color: #38bdf8; }
.vip-badge-inline {
  font-size: 0.6rem; font-weight: 700; background: linear-gradient(135deg, #facc15, #f59e0b);
  color: #1a1400; padding: 1px 6px; border-radius: 999px;
}

.chat-msg-bot .chat-msg-text { background: rgba(34, 211, 238, 0.12); border-color: rgba(34, 211, 238, 0.35); }
.chat-msg-bot .chat-msg-name { color: #22d3ee !important; }

.chat-form { display: flex; gap: 8px; margin-top: 12px; align-items: center; }
.chat-form input { flex: 1; }
.chat-char-count { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; }

.ticket-thread { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.ticket-msg {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.ticket-msg-admin { align-self: flex-start; border-color: var(--accent); }
.ticket-msg-user { align-self: flex-end; background: #1a1428; }
.ticket-msg-meta { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 4px; }
.ticket-msg-body { font-size: 0.92rem; white-space: pre-wrap; word-wrap: break-word; }

.home-bg {
  position: fixed;
  inset: -40px;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(ellipse 1100px 850px at 50% 10%, #4c3d80 0%, #2f2459 32%, #170f30 62%, #0b0b10 100%);
  transition: transform 0.35s ease-out;
  will-change: transform;
}
.home-bg::before {
  content: "";
  position: absolute;
  inset: -60px;
  background-image:
    linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse 100% 90% at 50% 5%, #000 50%, transparent 95%);
  mask-image: radial-gradient(ellipse 100% 90% at 50% 5%, #000 50%, transparent 95%);
  animation: homeGridDrift 26s linear infinite;
}
.home-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  animation: homeGlowPulse 6s ease-in-out infinite, homeGlowColorShift 22s linear infinite;
}
@keyframes homeGridDrift {
  from { transform: translate(0, 0); }
  to { transform: translate(46px, 46px); }
}
@keyframes homeGlowPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}
@keyframes homeGlowColorShift {
  0%   { background: radial-gradient(ellipse 650px 450px at 50% 0%, rgba(167,139,250,0.35), transparent 70%); }
  33%  { background: radial-gradient(ellipse 650px 450px at 50% 0%, rgba(34,211,238,0.32), transparent 70%); }
  66%  { background: radial-gradient(ellipse 650px 450px at 50% 0%, rgba(244,114,182,0.28), transparent 70%); }
  100% { background: radial-gradient(ellipse 650px 450px at 50% 0%, rgba(167,139,250,0.35), transparent 70%); }
}
.home-bg-spark {
  position: absolute;
  bottom: -10px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(216,203,255,0.95);
  box-shadow: 0 0 6px 1px rgba(196,181,253,0.75);
  animation: homeSparkRise linear infinite;
}
.home-bg-spark:nth-child(1) { left: 4%; animation-duration: 12s; animation-delay: 0s; }
.home-bg-spark:nth-child(2) { left: 14%; animation-duration: 9s; animation-delay: -3s; }
.home-bg-spark:nth-child(3) { left: 24%; animation-duration: 14s; animation-delay: -7s; }
.home-bg-spark:nth-child(4) { left: 35%; animation-duration: 10s; animation-delay: -1s; }
.home-bg-spark:nth-child(5) { left: 47%; animation-duration: 13s; animation-delay: -5s; }
.home-bg-spark:nth-child(6) { left: 58%; animation-duration: 11s; animation-delay: -9s; }
.home-bg-spark:nth-child(7) { left: 68%; animation-duration: 15s; animation-delay: -2s; }
.home-bg-spark:nth-child(8) { left: 78%; animation-duration: 9.5s; animation-delay: -6s; }
.home-bg-spark:nth-child(9) { left: 88%; animation-duration: 12.5s; animation-delay: -10s; }
.home-bg-spark:nth-child(10) { left: 95%; animation-duration: 10.5s; animation-delay: -4s; }
@keyframes homeSparkRise {
  0% { transform: translateY(0) scale(1); opacity: 0; }
  12% { opacity: 0.9; }
  88% { opacity: 0.5; }
  100% { transform: translateY(-640px) scale(0.4); opacity: 0; }
}
.home-bg-shooting-star {
  position: absolute;
  width: 3px;
  height: 3px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 6px 2px rgba(255,255,255,0.9);
  opacity: 0;
  animation: homeShootingStar 9s ease-in infinite;
}
.home-bg-shooting-star::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  width: 90px;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0.9), transparent);
  transform: translateY(-50%);
}
.home-bg-shooting-star:nth-child(11) { top: 12%; left: 78%; animation-delay: 1s; }
.home-bg-shooting-star:nth-child(12) { top: 32%; left: 45%; animation-delay: 5.5s; }
@keyframes homeShootingStar {
  0% { transform: translate(0, 0); opacity: 0; }
  2% { opacity: 1; }
  12% { transform: translate(-280px, 170px); opacity: 0; }
  100% { transform: translate(-280px, 170px); opacity: 0; }
}
.home-bg-bubble {
  position: absolute;
  bottom: -60px;
  border-radius: 50%;
  border: 1px solid rgba(196,181,253,0.35);
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.20), rgba(167,139,250,0.05) 60%, transparent 75%);
  animation: homeBubbleRise linear infinite;
}
.home-bg-bubble:nth-child(13) { left: 8%;  width: 14px; height: 14px; animation-duration: 16s; animation-delay: -2s; }
.home-bg-bubble:nth-child(14) { left: 20%; width: 9px;  height: 9px;  animation-duration: 13s; animation-delay: -8s; }
.home-bg-bubble:nth-child(15) { left: 33%; width: 20px; height: 20px; animation-duration: 20s; animation-delay: -4s; }
.home-bg-bubble:nth-child(16) { left: 46%; width: 11px; height: 11px; animation-duration: 15s; animation-delay: -11s; }
.home-bg-bubble:nth-child(17) { left: 59%; width: 26px; height: 26px; animation-duration: 22s; animation-delay: -6s; }
.home-bg-bubble:nth-child(18) { left: 71%; width: 8px;  height: 8px;  animation-duration: 12s; animation-delay: -1s; }
.home-bg-bubble:nth-child(19) { left: 84%; width: 16px; height: 16px; animation-duration: 18s; animation-delay: -9s; }
.home-bg-bubble:nth-child(20) { left: 93%; width: 12px; height: 12px; animation-duration: 14s; animation-delay: -13s; }
@keyframes homeBubbleRise {
  0%   { transform: translate(0, 0); opacity: 0; }
  8%   { opacity: 0.8; }
  25%  { transform: translate(14px, -180px); }
  50%  { transform: translate(-10px, -360px); }
  75%  { transform: translate(12px, -540px); }
  92%  { opacity: 0.4; }
  100% { transform: translate(0, -720px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .home-bg::before, .home-bg::after, .home-bg-spark,
  .home-bg-shooting-star, .home-bg-bubble { animation: none; }
  .home-bg { transition: none; }
}

.flashes { max-width: 640px; margin: 0 auto 20px; }
.flash { padding: 10px 16px; border-radius: 8px; margin-bottom: 8px; font-size: 0.9rem; }
.flash-error { background: rgba(239,68,68,0.12); color: #fca5a5; border: 1px solid rgba(239,68,68,0.3); }
.flash-success { background: rgba(34,197,94,0.12); color: #86efac; border: 1px solid rgba(34,197,94,0.3); }

.nav-row {
  display: flex; align-items: center; justify-content: space-between;
  background: #0e0e14; border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 16px;
  color: var(--text) !important; text-decoration: none !important;
  transition: border-color 0.15s, box-shadow 0.15s;
  animation: vipCardGlow 2.4s ease-in-out infinite alternate;
}
.nav-row:hover { border-color: var(--border-glow); box-shadow: 0 0 12px rgba(34, 211, 238, 0.2); }
.nav-row + .nav-row { margin-top: 8px; }
.nav-row-text { display: flex; flex-direction: column; gap: 2px; }
.nav-row-title { font-weight: 600; }
.nav-row-subtitle { font-size: 0.8rem; color: var(--text-muted); }
.nav-row-arrow { color: var(--text-muted); font-size: 1.1rem; }
.nav-row.disabled { opacity: 0.45; pointer-events: none; }

.lang-dropdown { position: relative; }
.lang-dropdown-toggle {
  display: flex; align-items: center; gap: 4px;
  background: rgba(34, 211, 238, 0.05); border: 1px solid rgba(34, 211, 238, 0.3);
  color: var(--text); font-size: 0.74rem; font-weight: 600;
  padding: 5px 8px; border-radius: 8px; cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.lang-dropdown-toggle:hover {
  border-color: #22d3ee;
  background: rgba(34, 211, 238, 0.12);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.25);
}

.settings-pill {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(34, 211, 238, 0.05); border: 1px solid rgba(34, 211, 238, 0.3);
  color: var(--text) !important; font-size: 0.74rem; font-weight: 600;
  padding: 5px 8px; border-radius: 8px; text-decoration: none !important;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.settings-pill:hover {
  border-color: #22d3ee;
  background: rgba(34, 211, 238, 0.12);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.25);
}
.settings-pill .settings-pill-icon { font-size: 0.9rem; }
.settings-pill .settings-pill-icon-img { width: 16px; height: 16px; object-fit: cover; border-radius: 4px; vertical-align: middle; }
.settings-pill .settings-pill-badge {
  background: #ef4444; color: #fff; font-size: 0.62rem; font-weight: 700;
  padding: 1px 6px; border-radius: 999px; line-height: 1.4;
}
.lang-dropdown-toggle img { border-radius: 2px; display: block; }
.lang-dropdown-arrow { color: var(--text-muted); font-size: 0.7rem; }

.lang-dropdown-menu {
  position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; padding: 6px; min-width: 160px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.5);
  z-index: 100;
}
.lang-dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 6px;
  color: var(--text) !important; font-size: 0.85rem;
  text-decoration: none !important;
}
.lang-dropdown-item:hover { background: rgba(255,255,255,0.06); }
.lang-dropdown-item.active { color: var(--accent) !important; }
.lang-dropdown-item img { border-radius: 2px; display: block; flex-shrink: 0; }
.lang-dropdown-check { margin-left: auto; color: var(--accent); }
