:root {
  --primary: #10b981;
  --primary-dark: #059669;
  --dark: #111827;
  --gray: #6b7280;
  --light: #f3f4f6;
  --white: #ffffff;
  --font: "Inter", sans-serif;
  --border: rgba(0, 0, 0, 0.08);
}

:root[data-theme="dark"] {
  --primary: #34d399;
  --primary-dark: #10b981;
  --dark: #e5e7eb;
  --gray: #9ca3af;
  --light: #1f2933;
  --white: #0b0f14;
  --border: rgba(255, 255, 255, 0.1);
  background-color: var(--white);
}

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

body {
  font-family: var(--font);
  color: var(--dark);
  background-color: var(--white);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition:
    background-color 0.3s,
    color 0.3s;
}

main a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

main a:hover {
  color: var(--primary-dark);
  text-decoration-thickness: 2px;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* --- HEADER --- */
.header {
  padding: 16px 0;
  border-bottom: 1px solid var(--light);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo */
.logo {
  font-weight: 800;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--dark);
}

.logo img {
  display: block;
  width: 32px;
  height: 32px;
}

/* Right side of header */
.header-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

/* Nav Link  */
.nav-link {
  text-decoration: none;
  color: var(--gray);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s;
}
.nav-link:hover {
  color: var(--primary);
}

/* Controls Pill (Container for Lang + Theme) */
.controls-pill {
  display: flex;
  align-items: center;
  padding: 4px 6px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background-color: var(--white);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

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

.lang-switch a {
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray);
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
}

.lang-switch a:hover {
  color: var(--primary);
}

.lang-switch a.active {
  color: var(--dark);
  background-color: var(--light);
}

.divider {
  color: var(--gray);
  opacity: 0.3;
  font-size: 0.8rem;
  margin: 0 2px;
}

.theme-toggle {
  margin-left: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.theme-toggle:hover {
  background-color: var(--light);
}

/* --- HERO --- */
.hero {
  padding: 80px 0 60px;
  text-align: center;
}
.hero-title {
  font-size: 3.5rem;
  line-height: 1.1;
  margin-bottom: 24px;
}

:root[data-theme="dark"] .hero-title {
  background: linear-gradient(to right, #e5e7eb, var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

:root[data-theme="light"] .hero-title {
  background: linear-gradient(to right, var(--dark), var(--primary-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero h3 {
  font-weight: 500;
  font-size: 1.25rem;
  color: var(--dark);
  margin-bottom: 16px;
  line-height: 1.4;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--gray);
  max-width: 700px;
  margin: 0 auto 40px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 60px;
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.2s ease;
}

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

:root[data-theme="dark"] .btn-primary {
  color: #0b0f14;
  background: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-outline {
  border: 2px solid var(--light);
  color: var(--dark);
  background: transparent;
}
:root[data-theme="dark"] .btn-outline {
  border-color: var(--gray);
  color: var(--dark);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* --- WIDGET VISUAL --- */
.placeholder-widget {
  background: white;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
  border-radius: 16px;
  max-width: 500px;
  margin: 0 auto;
  padding: 24px;
  text-align: left;
  border: 1px solid var(--light);
}

:root[data-theme="dark"] .placeholder-widget {
  background: #1f2933;
  border-color: #374151;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.widget-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--gray);
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--light);
}
:root[data-theme="dark"] .widget-header {
  border-bottom-color: #374151;
}

.dot {
  width: 8px;
  height: 8px;
  background: #ddd;
  border-radius: 50%;
}
.dot.listening {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
  animation: pulse 1.5s infinite;
}
.widget-text {
  font-size: 1.1rem;
  color: var(--dark);
  line-height: 1.5;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* --- FEATURES --- */
.features {
  padding: 80px 0;
  background: var(--light);
}
:root[data-theme="dark"] .features {
  background: #161e27;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 60px;
  color: var(--dark);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.feature-card {
  background: var(--white);
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
  transition: transform 0.2s;
  border: 1px solid transparent;
}
:root[data-theme="dark"] .feature-card {
  background: #1f2933;
  border-color: #374151;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-card .icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
  display: inline-block;
}

.feature-card h3 {
  margin-bottom: 12px;
  font-size: 1.25rem;
  color: var(--dark);
}

.feature-card p {
  color: var(--gray);
  font-size: 1rem;
  line-height: 1.6;
}

/* --- FOOTER --- */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--light);
  margin-top: auto;
}
:root[data-theme="dark"] .footer {
  border-top-color: #374151;
}

.footer .container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}

.footer .container p:first-child {
  justify-self: start;
}

.footer .container p:last-child {
  justify-self: center;
}
.footer a {
  color: var(--gray);
  text-decoration: none;
  transition: color 0.2s;
}
.footer a:hover {
  color: var(--primary);
}

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .header-content {
    /* На мобільному можна змінити лейаут */
  }

  .header-right {
    gap: 12px;
  }

  .nav-link {
    font-size: 0.85rem;
  }

  .footer .container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 10px;
  }

  .footer .container p:first-child,
  .footer .container p:last-child {
    justify-self: center;
  }
}
