/* PULSAR.AI Landing & Legal Pages — Dark Theme */

:root {
  --bg-primary: #0a0a12;
  --bg-secondary: #12121e;
  --bg-card: #1a1a2e;
  --accent: #6c5ce7;
  --accent-hover: #7e6ff0;
  --text-primary: #ffffff;
  --text-secondary: #a0a0b8;
  --text-muted: #6c6c80;
  --border: #2a2a3e;
  --radius: 12px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  padding-top: 56px;   /* space for fixed header */
  padding-bottom: 100px; /* space for fixed footer */
}

.hero, .faq, .legal, .footer, .lang-switcher, .stats, .calc, .dashboard, .chart-section {
  position: relative;
  z-index: 1;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* ——— Landing Page ——— */

.hero {
  text-align: center;
  padding: 80px 20px 60px;
  background: linear-gradient(180deg, #12121e 0%, var(--bg-primary) 100%);
}

.hero__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-bottom: 48px;
}

.hero__logo {
  width: 180px;
  height: auto;
}

.hero__brand-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.hero__brand-name {
  font-size: 3.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.hero__brand-dot {
  color: var(--text-primary);
}

.hero__brand-ink {
  color: var(--accent);
}

.hero__tagline {
  font-size: 1.2rem;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 500;
}

@media (max-width: 600px) {
  .hero__logo {
    width: 140px;
  }
  .hero__brand-name {
    font-size: 2.6rem;
  }
  .hero__tagline {
    font-size: 1rem;
  }
}

.hero__title {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
  color: var(--text-secondary);
}

.hero__subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 40px;
}

.hero__cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.hero__cta .btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 36px;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.hero__cta .btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  text-decoration: none;
}

.hero__cta .btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Telegram widget container */
.tg-widget {
  margin-top: 8px;
}

/* ——— FAQ Section ——— */

.faq {
  max-width: 720px;
  margin: 0 auto;
  padding: 60px 20px;
}

.faq__heading {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 36px;
}

.faq__item {
  border-bottom: 1px solid var(--border);
}

.faq__question {
  width: 100%;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.05rem;
  font-weight: 600;
  text-align: left;
  padding: 20px 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: inherit;
}

.faq__question::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--accent);
  transition: transform 0.2s;
  flex-shrink: 0;
  margin-left: 16px;
}

.faq__item.open .faq__question::after {
  content: '\2212'; /* minus */
}

.faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq__answer-inner {
  padding: 0 0 20px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ——— Dashboard (Stats + Calc side by side) ——— */

.dashboard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 24px 40px;
  align-items: stretch;
}

/* Shared panel frame for both Stats and Calc */
.dashboard > .stats,
.dashboard > .calc {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
}

/* ——— Stats (left panel) ——— */

.stats {
  text-align: center;
}

.stats__heading {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.stats__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  flex: 1;
  align-content: center;
}

.stats__card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.stats__value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.stats__label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}

/* ——— Calculator (right panel) ——— */

.calc {
  text-align: center;
}

.calc__heading {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.calc__controls {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 24px;
  flex: 1;
}

.calc__input-row,
.calc__mode-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.calc__label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.calc__input {
  width: 180px;
  padding: 10px 16px;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.calc__input:focus {
  border-color: var(--accent);
}

/* Range slider */
.calc__slider {
  width: 100%;
  max-width: 320px;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--border);
  border-radius: 3px;
  outline: none;
}

.calc__slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid var(--bg-primary);
  box-shadow: 0 0 8px rgba(108, 92, 231, 0.4);
}

.calc__slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid var(--bg-primary);
  box-shadow: 0 0 8px rgba(108, 92, 231, 0.4);
}

/* Mode toggle */
.calc__mode-toggle {
  display: flex;
  gap: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.calc__mode-btn {
  padding: 10px 24px;
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--bg-card);
  color: var(--text-secondary);
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, color 0.2s;
}

.calc__mode-btn.active {
  background: var(--accent);
  color: #fff;
}

.calc__mode-btn:hover:not(.active) {
  color: var(--text-primary);
}

/* Projection cards */
.calc__projections {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.calc__proj-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.calc__proj-card--highlight {
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(108, 92, 231, 0.15);
}

.calc__proj-days {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}

.calc__proj-profit {
  font-size: 1.4rem;
  font-weight: 700;
  color: #00d68f;
  letter-spacing: -0.02em;
}

.calc__disclaimer {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ——— Dashboard Responsive ——— */

@media (max-width: 768px) {
  .dashboard {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 40px 16px 30px;
  }

  .dashboard > .stats,
  .dashboard > .calc {
    padding: 24px 16px;
  }

  .stats__heading,
  .calc__heading {
    font-size: 1.4rem;
  }

  .stats__value {
    font-size: 1.4rem;
  }

  .calc__projections {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .calc__proj-profit {
    font-size: 1.2rem;
  }

  .calc__mode-btn {
    padding: 10px 20px;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .calc__projections {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* ——— Dashboard RTL ——— */

[dir="rtl"] .dashboard {
  direction: rtl;
}

[dir="rtl"] .calc__input {
  direction: ltr; /* Numbers always LTR */
}

/* ——— Volume Chart Section ——— */

.chart-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 24px 60px;
}

.chart-section__heading {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.chart-section__wrap {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 20px 16px;
  height: 320px;
  position: relative;
}

.chart-section__wrap canvas {
  width: 100% !important;
  height: 100% !important;
}

@media (max-width: 768px) {
  .chart-section {
    padding: 10px 16px 40px;
  }

  .chart-section__heading {
    font-size: 1.4rem;
  }

  .chart-section__wrap {
    height: 240px;
    padding: 16px 12px 12px;
  }
}

/* ——— Footer ——— */

.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  border-top: 1px solid var(--border);
  padding: 16px 20px;
  text-align: center;
  background: rgba(10, 10, 18, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  margin-bottom: 8px;
  list-style: none;
}

.footer__links a {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

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

.footer__copy {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ——— Legal Document Pages ——— */

.legal {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 20px 40px;
}

.legal__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.legal__back:hover {
  color: var(--accent);
  text-decoration: none;
}

.legal h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.legal__effective {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 36px;
}

.legal h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-top: 36px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.legal h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 8px;
}

.legal p {
  margin-bottom: 14px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.75;
}

.legal ul, .legal ol {
  margin-bottom: 14px;
  padding-left: 24px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.75;
}

.legal li {
  margin-bottom: 6px;
}

.legal strong {
  color: var(--text-primary);
}

.legal a {
  color: var(--accent);
}

/* ——— Language Switcher ——— */

.lang-switcher {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 12px 20px;
  flex-wrap: wrap;
  background: rgba(10, 10, 18, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.lang-switcher__btn {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.lang-switcher__btn:hover {
  color: var(--text-primary);
  border-color: var(--accent);
}

.lang-switcher__btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* RTL support */
[dir="rtl"] .faq__question {
  text-align: right;
}

[dir="rtl"] .faq__question::after {
  margin-left: 0;
  margin-right: 16px;
}

[dir="rtl"] .legal ul, [dir="rtl"] .legal ol {
  padding-left: 0;
  padding-right: 24px;
}

[dir="rtl"] .legal__back {
  direction: rtl;
}

/* ——— Responsive ——— */

/* ——— Social Float (bottom-right) ——— */

.social-float {
  position: fixed;
  bottom: 100px;
  right: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
  z-index: 99;
}

.social-float__title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  width: 100%;
}

.social-float__links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.social-float__links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fff;
  color: #1a1a2e;
  transition: transform 0.15s, box-shadow 0.2s;
}

.social-float__links a:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 16px rgba(108, 92, 231, 0.3);
  text-decoration: none;
}

.social-float__links a svg {
  width: 24px;
  height: 24px;
}

.social-float__apps {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.app-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: #fff;
  border-radius: 10px;
  color: #1a1a2e;
  transition: transform 0.15s, box-shadow 0.2s;
  text-decoration: none;
}

.app-badge:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 16px rgba(108, 92, 231, 0.3);
  text-decoration: none;
  color: #1a1a2e;
}

.app-badge svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.app-badge__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  font-weight: 600;
  font-size: 0.95rem;
}

.app-badge__text small {
  font-size: 0.6rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* ── Support Chat Button ── */
.support-chat {
  position: fixed;
  bottom: 32px;
  bottom: calc(32px + env(safe-area-inset-bottom, 0px));
  left: 20px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 12px;
}

.support-chat__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0088cc 0%, #00bbff 100%);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(0, 136, 204, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
  flex-shrink: 0;
  position: relative;
}

.support-chat__btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(0, 136, 204, 0.55);
}

.support-chat__btn svg {
  width: 28px;
  height: 28px;
}

.support-chat__btn::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: rgba(0, 136, 204, 0.25);
  animation: support-pulse 2s ease-in-out infinite;
  z-index: -1;
}

@keyframes support-pulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.25); opacity: 0; }
}

.support-chat__tooltip {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 14px;
  color: var(--text-primary);
  font-size: 0.82rem;
  line-height: 1.3;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.3s, transform 0.3s;
}

.support-chat:hover .support-chat__tooltip {
  opacity: 1;
  transform: translateX(0);
}

.support-chat__tooltip strong {
  color: #00bbff;
  display: block;
  font-size: 0.85rem;
}

@media (max-width: 600px) {
  .hero {
    padding: 60px 16px 40px;
  }

  .hero__title {
    font-size: 1.8rem;
  }

  .hero__subtitle {
    font-size: 1rem;
  }

  .faq {
    padding: 40px 16px;
  }

  .faq__heading {
    font-size: 1.5rem;
  }

  .legal {
    padding: 24px 16px 60px;
  }

  .legal h1 {
    font-size: 1.5rem;
  }

  .legal h2 {
    font-size: 1.15rem;
  }

  .social-float {
    position: static;
    width: 100%;
    padding: 40px 20px;
    margin-bottom: 80px;
    align-items: center;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
  }

  .social-float__title {
    font-size: 1rem;
    margin-bottom: 8px;
  }

  .social-float__links {
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
  }

  .social-float__links a {
    width: 44px;
    height: 44px;
  }

  .social-float__links a svg {
    width: 22px;
    height: 22px;
  }

  .social-float__apps {
    flex-direction: row;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .app-badge {
    padding: 10px 16px;
  }

  .app-badge svg {
    width: 26px;
    height: 26px;
  }

  .app-badge__text {
    font-size: 0.9rem;
  }

  .app-badge__text small {
    font-size: 0.55rem;
  }

  .support-chat {
    bottom: 16px;
    left: 16px;
  }

  .support-chat__tooltip {
    display: none;
  }
}
