:root {
  --bg: #07070d;
  --bg-soft: #0d0d1a;
  --neon-cyan: #00fff2;
  --neon-pink: #ff2bd6;
  --neon-purple: #a134ff;
  --neon-red: #ff2b3d;
  --text: #e7e7ff;
  --text-dim: #8b8bb3;
  --border: rgba(0, 255, 242, 0.25);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Sora", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: 0.2px;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

p { color: var(--text-dim); }

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(161, 52, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 242, 0.08) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: center;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 100%);
}

h1, h2, h3, .logo {
  font-family: "Orbitron", sans-serif;
}

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

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 28px;
  border-bottom: 1px solid var(--border);
  background: rgba(7, 7, 13, 0.85);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.navbar-left { display: flex; align-items: center; gap: 26px; }

.logo {
  font-weight: 900;
  font-size: 1.4rem;
  letter-spacing: 2px;
  color: var(--text);
}
.logo span { color: var(--neon-cyan); text-shadow: 0 0 10px var(--neon-cyan); }

.social-icons { display: flex; align-items: center; gap: 14px; }
.social-icon {
  display: inline-flex;
  width: 22px;
  height: 22px;
  color: var(--text-dim);
  transition: color 0.2s, filter 0.2s, transform 0.2s;
}
.social-icon svg { width: 100%; height: 100%; }
.social-icon:hover { transform: translateY(-2px); }
.icon-discord:hover { color: var(--neon-purple); filter: drop-shadow(0 0 6px var(--neon-purple)); }
.icon-github:hover { color: var(--text); filter: drop-shadow(0 0 6px var(--text)); }
.icon-telegram:hover { color: var(--neon-cyan); filter: drop-shadow(0 0 6px var(--neon-cyan)); }
.icon-bot:hover { color: var(--neon-red); filter: drop-shadow(0 0 7px var(--neon-red)); }

.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a {
  font-weight: 600;
  color: var(--text-dim);
  transition: color 0.2s, text-shadow 0.2s;
}
.nav-links a:hover { color: var(--neon-cyan); text-shadow: 0 0 8px var(--neon-cyan); }
.nav-links a.btn-neon-small,
.nav-links a.btn-neon-small:hover { color: var(--bg); text-shadow: none; }

.lang-switch { display: flex; gap: 4px; padding: 3px; border: 1px solid var(--border); border-radius: 20px; }
.lang-switch-btn {
  padding: 3px 11px;
  border-radius: 16px;
  font-size: 0.75rem;
  font-family: "Orbitron", sans-serif;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.lang-switch-btn.active { background: var(--neon-cyan); color: var(--bg); text-shadow: none; }
.lang-switch-btn.active:hover { color: var(--bg); }

/* Гамбургер-меню (мобильные) */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--neon-cyan);
  box-shadow: 0 0 6px var(--neon-cyan);
  transition: transform 0.25s, opacity 0.25s;
}
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .navbar { flex-wrap: wrap; padding: 14px 18px; }
  .navbar-left { gap: 14px; flex-wrap: wrap; }
  .social-icons { gap: 10px; }
  .menu-toggle { display: flex; margin-left: auto; position: relative; z-index: 60; }

  body.menu-open { overflow: hidden; }

  .nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 45;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .nav-backdrop.open { opacity: 1; pointer-events: auto; }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(78vw, 300px);
    height: 100vh;
    background: rgba(10, 10, 18, 0.98);
    backdrop-filter: blur(10px);
    border-left: 1px solid var(--border);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 10px;
    z-index: 50;
    padding: 90px 22px 24px;
    overflow-y: auto;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0.3s;
  }
  .nav-links.open { transform: translateX(0); visibility: visible; }
  .nav-links a {
    width: 100%;
    text-align: center;
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 1rem;
    border: 1px solid transparent;
  }
  .nav-links a:not(.btn-neon-small):not(.btn-ghost) { border: 1px solid var(--border); }
  .nav-links a:not(.btn-neon-small):not(.btn-ghost):hover { background: var(--bg-soft); }
  .nav-links .btn-neon-small,
  .nav-links .btn-ghost {
    width: 100%;
  }
  .nav-links .lang-switch { width: auto; align-self: center; margin-bottom: 6px; }
  .nav-links .lang-switch a { width: auto; padding: 4px 12px; border: none; }
}

/* Buttons */
.btn-neon, .btn-neon-small, .btn-ghost {
  display: inline-block;
  font-family: "Orbitron", sans-serif;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
}

.btn-neon {
  padding: 16px 38px;
  font-size: 1rem;
  color: var(--bg);
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0, 255, 242, 0.45), 0 0 40px rgba(161, 52, 255, 0.25);
}
.btn-neon:hover { transform: translateY(-2px); box-shadow: 0 0 30px rgba(0, 255, 242, 0.7), 0 0 60px rgba(161, 52, 255, 0.4); }

.btn-neon-small {
  padding: 10px 22px;
  font-size: 0.85rem;
  color: var(--bg);
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
  border-radius: 6px;
  box-shadow: 0 0 12px rgba(0, 255, 242, 0.4);
}
.btn-neon-small:hover { box-shadow: 0 0 22px rgba(0, 255, 242, 0.65); }

.btn-ghost {
  padding: 10px 22px;
  font-size: 0.85rem;
  color: var(--neon-pink);
  background: transparent;
  border: 1px solid var(--neon-pink);
  border-radius: 6px;
}
.btn-ghost:hover { box-shadow: 0 0 14px rgba(255, 43, 214, 0.5); }

.hero-actions .btn-ghost {
  padding: 16px 38px;
  font-size: 1rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
}
.hero-actions .btn-ghost:hover { transform: translateY(-2px); }

.full-width { width: 100%; }

/* Page wrapper */
.page { max-width: 1100px; margin: 0 auto; padding: 60px 6% 100px; min-height: 70vh; }

/* Hero */
.hero { text-align: center; padding: 60px 0 80px; }
.hero-title {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 900;
  letter-spacing: 3px;
  margin-bottom: 18px;
}
.hero-title span { color: var(--neon-cyan); text-shadow: 0 0 20px var(--neon-cyan), 0 0 50px var(--neon-purple); }
.hero-subtitle { color: var(--text-dim); font-size: 1.1rem; max-width: 560px; margin: 0 auto 36px; }
.hero-actions { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }

/* Stats bar */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
  padding: 30px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}
.stat-item { display: flex; flex-direction: column; align-items: center; text-align: center; }
.stat-number {
  font-family: "Orbitron", sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--neon-cyan);
  text-shadow: 0 0 12px rgba(0, 255, 242, 0.5);
}
.stat-label { color: var(--text-dim); font-size: 0.85rem; margin-top: 6px; }

/* About */
.about { text-align: center; max-width: 720px; margin: 0 auto 50px; }
.about-text { color: var(--text-dim); font-size: 1.05rem; }

/* Features */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; margin: 60px 0; }
.feature-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  text-align: center;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.2s, border-color 0.2s;
}
.feature-card.in-view {
  opacity: 1;
  transform: translateY(0);
}
.feature-card:hover { border-color: var(--neon-cyan); box-shadow: 0 0 20px rgba(0, 255, 242, 0.18); }
.feature-icon { font-size: 2rem; margin-bottom: 12px; }
.feature-card p { color: var(--text-dim); }

/* Requirements list */
.requirements-list {
  list-style: none;
  max-width: 480px;
  margin: 0 auto 50px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.requirements-list li {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.requirements-list li::before {
  content: "✓";
  color: var(--neon-cyan);
  font-weight: 700;
  text-shadow: 0 0 8px var(--neon-cyan);
}

/* Legal pages */
.legal-text {
  max-width: 720px;
  margin: 0 auto 60px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 40px;
}
.legal-text h2 {
  font-size: 1.1rem;
  color: var(--neon-cyan);
  margin: 28px 0 12px;
}
.legal-text h2:first-child { margin-top: 0; }
.legal-text p { margin: 0 0 10px; line-height: 1.6; }
.legal-text ul { margin: 0 0 10px; padding-left: 22px; color: var(--text-dim); }
.legal-text li { margin-bottom: 6px; }
.legal-text a { color: var(--neon-cyan); text-decoration: underline; }
.legal-text h3 { font-size: 0.95rem; color: var(--text); margin: 22px 0 8px; }
.legal-text code {
  background: #11111f;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: "Sora", monospace;
  font-size: 0.85em;
  color: var(--neon-cyan);
}
.legal-text .code-block {
  display: block;
  background: #0a0a14;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin: 0 0 14px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "Sora", monospace;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.legal-footer-note {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-style: italic;
}

/* Согласие с документами перед покупкой */
.consent-box {
  max-width: 600px;
  margin: 0 auto 36px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 22px;
  text-align: center;
}
.consent-box .checkbox-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--text);
  font-size: 0.92rem;
  cursor: pointer;
}
.consent-box input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--neon-cyan);
  cursor: pointer;
}
.consent-box a { color: var(--neon-cyan); text-decoration: underline; }

.referral-input-row { margin-top: 14px; }
.referral-input-row input {
  width: 100%;
  max-width: 320px;
  background: #11111f;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 14px;
  color: var(--text);
  font-family: "Sora", sans-serif;
  text-align: center;
}
.referral-input-row input:focus { outline: none; border-color: var(--neon-cyan); box-shadow: 0 0 10px rgba(0, 255, 242, 0.3); }

.referral-share-box {
  max-width: 480px;
  margin: 0 auto 50px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 22px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.referral-share-box span { color: var(--text-dim); }
.referral-share-box code {
  font-family: "Orbitron", sans-serif;
  font-size: 1.2rem;
  color: var(--neon-pink);
  text-shadow: 0 0 10px var(--neon-pink);
  letter-spacing: 2px;
}

.buy-link.locked {
  opacity: 0.4;
  pointer-events: none;
  filter: grayscale(40%);
}

/* CTA */
.cta { text-align: center; padding: 60px 0; border-top: 1px solid var(--border); }
.cta p { color: var(--text-dim); margin-bottom: 26px; }

/* VPS banner */
.vps-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 36px 40px;
  margin: 50px 0;
}
.vps-banner-text h2 { margin: 0 0 8px; }
.vps-banner-text p { color: var(--text-dim); margin: 0; max-width: 480px; }

/* Section header */
.section-header { margin: 50px 0 28px; text-align: center; }
.section-header p { color: var(--text-dim); }

/* Plans */
.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.plan-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 30px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.plan-card:hover { transform: translateY(-4px); box-shadow: 0 0 24px rgba(161, 52, 255, 0.25); }
.plan-price { font-family: "Orbitron", sans-serif; font-size: 2rem; color: var(--neon-cyan); margin: 14px 0; text-shadow: 0 0 12px rgba(0,255,242,0.4); }
.plan-desc { color: var(--text-dim); margin-bottom: 22px; min-height: 44px; }

/* Custom plan dial */
.custom-plan-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 40px;
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
}

.day-dial-value {
  font-family: "Orbitron", sans-serif;
  font-size: 1.6rem;
  color: var(--neon-cyan);
  text-shadow: 0 0 12px rgba(0, 255, 242, 0.5);
  margin-bottom: 22px;
}

.day-dial {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--neon-purple), var(--neon-cyan), var(--neon-pink), var(--neon-purple));
  background-size: 300% 100%;
  background-position: 0% 50%;
  box-shadow: 0 0 14px rgba(0, 255, 242, 0.35);
  cursor: pointer;
  transition: box-shadow 0.2s;
}

.day-dial::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--neon-cyan);
  box-shadow: 0 0 10px var(--neon-cyan), 0 0 20px rgba(161, 52, 255, 0.5);
  cursor: pointer;
}

.day-dial::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--neon-cyan);
  box-shadow: 0 0 10px var(--neon-cyan), 0 0 20px rgba(161, 52, 255, 0.5);
  cursor: pointer;
}

.day-dial.spinning {
  animation: dial-shimmer 3s linear infinite;
  box-shadow: 0 0 16px rgba(0, 255, 242, 0.45), 0 0 24px rgba(255, 43, 214, 0.25);
}

@keyframes dial-shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

.custom-price {
  font-family: "Orbitron", sans-serif;
  font-size: 1.3rem;
  color: var(--text);
  margin: 22px 0;
}
.custom-price span { color: var(--neon-pink); text-shadow: 0 0 10px var(--neon-pink); }

.custom-warning { margin-top: 20px; }

/* Download */
.download-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 40px;
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}
.download-note { color: var(--text-dim); font-size: 0.85rem; margin-top: 18px; }

/* Auth */
.auth-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 40px;
  max-width: 420px;
  margin: 0 auto;
}
.auth-card h1 { text-align: center; margin-bottom: 28px; }
.auth-card form { display: flex; flex-direction: column; gap: 6px; }
.auth-card label { color: var(--text-dim); font-size: 0.85rem; margin-top: 10px; }
.auth-card input, .auth-card textarea {
  background: #11111f;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 14px;
  color: var(--text);
  font-family: "Sora", sans-serif;
  font-size: 1rem;
}
.auth-card input:focus, .auth-card textarea:focus { outline: none; border-color: var(--neon-cyan); box-shadow: 0 0 10px rgba(0,255,242,0.3); }
.auth-card button { margin-top: 22px; }
.auth-switch { text-align: center; margin-top: 22px; color: var(--text-dim); }
.auth-switch a { color: var(--neon-cyan); }

.contact-card { max-width: 520px; text-align: center; }
.contact-box {
  background: #11111f;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px;
  margin: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
.contact-name { font-family: "Orbitron", sans-serif; color: var(--neon-pink); text-shadow: 0 0 10px var(--neon-pink); font-size: 1.1rem; }
.contact-box code {
  display: inline-block;
  max-width: 100%;
  word-break: break-all;
  overflow-wrap: anywhere;
}

/* Status card */
.status-card { border-radius: 14px; padding: 28px; margin-bottom: 10px; border: 1px solid var(--border); background: var(--bg-soft); }
.status-active { box-shadow: 0 0 20px rgba(0, 255, 242, 0.2); }
.status-inactive { box-shadow: 0 0 20px rgba(255, 43, 214, 0.15); }

/* Support CTA */
.support-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 24px 0;
  padding: 20px 24px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(0, 255, 242, 0.06), rgba(161, 52, 255, 0.06));
}
.support-cta p { margin: 0; color: var(--text); }
.support-cta--centered { justify-content: center; text-align: center; flex-direction: column; }
.support-cta--subtle {
  justify-content: center;
  text-align: center;
  flex-direction: column;
  gap: 10px;
  padding: 14px 20px;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.08);
}
.support-cta--subtle p { color: var(--text-dim); font-size: 0.85rem; }

/* Table */
.data-table { width: 100%; border-collapse: collapse; margin: 20px 0 40px; }
.data-table th, .data-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); text-align: left; font-size: 0.9rem; }
.data-table th { color: var(--text-dim); font-family: "Orbitron", sans-serif; font-size: 0.75rem; text-transform: uppercase; }
.badge-bot-row { opacity: 0.55; }
.inline-form { display: inline-block; margin-right: 8px; }

/* Badges */
.badge { padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; }
.badge-pending { background: rgba(255, 43, 214, 0.15); color: var(--neon-pink); }
.badge-approved, .badge-active, .badge-closed { background: rgba(0, 255, 242, 0.15); color: var(--neon-cyan); }
.badge-rejected { background: rgba(255, 60, 60, 0.15); color: #ff5c5c; }
.badge-open { background: rgba(161, 52, 255, 0.18); color: var(--neon-purple); }

/* Tickets */
.ticket-list { display: flex; flex-direction: column; gap: 18px; margin-bottom: 40px; }
.ticket-card { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; padding: 22px; }
.ticket-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.ticket-date { color: var(--text-dim); font-size: 0.75rem; }
.admin-reply { margin-top: 12px; padding: 12px; background: #11111f; border-left: 2px solid var(--neon-cyan); border-radius: 4px; }
.ticket-card textarea { width: 100%; margin-top: 12px; background: #11111f; border: 1px solid var(--border); border-radius: 6px; color: var(--text); padding: 10px; }
.ticket-actions { display: flex; align-items: center; gap: 16px; margin-top: 10px; }
.checkbox-label { color: var(--text-dim); font-size: 0.85rem; }
.file-label input[type="file"] { max-width: 200px; font-size: 0.8rem; color: var(--text-dim); }

/* Live chat — мессенджер-стиль */
.chat-card {
  max-width: 640px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 160px);
}
.chat-block { display: flex; flex-direction: column; min-height: 0; }
.chat-card .chat-block, .support-widget-panel .chat-block { flex: 1; min-height: 0; }
.chat-window {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-height: 160px;
  overflow-y: auto;
  padding: 16px;
  margin: 14px 0;
  background: radial-gradient(ellipse 120% 100% at 50% 0%, rgba(161, 52, 255, 0.06), transparent 60%), #0c0c18;
  border: 1px solid var(--border);
  border-radius: 14px;
  scroll-behavior: smooth;
}
.chat-window-admin { max-height: 300px; flex: none; }
.chat-window-admin .chat-msg-time { display: block; margin-top: 4px; text-align: right; }
.chat-msg {
  max-width: 78%;
  padding: 8px 12px 6px;
  border-radius: 16px;
  font-size: 0.92rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.chat-msg-body { white-space: pre-wrap; word-break: break-word; line-height: 1.4; }
.chat-msg-media { padding: 5px; }
.chat-msg-image { display: block; max-width: 100%; max-height: 280px; border-radius: 11px; cursor: pointer; }
.chat-msg-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 2px;
}
.chat-msg-time { font-size: 0.68rem; color: var(--text-dim); opacity: 0.8; }
.chat-msg-status { display: inline-flex; align-items: center; }
.chat-msg-tick { font-size: 0.72rem; color: var(--text-dim); }
.chat-msg-tick-read { color: var(--neon-cyan); text-shadow: 0 0 4px rgba(0, 255, 242, 0.5); }
.chat-msg-tick-error { font-size: 0.8rem; color: #ff5c5c; cursor: help; }
.msg-spinner {
  display: inline-block;
  width: 9px;
  height: 9px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: var(--text-dim);
  border-radius: 50%;
  animation: msg-spin 0.7s linear infinite;
}
@keyframes msg-spin { to { transform: rotate(360deg); } }
.chat-msg-user {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(0, 255, 242, 0.18), rgba(0, 255, 242, 0.08));
  border: 1px solid rgba(0, 255, 242, 0.35);
  color: var(--text);
  border-bottom-right-radius: 5px;
}
.chat-msg-admin {
  align-self: flex-start;
  background: linear-gradient(135deg, rgba(161, 52, 255, 0.2), rgba(161, 52, 255, 0.08));
  border: 1px solid rgba(161, 52, 255, 0.4);
  color: var(--text);
  border-bottom-left-radius: 5px;
}
.chat-attach-preview {
  position: relative;
  margin: 0 0 8px;
  width: 64px;
  height: 64px;
}
.chat-attach-preview:not([hidden]) { display: inline-flex; }
.chat-attach-preview img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }
.chat-attach-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: var(--neon-pink);
  color: #07070d;
  font-size: 0.7rem;
  line-height: 1;
  cursor: pointer;
}
.chat-form { display: flex; gap: 10px; align-items: center; }
.chat-form textarea {
  flex: 1;
  resize: none;
  background: #11111f;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 12px 18px;
  color: var(--text);
  font-family: "Sora", sans-serif;
  font-size: 1rem;
  line-height: 1.3;
}
.chat-form textarea:focus { outline: none; border-color: var(--neon-cyan); box-shadow: 0 0 10px rgba(0,255,242,0.3); }
.chat-form button {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  padding: 0;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chat-form button:disabled { opacity: 0.5; cursor: not-allowed; }

.support-widget-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.support-widget-title {
  font-family: "Orbitron", sans-serif;
  font-weight: 700;
  color: var(--text);
  font-size: 0.95rem;
  min-width: 0;
  flex: 1 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.support-widget-actions { display: flex; gap: 6px; flex-shrink: 0; }
.support-widget-icon-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  padding: 5px 9px;
  transition: border-color 0.2s, color 0.2s;
}
.support-widget-icon-btn:hover { border-color: var(--neon-cyan); color: var(--neon-cyan); }

/* Плавающий виджет поддержки на всех страницах */
.support-widget { position: fixed; right: 24px; bottom: 24px; z-index: 999; display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.support-widget-launcher {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  color: #07070d;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(0, 255, 242, 0.35);
  transition: transform 0.2s;
}
.support-widget-launcher:hover { transform: scale(1.06); }
.support-widget-launcher.open { transform: scale(0.92); }
.support-widget-panel {
  width: 440px;
  max-width: 94vw;
  height: 600px;
  max-height: calc(100vh - 110px);
  max-height: calc(100dvh - 110px);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.support-widget-panel:not([hidden]) { display: flex; flex-direction: column; }

@media (max-width: 600px) {
  .support-widget { left: 12px; right: 12px; bottom: 12px; }
  .support-widget-launcher { align-self: flex-end; }
  .support-widget-panel {
    width: 100%;
    max-width: 100%;
    height: calc(100vh - 90px);
    height: calc(100dvh - 90px);
    max-height: calc(100vh - 90px);
    max-height: calc(100dvh - 90px);
    padding: 14px;
  }
}

/* Flash messages */
.flash-wrap { margin-bottom: 24px; display: flex; flex-direction: column; gap: 10px; }
.flash { padding: 14px 18px; border-radius: 8px; font-weight: 600; }
.flash-success { background: rgba(0, 255, 242, 0.1); border: 1px solid var(--neon-cyan); color: var(--neon-cyan); }
.flash-error { background: rgba(255, 43, 214, 0.1); border: 1px solid var(--neon-pink); color: var(--neon-pink); }

/* Footer */
.footer { text-align: center; padding: 26px; color: var(--text-dim); font-size: 0.8rem; border-top: 1px solid var(--border); }
.footer-links { margin-top: 8px; }
.footer-links a { color: var(--text-dim); text-decoration: underline; }
.footer-links a:hover { color: var(--neon-cyan); }

@media (max-width: 600px) {
  .footer { padding-bottom: 90px; }
}
