/* ==== Base layout ==== */
* {
    scrollbar-color: #2b2d2d #4e5151;
}

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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: "Noto Sans", "Noto Sans SC", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB",
    -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: radial-gradient(circle at top, #1c2533 0, #05070b 55%, #050607 100%);
  color: #e5e5e5;
}

a {
  color: #61dafb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.page-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 10px 10px 60px;
}

/* ==== Landing page ==== */
.landing-page {
  width: 100%;
  max-width: 1400px;
  padding: 24px;
  margin: 0 auto 40px;
  position: relative;
}
.landing-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 10% 20%, rgba(63,139,255,0.08), transparent 40%),
    radial-gradient(circle at 90% 10%, rgba(125,255,161,0.08), transparent 35%),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 120px),
    repeating-linear-gradient(180deg, rgba(255,255,255,0.02) 0 1px, transparent 1px 120px);
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
  border-radius: 12px;
}
.landing-page > * {
  position: relative;
  z-index: 1;
}
.landing-hero {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 36px 32px;
  background: linear-gradient(135deg, #0e1324 0%, #0a0d18 50%, #0e142a 100%);
  border: 1px solid rgba(255,255,255,0.05);
  box-shadow: 0 18px 40px rgba(0,0,0,0.55);
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 26px;
}
.landing-lang {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
}
.landing-hero .glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 20%, rgba(61,151,255,0.2), transparent 40%),
              radial-gradient(ellipse at 70% 60%, rgba(125,255,161,0.15), transparent 45%);
  filter: blur(6px);
  pointer-events: none;
  animation: glowShift 14s ease-in-out infinite;
}
.hero-content { position: relative; z-index: 1; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.18em; font-size: 12px; color: #7dffa1; margin: 0 0 10px; }
.hero-content h1 { margin: 0 0 12px; font-size: 34px; line-height: 1.2; color: #f7f9ff; }
.subhead { margin: 0 0 18px; color: #c7d1e0; max-width: 680px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn-primary, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 18px; border-radius: 10px; font-weight: 600; text-decoration: none;
  text-decoration: none !important;
}
.btn-primary { background: linear-gradient(135deg, #3f8bff, #2b5fbf); color: #f5f7ff; box-shadow: 0 12px 28px rgba(63,139,255,0.35); }
.btn-ghost { border: 1px solid #2f3545; color: #dfe6f6; }
.meta-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.meta-pills span {
  padding: 6px 10px; border-radius: 999px; border: 1px solid #2f3545; color: #c7d1e0; font-size: 13px; background: #0f1526;
}
.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 16px 34px rgba(63,139,255,0.45);
}
.hero-panel { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.panel-card {
  background: linear-gradient(145deg, #11182c, #0c101f);
  border: 1px solid #2b3143;
  border-radius: 14px;
  padding: 14px 16px;
  color: #dbe5ff;
  box-shadow: 0 12px 28px rgba(0,0,0,0.35);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.panel-card.secondary { background: linear-gradient(145deg, #12192d, #0c1022); color: #cde7ff; }
.panel-title { font-weight: 700; margin-bottom: 8px; }
.panel-card ul { margin: 0; padding-left: 18px; color: #c7d1e0; line-height: 1.5; }
.panel-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 34px rgba(0,0,0,0.45);
  border-color: rgba(125,255,161,0.35);
}

.feature-grid {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.feature {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #2a3040;
  background: radial-gradient(circle at top, rgba(54,155,84,0.1), #0f1322 55%);
  box-shadow: 0 12px 22px rgba(0,0,0,0.35);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.feature h3 { margin: 0 0 8px; font-size: 17px; color: #e9f2ff; }
.feature p { margin: 0; color: #c3cde0; }
.feature:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px rgba(0,0,0,0.45);
  border-color: rgba(63,139,255,0.35);
}

.visuals-grid {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.visual-card {
  position: relative;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #2a3040;
  background: linear-gradient(145deg, #0f1322, #0b0f1d);
  box-shadow: 0 12px 22px rgba(0,0,0,0.35);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.visual-card h3 { margin: 6px 0 8px; color: #e9f2ff; }
.visual-card p { margin: 0 0 10px; color: #c3cde0; }
.visual-badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: #1a2340;
  color: #7dffa1;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.visual-badge.alt { color: #7fb6ff; background: #172338; }
.visual-bars { display: grid; gap: 6px; margin-top: 10px; }
.visual-bars span {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #3f8bff, #7dffa1);
  opacity: 0.8;
  animation: barPulse 4.5s ease-in-out infinite;
}
.visual-bars span:nth-child(2) { animation-delay: 0.4s; }
.visual-bars span:nth-child(3) { animation-delay: 0.8s; }
.pill-row { display: flex; flex-wrap: wrap; gap: 6px; }
.pill-row span {
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid #2b3142;
  color: #c3cde0;
  font-size: 12px;
}
.sparkline { display: grid; grid-auto-flow: column; gap: 6px; align-items: end; height: 38px; }
.sparkline span {
  display: block;
  width: 6px;
  border-radius: 4px;
  background: linear-gradient(180deg, #7dffa1, #2a3f60);
  opacity: 0.9;
}
.sparkline span:nth-child(1) { height: 14px; }
.sparkline span:nth-child(2) { height: 22px; }
.sparkline span:nth-child(3) { height: 32px; }
.sparkline span:nth-child(4) { height: 18px; }
.sparkline span:nth-child(5) { height: 28px; }
.sparkline span:nth-child(6) { height: 34px; }

.floating-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.floating-shapes .dot {
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #7dffa1;
  opacity: 0.7;
  animation: float 10s linear infinite;
}
.floating-shapes .d1 { top: 16%; left: 22%; animation-duration: 12s; }
.floating-shapes .d2 { top: 32%; left: 68%; animation-duration: 14s; background:#7fb6ff; }
.floating-shapes .d3 { top: 70%; left: 28%; animation-duration: 11s; background:#ffb86c; }
.floating-shapes .d4 { top: 58%; left: 82%; animation-duration: 13s; background:#b58cff; }
@keyframes float {
  0% { transform: translateY(0) scale(1); opacity: 0.8; }
  50% { transform: translateY(-10px) scale(1.1); opacity: 0.5; }
  100% { transform: translateY(0) scale(1); opacity: 0.8; }
}

.recent {
  margin-top: 26px;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid #2a3040;
  background: linear-gradient(135deg, #0f1322, #0b0f1d);
  box-shadow: 0 12px 24px rgba(0,0,0,0.35);
}
.recent-head h2 { margin: 0 0 4px; color: #f4f7ff; }
.recent-head p { margin: 0 0 12px; color: #c3cde0; }
.recent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.recent-card {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #2a3040;
  background: #101629;
  color: #c7d1e0;
  box-shadow: 0 8px 18px rgba(0,0,0,0.25);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.recent-badge {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid #2f3547;
  color: #7dffa1;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.pricing {
  margin-top: 26px;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid #2f3547;
  background: linear-gradient(135deg, #10182c, #0d1325);
  box-shadow: 0 14px 30px rgba(0,0,0,0.45);
}
.pricing-header h2 { margin: 0 0 6px; color: #f4f7ff; }
.pricing-header p { margin: 0 0 14px; color: #c5cfdf; }
.pricing-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.referral-highlight {
  margin-top: 26px;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid #2f3547;
  background: radial-gradient(circle at top, rgba(86, 140, 255, 0.12), transparent 55%), linear-gradient(135deg, #10182c, #0d1428);
  box-shadow: 0 14px 30px rgba(0,0,0,0.45);
  display: grid;
  grid-template-columns: minmax(240px, 1.1fr) minmax(220px, 0.9fr);
  gap: 18px;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.referral-content h2 {
  margin: 8px 0 6px;
  color: #f4f7ff;
}

.referral-content p {
  margin: 0 0 12px;
  color: #c5cfdf;
}

.referral-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #2f3547;
  background: rgba(16, 22, 44, 0.6);
  color: #7dffa1;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.referral-points {
  margin: 0 0 14px;
  padding-left: 16px;
  color: #c5cfdf;
  line-height: 1.4;
}

.referral-visual {
  position: relative;
  min-height: 220px;
  border-radius: 12px;
  border: 1px solid #2f3547;
  background: linear-gradient(145deg, #0f1526, #101a30);
  display: grid;
  gap: 10px;
  align-content: center;
  padding: 16px;
  overflow: hidden;
}

.referral-orb {
  position: absolute;
  border-radius: 50%;
  opacity: 0.65;
  filter: blur(0.5px);
  animation: referralFloat 6s ease-in-out infinite;
}

.referral-orb.orb-1 {
  width: 58px;
  height: 58px;
  background: radial-gradient(circle, rgba(125,255,161,0.9), rgba(125,255,161,0.15));
  top: 14px;
  right: 24px;
}

.referral-orb.orb-2 {
  width: 44px;
  height: 44px;
  background: radial-gradient(circle, rgba(85,152,255,0.9), rgba(85,152,255,0.12));
  bottom: 20px;
  left: 22px;
  animation-delay: 1.3s;
}

.referral-orb.orb-3 {
  width: 36px;
  height: 36px;
  background: radial-gradient(circle, rgba(203,147,255,0.8), rgba(203,147,255,0.1));
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  animation-delay: 2.2s;
}

.referral-stat {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #2f3547;
  background: rgba(15, 20, 40, 0.6);
  color: #e9f2ff;
  font-size: 13px;
}

.referral-stat .label {
  color: #9fb1ca;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11px;
}

@media (max-width: 900px) {
  .referral-highlight {
    grid-template-columns: 1fr;
  }
}

@keyframes referralFloat {
  0% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0); }
}
.price-card {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #2f3547;
  background: #0f1526;
  box-shadow: 0 10px 20px rgba(0,0,0,0.35);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.price-card.featured {
  border-color: #3f8bff;
  box-shadow: 0 14px 28px rgba(63,139,255,0.35);
  background: linear-gradient(145deg, #10203a, #0d162c);
}
.price-badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #2f3547;
  color: #7dffa1;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.price-badge.accent { color: #9fc7ff; border-color: #3f8bff; }
.price-card h3 { margin: 0; color: #e9f2ff; }
.price-card .price { margin: 0; font-size: 28px; font-weight: 700; color: #7dffa1; }
.price-old {
  margin-right: 8px;
  color: #8a94a8;
  text-decoration: line-through;
  font-weight: 500;
  font-size: 16px;
}
.price-discount {
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(61, 151, 255, 0.16);
  border: 1px solid rgba(61, 151, 255, 0.4);
  color: #9fc7ff;
  font-size: 11px;
  letter-spacing: 0.04em;
}
.price-card ul { margin: 0; padding-left: 16px; color: #c5cfdf; line-height: 1.4; }
.price-card button { margin-top: auto; width: 100%; }

.cta-strip {
  margin-top: 26px;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid #2f3547;
  background: linear-gradient(135deg, #111a2f, #0c1327);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.cta-strip h2 { margin: 0 0 6px; color: #f4f7ff; }
.cta-strip p { margin: 0; color: #c5cfdf; }

.partners {
  margin-top: 26px;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid #2f3547;
  background: linear-gradient(135deg, #0f1322, #0b0f1d);
  box-shadow: 0 12px 24px rgba(0,0,0,0.35);
}
.partners-head h2 { margin: 0 0 4px; color: #f4f7ff; }
.partners-head p { margin: 0 0 12px; color: #c3cde0; }
.partners-rail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.partner-tile {
  padding: 12px;
  text-align: center;
  border-radius: 10px;
  border: 1px dashed #2f3547;
  color: #c7d1e0;
  background: #0f1526;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}
.partner-card {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #2f3547;
  background: #0f1526;
  color: #c7d1e0;
  display: grid;
  gap: 8px;
  align-content: start;
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.partner-logo {
  width: 100%;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 20, 40, 0.55);
  border-radius: 10px;
  border: 1px solid #28314a;
}
.partner-logo img {
  max-height: 46px;
  max-width: 100%;
  object-fit: contain;
}
.partner-name {
  font-weight: 600;
  color: #e9f2ff;
}
.partner-desc {
  font-size: 13px;
  color: #c3cde0;
  line-height: 1.45;
}
.partner-link {
  font-size: 13px;
  color: #7dffa1;
  text-decoration: none;
}
.partner-link:hover {
  text-decoration: underline;
}

.contacts {
  margin-top: 26px;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid #2f3547;
  background: linear-gradient(135deg, #0f1322, #0b0f1d);
  box-shadow: 0 12px 24px rgba(0,0,0,0.35);
}
.contacts h2 { margin: 0 0 10px; color: #f4f7ff; }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}
.contact-card {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #2f3547;
  background: #0f1526;
  color: #c7d1e0;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.contact-card .label { font-weight: 600; color: #e9f2ff; margin-bottom: 4px; }
.contact-card a { color: #7dffa1; text-decoration: none; word-break: break-all; }
.contact-card a:hover { text-decoration: underline; }

.landing-footer {
  margin-top: 26px;
  padding: 18px;
  border-top: 1px solid #2a3040;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.footer-title { font-weight: 700; color: #f4f7ff; margin-bottom: 6px; }
.landing-footer p { margin: 0; color: #aeb9cd; }
.footer-links { display: flex; gap: 12px; flex-wrap: wrap; }
.footer-links a { color: #7dffa1; text-decoration: none; }

.visual-card:hover,
.recent-card:hover,
.price-card:hover,
.partner-card:hover,
.partner-tile:hover,
.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px rgba(0,0,0,0.45);
  border-color: rgba(125,255,161,0.35);
}

@keyframes glowShift {
  0% { transform: translateY(0) scale(1); opacity: 0.85; }
  50% { transform: translateY(-8px) scale(1.02); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 0.85; }
}

@keyframes barPulse {
  0%, 100% { transform: scaleX(1); opacity: 0.7; }
  50% { transform: scaleX(0.85); opacity: 1; }
}


/* ==== Main card (builder / stats) ==== */

.container {
  width: 100%;
  max-width: 1750px;
  background: radial-gradient(circle at top, #252b3a 0, #181b24 45%, #13151c 100%);
  border-radius: 16px;
  padding: 26px 28px 30px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.7);
  border: 1px solid rgba(255,255,255,0.04);
}

.admin-stats {
  margin: 8px 0 18px;
}
.admin-stats h2 {
  margin: 0 0 10px;
  font-size: 18px;
  color: #f4f7ff;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.stat-card {
  background: linear-gradient(145deg, #101629, #0b0f1e);
  border: 1px solid #2a345a;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.35);
  display: grid;
  gap: 6px;
}
.stat-label {
  font-size: 12px;
  color: #a8b3c5;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.stat-value {
  font-size: 20px;
  font-weight: 700;
  color: #e9f2ff;
}
.stat-value.expired {
  color: #ff6b6b;
}

.stat-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(0,0,0,0.45);
}

/* Nav dropdown */
.builder-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  position: relative;
}
.nav-area {
  display: flex;
  align-items: center;
  gap: 10px;
}
.menu-group {
  position: relative;
}
.nav-toggle {
  padding: 8px 12px;
  font-size: 14px;
  letter-spacing: 0.2px;
}
.nav-menu {
  display: none;
  flex-direction: column;
  gap: 6px;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 200px;
  padding: 10px;
  border-radius: 12px;
  background: linear-gradient(180deg, #1a2236, #111827);
  border: 1px solid #2a3552;
  box-shadow: 0 18px 28px rgba(0, 0, 0, 0.45);
  z-index: 20;
}
.nav-menu.open {
  display: flex;
  align-items: stretch;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  color: #e5e9f5;
  text-decoration: none !important;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.nav-link:hover {
  color: #7dffa1;
  border-color: rgba(125, 255, 161, 0.25);
  background: rgba(125, 255, 161, 0.08);
}

/* Small containers (login, redirect, etc.) */

.auth-container,
.redirect-container {
  width: 100%;
  max-width: 420px;
  background: radial-gradient(circle at top, #252b3a 0, #181b24 50%, #12131a 100%);
  border-radius: 16px;
  padding: 28px 26px 30px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.7);
  border: 1px solid rgba(255,255,255,0.06);
  margin: 80px auto 40px;
}

.auth-container h1,
.redirect-container h1 {
  text-align: center;
  margin-top: 0;
  margin-bottom: 18px;
  font-size: 22px;
}

/* Auth header (login/register language switch) */
.auth-header {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: -8px -4px 10px 0;
}

/* ==== Top line ==== */

.top-admin {
  text-align: right;
  font-size: 13px;
  color: #a8b3c5;
  margin-bottom: 6px;
}

.top-admin strong {
  color: #f6f6f6;
}

.lang-switch {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.lang-switch a {
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid #2a345a;
  background: rgba(15, 20, 40, 0.65);
  color: #c7d1e0;
  font-size: 12px;
  letter-spacing: 0.2px;
}

.lang-switch a.active {
  color: #0b1410;
  background: linear-gradient(135deg, rgba(125, 255, 161, 0.9), rgba(79, 201, 255, 0.9));
  border-color: transparent;
}

/* ==== Headings ==== */

h1 {
  margin-top: 4px;
  margin-bottom: 18px;
  font-size: 26px;
  text-align: center;
  letter-spacing: 0.02em;
}

/* ==== Forms / inputs ==== */

.form-group {
  margin-bottom: 16px;
}

label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  font-size: 14px;
  color: #d9e0ea;
}

.builder-labels {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
}

.builder-labels label {
  margin-bottom: 6px;
}

.builder-labels .builder-global-label {
  margin-left: auto;
  min-width: 220px;
}

.builder-configs {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(220px, 320px);
  gap: 14px;
  align-items: start;
}

.builder-block {
  background: #151b28;
  border: 1px solid #293249;
  border-radius: 10px;
  padding: 12px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.builder-block--password input {
  min-width: 0;
}

@media (max-width: 900px) {
  .builder-configs {
    grid-template-columns: 1fr;
  }
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="number"],
textarea {
  width: 100%;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid #343b4a;
  background: #1b1f28;
  color: #f3f4f7;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input::placeholder,
textarea::placeholder {
  color: #6f7686;
}

input:focus,
textarea:focus {
  border-color: #61dafb;
  box-shadow: 0 0 0 1px rgba(97,218,251,0.3);
  background: #181d25;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
input:-internal-autofill-selected {
  border: 1px solid #343b4a !important;
  -webkit-box-shadow: 0 0 0 30px #1b1f28 inset !important;
  -webkit-text-fill-color: #f3f4f7 !important;
  transition: background-color 5000s ease-in-out 0s;
}


textarea {
  min-height: 170px;
  resize: vertical;
}

/* ==== Domain group (input + button) ==== */

.domain-group {
  display: flex;
  gap: 10px;
}

.domain-group input {
  flex: 1;
}

/* ==== Buttons ==== */

button {
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  color: #f1f3f6;
  background: linear-gradient(to bottom, #0f5653, #2c303b);
  box-shadow: 0 4px 10px rgba(0,0,0,0.45);
  transition: transform 0.07s ease, box-shadow 0.07s ease, opacity 0.15s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.6);
  opacity: 0.95;
}

button:active {
  transform: translateY(0);
  box-shadow: 0 3px 8px rgba(0,0,0,0.7);
}

/* Special button colors by id */

#generateJsonBtn {
  background: linear-gradient(to bottom, #344834, #275b27);
  margin-right: auto;
}

#fetchAllBtn {
  background: linear-gradient(to bottom, #3b4452, #252a32);
}

#statsBtn {
  background: linear-gradient(to bottom, #2b86d1, #16507f);
}

#clearKvBtn,
#delete-admin {
  background: linear-gradient(to bottom, #7f1f1f, #411919);
}

#invitePageBtn {
  background: linear-gradient(to bottom, #2889e6, #175a9a);
}

#adminsManageBtn {
  background: linear-gradient(to bottom, #f3a032, #ad6712);
}

#addLinkBtn {
  background: linear-gradient(to bottom, #6275dc, #291f39);
}

#clearAllBtn {
  background: linear-gradient(to bottom, #7a7f8b, #494c55);
}

.removeLinkBtn {
  margin-top: 8px;
  background: linear-gradient(to bottom, #9f2833, #4a101c);
}

/* Small "Copy" buttons */

.copy-btn {
  align-self: flex-end;
  padding: 6px 12px;
  font-size: 13px;
  background: linear-gradient(to bottom, #3a3f4a, #262a33);
  margin-top: 10px;
}

.copy-links-btn,
.copy-json-btn {
  margin-left: auto;
}

/* ==== Layout for link rows & outputs ==== */

#links-container {
  margin-top: 6px;
}

.link-row {
  border-radius: 10px;
  border: 1px solid #2f3542;
  background: radial-gradient(circle at top left, #2a3143 0, #1a1f2a 50%, #151822 100%);
  padding: 14px 14px 12px;
  margin-bottom: 12px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.55);
}

.link-row.compact {
  padding: 10px 12px;
  margin-bottom: 10px;
}

.link-row.compact .link-row-body {
  gap: 10px;
}

.link-row.compact .link-main,
.link-row.compact .link-display,
.link-row.compact .link-buttons {
  gap: 6px;
}

.link-row.compact .form-group label {
  font-size: 12px;
  margin-bottom: 4px;
}

.link-row.compact input,
.link-row.compact textarea,
.link-row.compact select {
  padding: 6px 8px;
  font-size: 13px;
}

.link-row.compact .link-display h4,
.link-row.compact .link-buttons h4 {
  font-size: 14px;
  margin: 2px 0 4px;
}

.inline-group {
  display: flex;
  gap: 16px;
}

.inline-group .form-group {
  flex: 1;
}

.link-row-body {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
}

.link-main {
  flex: 0 1 300px;
  min-width: 240px;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.link-display {
  flex: 1 1 320px;
  min-width: 240px;
  border-left: 1px solid #2f3542;
  padding-left: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.link-display h4 {
  margin: 4px 0 6px;
  font-size: 15px;
  color: #c7d1e0;
}

.link-row-body .removeLinkBtn {
  align-self: flex-start;
  margin-top: auto;
}

.link-display .hint {
  font-size: 12px;
  color: #8fa1b5;
  margin-top: -6px;
}

.link-buttons {
  flex: 0 1 220px;
  min-width: 200px;
  border-left: 1px solid #2f3542;
  padding-left: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.link-buttons h4 {
  margin: 4px 0 6px;
  font-size: 15px;
  color: #c7d1e0;
}

.link-buttons .hint {
  font-size: 12px;
  color: #8fa1b5;
  margin-top: -6px;
}

/* Output (JSON / Links) */

.output-container {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 18px;
}

.output-box {
  flex: 1;
  min-width: 260px;
  display: flex;
  flex-direction: column;
}

.output-box label {
  margin-bottom: 6px;
}

.output-box textarea {
  min-height: 275px;
}

/* Action buttons row */

.create-delete-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

/* ==== Auth / error text ==== */

.error {
  color: #ff6b6b;
  margin-bottom: 10px;
  font-size: 14px;
}

.small-note {
  font-size: 13px;
  color: #a0a7b6;
  margin-top: 10px;
  /* text-align: center; */
}

/* ==== Redirect pages ==== */

.redirect-container p {
  text-align: center;
  margin-bottom: 16px;
}

.redirect-container .redirect-lead {
  color: #cfd7e6;
  margin-bottom: 10px;
}

.redirect-container .redirect-timer {
  font-weight: 600;
  color: #7dffa1;
}

.redirect-container form {
  margin-top: 14px;
}

.redirect-container input,
.redirect-container button {
  width: 100%;
  margin-top: 8px;
}

.redirect-container #redirect-btn {
  display: inline-block;
  margin-top: 14px;
  padding: 9px 18px;
  border-radius: 8px;
  background: linear-gradient(to bottom, #3f8bff, #2656a0);
  color: #f3f5ff;
  text-decoration: none;
}

/* Password form styling */
.redirect-container .timer-info {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #2f3544;
}

.redirect-container .bypass-btn {
  background: linear-gradient(to bottom, #3a3f4a, #262a33);
  border: 1px solid #343b4a;
  color: #e6e6e6;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  width: auto;
  margin-top: 10px;
}

.redirect-container .bypass-btn:hover {
  background: linear-gradient(to bottom, #4a505f, #303542);
}

/* Error pages */
.error-container {
  text-align: center;
  max-width: 500px;
  padding: 40px;
  background: radial-gradient(circle at top, #252b3a 0, #181b24 50%, #12131a 100%);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.7);
  border: 1px solid rgba(255,255,255,0.06);
  margin: 80px auto 40px;
}

.error-container h1 {
  margin: 0 0 16px 0;
  color: #ff6b6b;
  font-size: 26px;
}

.error-container p {
  margin: 0 0 20px 0;
  color: #b8c0e0;
}

.btn {
  background: linear-gradient(to bottom, #3a3f4a, #262a33);
  border: 1px solid #343b4a;
  color: #e6e6e6;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.btn:hover {
  background: linear-gradient(to bottom, #4a505f, #303542);
}

.hidden {
  display: none;
}

/* ==== Stats page ==== */

.stats-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-size: 14px;
}

.stats-table th,
.stats-table td {
  padding: 7px 10px;
  border-bottom: 1px solid #2f3544;
}

.stats-table .actions-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.domains-table th,
.domains-table td {
  padding: 5px 8px;
}

.domains-table .ns-cell {
  line-height: 1.1;
}

.stats-table th {
  text-align: left;
  background: #222736;
  font-weight: 600;
}

.stats-table tr:nth-child(even) {
  background: #171b26;
}

.btn-3d {
  padding: 6px 12px;
  border-radius: 6px;
  background: linear-gradient(180deg, #1f2b5a 0%, #121a36 100%);
  border: 1px solid #2a345a;
  color: #e6e6e6;
  cursor: pointer;
  box-shadow: 0 3px 0 #0b1024;
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.1s ease;
}
.btn-3d:hover {
  filter: brightness(1.05);
}
.btn-3d:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 #0b1024;
}

/* Canvas wrapper (for chart) */
canvas#statsChart {
  margin-top: 18px;
  border-radius: 10px;
  background: #11141d;
  box-shadow: 0 12px 26px rgba(0,0,0,0.6);
}

/* ==== Toast notifications ==== */

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  background: rgba(40,45,58,0.98);
  color: #f9f9f9;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 9999;
}

.toast-error {
  background: rgba(190,60,60,0.97);
}

.toast.visible {
  opacity: 1;
}

/* ==== Responsive ==== */

@media (max-width: 768px) {
  .container {
    padding: 22px 16px 26px;
  }
  .inline-group {
    flex-direction: column;
  }
  .create-delete-buttons {
    flex-direction: column;
  }
  .top-admin {
    text-align: left;
  }
}

@media (max-width: 900px) {
  .link-display {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid #2f3542;
    padding-top: 12px;
  }
  .link-buttons {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid #2f3542;
    padding-top: 12px;
  }
  .link-row-body {
    flex-direction: column;
  }
  .landing-hero {
    grid-template-columns: 1fr;
  }
  .landing-lang {
    position: static;
    align-self: flex-end;
    margin-bottom: 10px;
  }
  .pricing-cards {
    grid-template-columns: 1fr;
  }
}


.submit-container,
.register-button,
#redirect-section,
.form-group-captcha {
    display: flex;
    align-content: space-between;
    justify-content: space-between;
    align-items: center;
    flex-direction: column;
    padding: 10px;
}

.submit-container::after,
.register-button::after {
  content: "";
  width: min(80%, 300px);
  height: 2px;
  margin-top: 14px;
  background: linear-gradient(90deg, rgba(0,0,0,0), rgba(125,255,161,0.45), rgba(0,0,0,0));
}

.register-text,
.register-password {
  margin-top: 10px;
}

.alert.error-alert {
  margin: 10px 0 18px;
  padding: 10px 14px;
  border-radius: 6px;
  background: rgba(190, 60, 60, 0.15);
  border: 1px solid rgba(220, 90, 90, 0.7);
  color: #f7c4c4;
  font-size: 13px;
}
select,
select option {
  background: #0f1428;
  color: #e6e6e6;
  min-height: 25px;
  border-radius: 6px;
}
input[type="file"],
input[type="date"] {
  background: #0f1428;
  color: #e6e6e6;
  border: 1px solid #2a345a;
  min-height: 25px;
  border-radius: 6px;
}
input[type="file"]::-webkit-file-upload-button {
  background: #1a2244;
  color: #e6e6e6;
  border: 1px solid #2a345a;
  border-radius: 4px;
  padding: 6px 10px;
  cursor: pointer;
}
input[type="file"]::-ms-browse {
  background: #1a2244;
  color: #e6e6e6;
  border: 1px solid #2a345a;
  border-radius: 4px;
  padding: 6px 10px;
}
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(80%);
  cursor: pointer;
}

.file-input {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
}
.file-input input[type="file"] {
  position: absolute;
  left: -9999px;
}
.file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #2a345a;
  background: linear-gradient(to bottom, #1a2244, #0f1428);
  color: #e6e6e6;
  font-size: 13px;
  cursor: pointer;
  max-width: 100%;
  white-space: nowrap;
  flex: 0 0 auto;
}
.file-button:hover {
  filter: brightness(1.08);
}
.file-name {
  font-size: 12px;
  color: #a8b3c5;
  max-width: 100%;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#plan_code {
  width: 100%;
  font-size: 14px;
  min-height: 34px;
}

#referralLink,
#referralLink_but {
  max-width: 90% !important;
  min-height: 40px;
}

#visitorDomainSelect {
  min-height: 35px;
}

.export-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.export-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid #2a345a;
  border-radius: 10px;
  background: #141a2a;
}

.export-title {
  font-size: 13px;
  font-weight: 600;
  color: #dfe6f2;
}

#delete-partner {
  margin-left: auto;
}

.role-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 10, 20, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.role-modal-card {
  background: #141b2d;
  border: 1px solid #2a345a;
  border-radius: 14px;
  padding: 20px;
  width: min(520px, 92vw);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  color: #e6e6e6;
  width: 30%;
}

.role-modal-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.role-modal-subtitle {
  font-size: 14px;
  font-weight: 600;
  color: #c7d2e5;
  margin-bottom: 6px;
}

.role-modal-hint {
  font-size: 13px;
  color: #97a2bb;
  margin-bottom: 14px;
}

.role-modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.role-modal-custom {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.role-modal-custom label {
  font-size: 13px;
  color: #c7d2e5;
}

.role-modal-custom input {
  flex: 1;
  min-width: 120px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid #343b4a;
  background: #1b1f28;
  color: #e6e6e6;
}

.role-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.role-modal-error {
  background: rgba(200, 60, 60, 0.15);
  border: 1px solid rgba(200, 60, 60, 0.35);
  color: #f3a2a2;
  padding: 8px 10px;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 13px;
}

.role-modal-preset.role-modal-selected {
  box-shadow: 0 0 0 1px #3f77ff inset;
  background: #1c2a4a;
}
