/* ============================================================
   JS Tools — styles.css
   Design: clean, minimal, dark-capable
   ============================================================ */

:root {
  --bg: #0a0f1e;
  --bg-card: #111827;
  --bg-card-hover: #1a2235;
  --border: rgba(79, 142, 247, 0.18);
  --text: #ffffff;
  --text-muted: #c4c9db;
  --accent: #4f8ef7;
  --accent-hover: #6ba3ff;
  --accent-2: #a78bfa;
  --green: #34d399;
  --radius: 16px;
  --shadow: 0 4px 32px rgba(0, 0, 0, 0.7);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #000000;
    --bg-card: #0d1117;
    --bg-card-hover: #141b25;
    --border: rgba(79, 142, 247, 0.18);
    --text: #e8eaf0;
    --text-muted: #7a80a0;
    --shadow: 0 4px 32px rgba(0, 0, 0, 0.7);
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family:
    'Inter',
    system-ui,
    -apple-system,
    sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
}

/* ── Container ── */
.container {
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.3px;
}

.logo-mark {
  font-size: 1.3rem;
}

.logo-text strong {
  font-weight: 800;
  color: var(--accent);
}

.site-header nav {
  display: flex;
  gap: 8px;
}

.nav-link {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 8px;
  transition:
    color 0.15s,
    background 0.15s;
}

.nav-link:hover {
  color: #ffffff;
  background: rgba(79, 142, 247, 0.12);
}

.nav-link--io,
.nav-link--sc {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    background 0.15s,
    transform 0.1s;
  cursor: pointer;
  border: none;
}

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

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-tool {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  padding: 10px 20px;
  margin-top: auto;
}

.btn-tool:hover {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  transform: translateY(-1px);
}

/* ── Hero ── */
.hero {
  position: relative;
  padding: 140px 0 110px;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 50% at 50% 40%, rgba(79, 142, 247, 0.12) 0%, transparent 65%),
    radial-gradient(ellipse 80% 40% at 50% -10%, rgba(79, 142, 247, 0.22) 0%, transparent 70%);
}

/* Particle canvas */
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Floating orbs */
.hero-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  animation: orb-float 10s ease-in-out infinite;
}

.orb-1 {
  width: 480px;
  height: 480px;
  background: rgba(79, 142, 247, 0.22);
  top: -80px;
  left: -120px;
  animation-delay: 0s;
}

.orb-2 {
  width: 360px;
  height: 360px;
  background: rgba(167, 139, 250, 0.18);
  top: 0;
  right: -80px;
  animation-delay: -4s;
}

.orb-3 {
  width: 240px;
  height: 240px;
  background: rgba(52, 211, 153, 0.14);
  bottom: -40px;
  left: 42%;
  animation-delay: -7s;
}

@keyframes orb-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-28px) scale(1.04); }
}

/* Hero content sits above canvas + orbs */
.hero-content {
  position: relative;
  z-index: 1;
}

/* Badge pill */
.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 18px;
  border-radius: 999px;
  background: rgba(79, 142, 247, 0.1);
  border: 1px solid rgba(79, 142, 247, 0.28);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-bottom: 32px;
  animation: badge-in 0.6s ease both;
}

@keyframes badge-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -2px;
  margin-bottom: 24px;
  animation: hero-in 0.7s 0.1s ease both;
  color: #ffffff;
  text-shadow: 0 0 60px rgba(79, 142, 247, 0.3);
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(130deg, #74aaff 0%, #c4b0ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 32px rgba(79, 142, 247, 0.5));
}

@keyframes hero-in {
  from { opacity: 0.2; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  line-height: 1.8;
  animation: hero-in 0.7s 0.2s ease both;
}

/* CTA group */
.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 60px;
  animation: hero-in 0.7s 0.3s ease both;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

/* Stats bar */
.hero-stats {
  display: inline-flex;
  align-items: center;
  gap: 36px;
  padding: 18px 40px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  animation: hero-in 0.7s 0.45s ease both;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.stat-num {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  background: linear-gradient(130deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* ── Tools Section ── */
.tools-section {
  padding: 80px 0;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 40px;
  text-align: center;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow);
  transition:
    background 0.2s,
    transform 0.2s,
    box-shadow 0.2s;
}

.tool-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.tool-icon {
  font-size: 2.5rem;
  line-height: 1;
}

.tool-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.tool-name {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.tool-tagline {
  font-size: 0.95rem;
  color: var(--accent);
  font-weight: 600;
}

.tool-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.75;
}

.tool-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.tool-features li {
  font-size: 0.88rem;
  color: var(--text-muted);
  padding-left: 18px;
  position: relative;
}

.tool-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}

/* ── Why Section ── */
.why-section {
  padding: 80px 0 100px;
  background: color-mix(in srgb, var(--accent) 4%, var(--bg));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  text-align: center;
}

.why-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.why-icon {
  font-size: 2rem;
  line-height: 1;
}

.why-item h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

.why-item p {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 260px;
}

/* ── Footer ── */
.site-footer {
  padding: 32px 0;
}

.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.site-footer nav {
  display: flex;
  gap: 20px;
}

.site-footer nav a,
.footer-link {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  transition: color 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.site-footer nav a:hover,
.footer-link:hover {
  color: rgba(255, 255, 255, 0.9);
}

/* ── Ad Container ── */
.ad-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 8px 24px 24px;
}

/* ── Lang Toggle ── */
.btn-lang {
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.btn-lang:hover {
  color: #ffffff;
  background: rgba(79, 142, 247, 0.12);
  border-color: var(--accent);
}

/* ── Mode Switcher ── */
#modeSwitcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

.mode-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mode-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.15);
}

.mode-btn.active {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent);
  transform: scale(1.1);
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .container {
    padding: 0 16px;
  }

  .nav-link span {
    display: none;
  }

  .btn-lang .lang-text {
    display: none;
  }

  .hero {
    padding: 64px 0 56px;
  }

  .tool-card {
    padding: 24px;
  }

  .site-footer .container {
    flex-direction: column;
    text-align: center;
  }
}

/* ── Snapcast live demo ── */
.sc-demo {
  margin-top: 40px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 28px;
}

.sc-demo__label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: var(--accent);
  margin-bottom: 20px;
  text-transform: uppercase;
}

.sc-demo__intro {
  margin-bottom: 24px;
}

.sc-demo__intro h3 {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
}

.sc-demo__intro p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.6;
  max-width: 600px;
  margin: 0;
}

.sc-demo__layout {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 24px;
  align-items: start;
}

.sc-demo__screen {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0a0a0a;
}

.sc-demo__screen-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sc-demo__screen-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.sc-demo__screen-url {
  width: auto !important;
  height: auto !important;
  border-radius: 0 !important;
  background: rgba(255, 255, 255, 0.08) !important;
  padding: 2px 8px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  font-family: monospace;
  margin-left: 4px;
}

.sc-demo__screen iframe {
  display: block;
  width: 100%;
  height: 565px;
  border: none;
}

.sc-demo__qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.sc-demo__qr iframe {
  width: 350px;
  height: 600px;
  border: none;
  border-radius: 12px;
  background: #fff;
}

.sc-demo__qr-note {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}

.sc-demo__contact {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sc-demo__contact > p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 12px;
}

.sc-demo__contact-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s;
}

.contact-item:hover {
  background: rgba(79, 142, 247, 0.12);
  border-color: var(--accent);
}

.contact-icon {
  font-size: 16px;
}

@media (max-width: 768px) {
  .sc-demo__layout {
    grid-template-columns: 1fr;
  }

  .sc-demo__screen iframe {
    height: 260px;
  }
}
