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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f8fafc;
  color: #1e293b;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  padding-bottom: 3rem;
  overflow-x: hidden;
}

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

/* ========== HEADER ========== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  background: rgba(248, 250, 252, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.5);
}

.header-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 2rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo svg {
  height: 1.5rem;
  width: auto;
  display: block;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}

.nav > a,
.nav-dropdown-label {
  font-size: 0.875rem;
  font-weight: 400;
  color: #1e293b;
  transition: color 0.2s;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.nav > a:hover {
  color: #000;
}

/* ── Nav Dropdowns ─────────────────────────────── */
.nav-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-dropdown-label {
  cursor: pointer;
  user-select: none;
  padding: 0.25rem 0;
}

.nav-dropdown-label::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 5px;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 4px solid currentColor;
  transition: transform 0.25s ease;
}

.nav-dropdown:hover .nav-dropdown-label::after {
  transform: rotate(180deg);
}

.nav-dropdown:hover .nav-dropdown-label,
.nav-dropdown-label:hover {
  color: #000;
}

/* invisible bridge so mouse can travel from label to menu */
.nav-dropdown::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 12px;
}

.nav-dropdown-menu {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  top: calc(100% + 10px);
  left: -0.75rem;
  min-width: 280px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(226,232,240,0.6);
  border-radius: 1rem;
  box-shadow: 0 12px 40px rgba(15,23,42,0.08), 0 2px 8px rgba(15,23,42,0.04);
  padding: 0.5rem;
  z-index: 1000;
  flex-direction: column;
  gap: 2px;
  transform: translateY(6px);
  transition: opacity 0.22s ease, visibility 0.22s ease, transform 0.22s ease;
  pointer-events: none;
}

/* top pointer arrow */
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 1.25rem;
  width: 12px;
  height: 12px;
  background: rgba(255,255,255,0.92);
  border-top: 1px solid rgba(226,232,240,0.6);
  border-left: 1px solid rgba(226,232,240,0.6);
  transform: rotate(45deg);
  border-radius: 2px 0 0 0;
}

.nav-dropdown:hover .nav-dropdown-menu {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.6rem 0.75rem;
  border-radius: 0.625rem;
  transition: background 0.18s ease, transform 0.18s ease;
  text-decoration: none;
}

.nav-dropdown-item:hover {
  background: linear-gradient(135deg, #f1f5f9 0%, #e8edf4 100%);
  transform: translateX(2px);
}

.nav-dropdown-icon {
  font-size: 1.125rem;
  line-height: 1.4;
  flex-shrink: 0;
}

.nav-dropdown-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.nav-dropdown-name {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #1e293b;
  white-space: nowrap;
}

.nav-dropdown-item:hover .nav-dropdown-name {
  color: #0f172a;
}

.nav-dropdown-desc {
  font-size: 0.6875rem;
  color: #94a3b8;
  white-space: nowrap;
}

/* simple link fallback (kept for single-item dropdowns) */
.nav-dropdown-menu > a:not(.nav-dropdown-item) {
  display: block;
  padding: 0.55rem 0.75rem;
  font-size: 0.8125rem;
  color: #334155;
  white-space: nowrap;
  border-radius: 0.625rem;
  transition: background 0.18s ease, color 0.18s ease;
}

.nav-dropdown-menu > a:not(.nav-dropdown-item):hover {
  background: linear-gradient(135deg, #f1f5f9 0%, #e8edf4 100%);
  color: #0f172a;
}

/* ── Mobile Nav Dropdowns ──────────────────────── */
.mobile-nav-dropdown {
  display: flex;
  flex-direction: column;
}

.mobile-nav-dropdown-label {
  font-size: 0.875rem;
  font-weight: 400;
  color: #1e293b;
  cursor: pointer;
  padding: 0.5rem 0;
}

.mobile-nav-dropdown-label::after {
  content: ' ▾';
  font-size: 0.7rem;
}

.mobile-nav-dropdown-label::after {
  content: ' ▾';
  font-size: 0.7rem;
}

.mobile-nav-dropdown-menu {
  display: none;
  flex-direction: column;
  padding-left: 1rem;
}

.mobile-nav-dropdown.open .mobile-nav-dropdown-menu {
  display: flex;
}

.mobile-nav-dropdown-menu a {
  font-size: 0.8125rem;
  color: #475569;
  padding: 0.35rem 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.btn-lang {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 500;
  font-family: inherit;
  color: #64748b;
  background: transparent;
  border: 1px solid #e2e8f0;
  padding: 0.3125rem 0.75rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  letter-spacing: 0.02em;
}

.btn-lang:hover {
  color: #1e293b;
  border-color: #cbd5e1;
  background: #f8fafc;
}

.btn-login {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 500;
  font-family: inherit;
  color: #1e293b;
  background: #fff;
  border: 1px solid #e2e8f0;
  padding: 0.4375rem 1.125rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.btn-login:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.btn-signup {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 500;
  font-family: inherit;
  color: #fff;
  background: #0f172a;
  border: 1px solid #0f172a;
  padding: 0.4375rem 1.125rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-signup:hover {
  background: #1e293b;
}

.btn-primary {
  display: inline-block;
  background: #1e293b;
  color: #fff;
  padding: 0.625rem 1.5rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: background 0.2s;
}

.btn-primary:hover {
  background: #334155;
}

.btn-outline {
  display: inline-block;
  background: transparent;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 0.625rem 1.5rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-outline:hover {
  background: #f1f5f9;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: #1e293b;
  padding: 0.25rem;
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 4rem;
  left: 0;
  right: 0;
  background: rgba(248, 250, 252, 0.98);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid #e2e8f0;
  z-index: 49;
  padding: 1rem 2rem 1.5rem;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav a {
  font-size: 0.9375rem;
  color: #1e293b;
  padding: 0.5rem 0;
}

.mobile-nav-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e2e8f0;
}

/* ========== MAIN ========== */
.main {
  padding: 0 1rem;
  margin-top: 2.5rem;
  background-image: radial-gradient(circle, rgba(203,213,225,0.4) 0.6px, transparent 0.6px);
  background-size: 28px 28px;
  background-position: center;
}

/* ========== SECTION HEADERS ========== */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  z-index: 1;
}

.section-title {
  font-size: 2rem;
  font-weight: 600;
  color: #1e293b;
  position: relative;
  display: inline-block;
}

.section-header .section-title::after {
  content: '';
  display: block;
  width: 3rem;
  height: 3px;
  margin: 0.75rem auto 0;
  border-radius: 2px;
  background: linear-gradient(90deg, #818cf8, #2dd4bf);
}

.section-subtitle {
  margin-top: 0.75rem;
  font-size: 1rem;
  color: #64748b;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

/* ========== HERO ========== */
.hero-wrapper {
  max-width: 72rem;
  margin: 0 auto;
  position: relative;
}

.hero-bg-svg {
  position: absolute;
  inset: -4rem -6rem;
  width: calc(100% + 12rem);
  height: calc(100% + 8rem);
  pointer-events: none;
  z-index: 0;
}

.hero-card {
  background: rgba(248,250,252,0.55);
  border-radius: 3rem;
  padding: 4rem 1.5rem;
  box-shadow: 12px 12px 24px rgba(226,232,240,0.6), -12px -12px 24px #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.6);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(241, 245, 249, 0.5);
  border: 1px solid #e2e8f0;
  padding: 0.375rem 1rem;
  border-radius: 9999px;
  margin-bottom: 2rem;
}

.badge-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #34d399;
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0.4); }
  50% { box-shadow: 0 0 0 6px rgba(52,211,153,0); }
}

.badge-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.1em;
}

.hero-title {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 600;
  color: #1e293b;
  max-width: 56rem;
  line-height: 1.1;
  background: linear-gradient(135deg, #1e293b 0%, #312e81 50%, #1e293b 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: heroGradient 6s ease-in-out infinite;
}

@keyframes heroGradient {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

.hero-subtitle {
  margin-top: 1.5rem;
  font-size: 1.125rem;
  color: #64748b;
  max-width: 42rem;
  line-height: 1.75;
}

.hero-buttons {
  margin-top: 2.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-buttons .btn-primary {
  padding: 0.875rem 2rem;
  font-size: 1rem;
}

.hero-buttons .btn-outline {
  padding: 0.875rem 2rem;
  font-size: 1rem;
}

.partners {
  margin-top: 6rem;
  padding-top: 3rem;
  border-top: 1px solid rgba(226, 232, 240, 0.6);
  width: 100%;
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
}

.partners-label {
  font-size: 1rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 2rem;
  text-align: center;
}

.partners-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2rem;
}

.partners-list span {
  font-size: 1.125rem;
  font-weight: 600;
  color: #94a3b8;
  cursor: default;
  transition: color 0.2s;
}

.partners-list span:hover {
  color: #475569;
}

/* ========== FEATURES ========== */
.features-wrapper {
  max-width: 72rem;
  margin: 5rem auto 0;
  position: relative;
  overflow: hidden;
}

.features-bg-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  position: relative;
  z-index: 1;
}

.feature-card {
  background: #f8fafc;
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: 12px 12px 24px #e2e8f0, -12px -12px 24px #ffffff;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  border: 1px solid transparent;
  position: relative;
  z-index: 1;
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: rgba(129,140,248,0.2);
  box-shadow: 12px 12px 24px #e2e8f0, -12px -12px 24px #ffffff, 0 0 0 1px rgba(129,140,248,0.08);
}

.feature-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.feature-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
}

.feature-icon {
  width: 2rem;
  height: 2rem;
  color: #94a3b8;
  flex-shrink: 0;
  transition: color 0.3s;
}

.feature-card:hover .feature-icon {
  color: #818cf8;
}

.feature-card p {
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.75;
}

/* ========== PRODUCTS ========== */
.products-wrapper {
  max-width: 72rem;
  margin: 5rem auto 0;
  position: relative;
}

.products-grid {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.5rem;
}

.products-grid::-webkit-scrollbar {
  height: 4px;
}

.products-grid::-webkit-scrollbar-track {
  background: transparent;
}

.products-grid::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 2px;
}

.products-grid .product-card {
  min-width: 300px;
  flex: 0 0 300px;
  scroll-snap-align: start;
}

.product-card {
  background: #f8fafc;
  border-radius: 1.5rem;
  padding: 2rem 1.75rem;
  box-shadow: 12px 12px 24px #e2e8f0, -12px -12px 24px #ffffff;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  border: 1px solid transparent;
}

.product-card:hover {
  transform: translateY(-3px);
  border-color: rgba(45,212,191,0.25);
  box-shadow: 12px 12px 24px #e2e8f0, -12px -12px 24px #ffffff, 0 0 0 1px rgba(45,212,191,0.1);
}

a.product-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.product-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #eef2ff 0%, #f0fdfa 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: #475569;
  transition: background 0.3s, transform 0.3s;
}

.product-card:hover .product-icon {
  background: linear-gradient(135deg, #e0e7ff 0%, #ccfbf1 100%);
  transform: scale(1.05);
}

.product-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 0.75rem;
}

.product-card p {
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.7;
}

/* ========== CTA ========== */
.cta-wrapper {
  max-width: 72rem;
  margin: 5rem auto 0;
  position: relative;
}

.cta-card {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
  border-radius: 2rem;
  padding: 4rem 2rem;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
}

.cta-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 40rem;
  height: 40rem;
  background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, transparent 60%);
  pointer-events: none;
}

.cta-card::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: -15%;
  width: 30rem;
  height: 30rem;
  background: radial-gradient(circle, rgba(45,212,191,0.10) 0%, transparent 60%);
  pointer-events: none;
}

.cta-card h2 {
  font-size: 2rem;
  font-weight: 600;
  color: #fff;
  position: relative;
  z-index: 1;
}

.cta-card p {
  margin-top: 0.75rem;
  font-size: 1rem;
  color: #94a3b8;
  position: relative;
  z-index: 1;
}

.cta-buttons {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.cta-buttons .btn-primary {
  background: #fff;
  color: #0f172a;
  padding: 0.875rem 2rem;
  font-size: 1rem;
}

.cta-buttons .btn-primary:hover {
  background: #f1f5f9;
}

.cta-buttons .btn-outline {
  border-color: #475569;
  color: #e2e8f0;
  padding: 0.875rem 2rem;
  font-size: 1rem;
}

.cta-buttons .btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* ========== PRODUCT PAGE ========== */
.pp-wrapper {
  max-width: 72rem;
  margin: 3rem auto 0;
  padding: 0 1.5rem;
}

.pp-tabs {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 2rem;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}

.pp-tabs::-webkit-scrollbar {
  height: 3px;
}

.pp-tabs::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 2px;
}

.pp-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  scroll-snap-align: start;
  transition: all 0.2s ease;
}

.pp-tab:hover {
  border-color: #a5b4fc;
  color: #4338ca;
}

.pp-tab:focus { outline: none; }

.pp-tab.active {
  border-color: #a5b4fc;
  background: #eef2ff;
  color: #4338ca;
}

.pp-tab-icon {
  font-size: 1.125rem;
}

.pp-panels {
  position: relative;
}

.pp-panel {
  display: none;
}

.pp-panel.active {
  display: block;
}

.pp-panel-header {
  margin-bottom: 2rem;
}

.pp-panel-header h2 {
  font-size: 1.75rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.pp-panel-header p {
  font-size: 1rem;
  color: #64748b;
  line-height: 1.6;
  max-width: 52rem;
}

.pp-panel-demo {
  margin-bottom: 2rem;
}

.pp-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 320px;
  border: 2px dashed #e2e8f0;
  border-radius: 1rem;
  background: #f8fafc;
  color: #94a3b8;
}

.pp-placeholder p {
  font-size: 0.9375rem;
  font-weight: 500;
}

.pp-panel-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 4rem;
}

/* ========== FOOTER ========== */
.footer-wrapper {
  max-width: 72rem;
  margin: 3rem auto 0;
}

.footer-card {
  background: rgba(248,250,252,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 3rem;
  padding: 2.5rem;
  box-shadow: 12px 12px 24px #e2e8f0, -12px -12px 24px #ffffff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2rem;
}

.footer-brand .brand-name {
  margin-bottom: 1rem;
}

.footer-brand .brand-desc {
  font-size: 0.875rem;
  color: #94a3b8;
  line-height: 1.75;
  padding-right: 1rem;
}

.footer-brand .brand-contact {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: #64748b;
}

.footer-column h4 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #1e293b;
  margin-bottom: 1.5rem;
}

.footer-column ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.footer-column ul a {
  font-size: 0.875rem;
  color: #64748b;
  transition: color 0.2s;
}

.footer-column ul a:hover {
  color: #1e293b;
}

.footer-bottom {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(226, 232, 240, 0.6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: #94a3b8;
}

.footer-legal {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.footer-legal .icp {
  font-size: 0.75rem;
  color: #94a3b8;
  transition: color 0.2s;
}

.footer-legal .icp:hover {
  color: #475569;
}

.footer-socials {
  display: flex;
  gap: 1.5rem;
}

.footer-socials a {
  color: #94a3b8;
  transition: color 0.2s;
}

.footer-socials a:hover {
  color: #475569;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .nav { display: none; }
  .header-actions .btn-login { display: none; }
  .mobile-menu-btn { display: block; }

  .hero-card { padding: 3rem 1.25rem; border-radius: 2rem; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
  .footer-legal { flex-direction: column; gap: 0.5rem; }
  .partners-list { gap: 1.5rem; }
  .footer-card { padding: 2rem 1.5rem; border-radius: 2rem; }
  .cta-card { padding: 3rem 1.5rem; border-radius: 1.5rem; }
  .section-title { font-size: 1.5rem; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .hero-card { padding: 4rem 2rem; }
}

@media (min-width: 1024px) {
  .hero-card { padding: 6rem 1.5rem; }
  .partners-list { gap: 4rem; }
  .footer-card { padding: 4rem; }
}

/* ========== AUTH MODALS ========== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
}

.modal-overlay.open {
  display: flex;
}

.modal-box {
  background: #fff;
  border-radius: 1rem;
  width: 100%;
  max-width: 26rem;
  margin: 1rem;
  padding: 2.5rem 2rem 2rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.25rem;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  transition: color 0.15s;
}

.modal-close:hover {
  color: #1e293b;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 0.5rem;
  text-align: center;
}

.auth-sso-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  font-size: 0.6875rem;
  color: #94a3b8;
  margin-bottom: 1.25rem;
  text-align: center;
}

.auth-sso-badge svg {
  width: 0.75rem;
  height: 0.75rem;
  flex-shrink: 0;
}

.auth-sso-badge .amphion-brand {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-error {
  display: none;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  font-size: 0.8125rem;
  padding: 0.625rem 0.875rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.auth-field {
  margin-bottom: 1rem;
}

.auth-field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #475569;
  margin-bottom: 0.375rem;
}

.auth-field input {
  width: 100%;
  padding: 0.5625rem 0.875rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-family: inherit;
  color: #1e293b;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}

.auth-field input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.auth-field-row {
  display: flex;
  gap: 0.625rem;
}

.auth-field-row input {
  flex: 1;
  min-width: 0;
}

.send-code-btn {
  flex-shrink: 0;
  padding: 0.5625rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  font-family: inherit;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}

.send-code-btn:hover:not(:disabled) {
  background: #e2e8f0;
}

.send-code-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auth-submit-btn {
  width: 100%;
  padding: 0.625rem;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  color: #fff;
  background: #1e293b;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 0.25rem;
}

.auth-submit-btn:hover:not(:disabled) {
  background: #334155;
}

.auth-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auth-footer {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.8125rem;
  color: #94a3b8;
}

.auth-footer a {
  color: #6366f1;
  cursor: pointer;
  font-weight: 500;
}

.auth-footer a:hover {
  color: #4f46e5;
}

/* Auth header state */
.auth-user {
  display: none;
  align-items: center;
  gap: 0.625rem;
}

.auth-user-name {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #1e293b;
  max-width: 8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ========== PODCAST TRANSLATION ========== */
.pc-card {
  background: #fff;
  border-radius: 1.25rem;
  padding: 2.5rem 2rem;
  box-shadow: 8px 8px 20px #e2e8f0, -8px -8px 20px #fff;
  border: 1px solid rgba(226,232,240,0.5);
  margin-bottom: 2rem;
}

.pc-upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  border: 2px dashed #e2e8f0;
  border-radius: 1rem;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.25s ease;
  padding: 2rem 1rem;
  position: relative;
}

.pc-upload-zone:hover {
  border-color: #a5b4fc;
  background: #fafbff;
}

.pc-upload-zone.drag-over {
  border-color: #6366f1;
  background: #eef2ff;
  transform: scale(1.01);
}

.pc-upload-zone.has-file {
  min-height: 80px;
  border: 1px solid #c7d2fe;
  background: #f5f7ff;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.08);
}

.pc-upload-zone.has-file .pc-upload-icon,
.pc-upload-zone.has-file .pc-upload-hint {
  display: none;
}

.pc-upload-zone.has-file .pc-upload-label {
  font-size: 0.875rem;
  color: #818cf8;
}

.pc-upload-icon {
  margin-bottom: 0.75rem;
  transition: stroke 0.25s;
}

.pc-upload-zone:hover .pc-upload-icon {
  stroke: #6366f1;
}

.pc-upload-label {
  font-size: 1rem;
  font-weight: 500;
  color: #475569;
  margin-bottom: 0.375rem;
}

.pc-upload-hint {
  font-size: 0.8125rem;
  color: #94a3b8;
}

/* File selected row */
.pc-file-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.625rem 1rem;
  background: #f5f7ff;
  border-radius: 0.625rem;
  border: 1px solid #e0e7ff;
}

.pc-file-name {
  flex: 1;
  font-size: 0.875rem;
  font-weight: 500;
  color: #1e293b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pc-file-clear {
  background: none;
  border: none;
  font-size: 1.125rem;
  color: #94a3b8;
  cursor: pointer;
  padding: 0 0.25rem;
  line-height: 1;
  transition: color 0.15s;
}

.pc-file-clear:hover {
  color: #ef4444;
}

/* Language row */
.pc-lang-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.pc-lang-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.625rem;
  padding: 0.5rem 0.875rem;
  transition: border-color 0.2s;
}

.pc-lang-group:hover {
  border-color: #a5b4fc;
}

.pc-lang-group label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #64748b;
  white-space: nowrap;
}

.pc-lang-group select {
  background: transparent;
  border: none;
  outline: none;
  font-size: 0.875rem;
  font-weight: 600;
  color: #1e293b;
  cursor: pointer;
  font-family: inherit;
  min-width: 4rem;
}

.pc-lang-arrow {
  font-size: 1.25rem;
  color: #94a3b8;
  font-weight: 300;
}

/* Translate button */
.pc-translate-btn {
  display: block;
  width: 100%;
  max-width: 280px;
  margin: 1.5rem auto 0;
  padding: 0.75rem 2rem;
  background: #1e293b;
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 500;
  font-family: inherit;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 12px rgba(30,41,59,0.15);
}

.pc-translate-btn:hover:not(:disabled) {
  background: #334155;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(30,41,59,0.2);
}

.pc-translate-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* History */
.pc-history {
  margin-top: 2rem;
}

.pc-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.pc-history-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
}

.pc-refresh-btn {
  background: none;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.375rem;
  cursor: pointer;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.pc-refresh-btn:hover {
  color: #6366f1;
  border-color: #a5b4fc;
  background: #eef2ff;
}

/* Table */
.pc-table-wrap {
  overflow-x: auto;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background: #fff;
}

.pc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.pc-table thead {
  background: #f1f5f9;
}

.pc-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pc-table td {
  padding: 0.75rem 1rem;
  color: #1e293b;
  white-space: nowrap;
  border-top: 1px solid #f1f5f9;
}

.pc-row {
  transition: background 0.15s;
}

.pc-row:hover {
  background: #fafbff;
}

.pc-cell-name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 200px;
}

.pc-cell-name span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pc-thumb {
  width: 32px;
  height: 32px;
  border-radius: 0.375rem;
  object-fit: cover;
  flex-shrink: 0;
}

.pc-cell-dir {
  color: #6366f1;
  font-weight: 500;
}

.pc-cell-actions {
  display: flex;
  gap: 0.5rem;
}

/* Status badges */
.pc-status {
  display: inline-block;
  padding: 0.1875rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.pc-status-succeed {
  background: #d1fae5;
  color: #059669;
}

.pc-status-failed {
  background: #fee2e2;
  color: #dc2626;
}

.pc-status-processing,
.pc-status-started {
  background: #dbeafe;
  color: #2563eb;
  animation: pcPulse 2s ease-in-out infinite;
}

.pc-status-pending {
  background: #f3e8ff;
  color: #9333ea;
}

@keyframes pcPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Download buttons */
.pc-dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: none;
  border: none;
  font-size: 0.75rem;
  font-family: inherit;
  color: #475569;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

.pc-dl-btn:hover:not(:disabled) {
  color: #6366f1;
  background: #eef2ff;
}

.pc-dl-btn:disabled {
  color: #cbd5e1;
  cursor: not-allowed;
}

/* Pagination */
.pc-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.pc-page-btn {
  padding: 0.375rem 0.875rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-family: inherit;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s;
}

.pc-page-btn:hover:not(:disabled) {
  border-color: #6366f1;
  color: #6366f1;
  background: #eef2ff;
}

.pc-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pc-page-info {
  font-size: 0.8125rem;
  color: #64748b;
}

/* Empty state */
.pc-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: #94a3b8;
}

.pc-empty p {
  font-size: 0.9375rem;
}

/* ========== TOAST NOTIFICATIONS ========== */
.toast-container {
  position: fixed;
  top: 5rem;
  right: 1.5rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  padding: 0.75rem 1.25rem;
  border-radius: 0.625rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #fff;
  background: #1e293b;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  opacity: 0;
  transform: translateX(1rem);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: auto;
  max-width: 360px;
  word-break: break-word;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast-success { background: #059669; }
.toast-error   { background: #dc2626; }
.toast-warning { background: #d97706; }
.toast-info    { background: #2563eb; }

/* ========== DEEPFAKE DETECTION ========== */
.df-card {
  background: #fff;
  border-radius: 1.25rem;
  padding: 2.5rem 2rem;
  box-shadow: 8px 8px 20px #e2e8f0, -8px -8px 20px #fff;
  border: 1px solid rgba(226,232,240,0.5);
  margin-bottom: 2rem;
}

.df-upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  border: 2px dashed #e2e8f0;
  border-radius: 1rem;
  background: #f8fafc;
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, transform 0.15s;
  gap: 0.5rem;
}

.df-upload-zone:hover {
  border-color: #a5b4fc;
  background: #fafbff;
}

.df-upload-zone.drag-over {
  border-color: #6366f1;
  background: #eef2ff;
  transform: scale(1.01);
}

.df-upload-zone.has-file {
  min-height: 80px;
  border: 1px solid #c7d2fe;
  background: #f5f7ff;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.08);
}

.df-upload-zone.has-file .df-upload-icon,
.df-upload-zone.has-file .df-upload-hint {
  display: none;
}

.df-upload-zone.has-file .df-upload-label {
  font-size: 0.875rem;
  color: #818cf8;
}

.df-upload-icon {
  margin-bottom: 0.75rem;
  transition: stroke 0.25s;
}

.df-upload-zone:hover .df-upload-icon {
  stroke: #6366f1;
}

.df-upload-label {
  font-size: 1rem;
  font-weight: 500;
  color: #475569;
  margin-bottom: 0.375rem;
}

.df-upload-hint {
  font-size: 0.8125rem;
  color: #94a3b8;
  margin: 0;
}

.df-file-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-top: 1rem;
  padding: 0.625rem 1rem;
  background: #f5f7ff;
  border: 1px solid #e0e7ff;
  border-radius: 0.625rem;
  font-size: 0.875rem;
  color: #334155;
}

.df-file-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.df-file-clear {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: #94a3b8;
  cursor: pointer;
  line-height: 1;
  padding: 0 0.25rem;
}

.df-file-clear:hover {
  color: #dc2626;
}

.df-detect-btn {
  display: block;
  width: 100%;
  max-width: 280px;
  margin: 1.5rem auto 0;
  padding: 0.75rem 2rem;
  background: #1e293b;
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  border: none;
  border-radius: 0.625rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.df-detect-btn:hover:not(:disabled) {
  background: #334155;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(30,41,59,0.2);
}

.df-detect-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Result phase */
.df-result-phase {
  text-align: center;
}

.df-result-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 1.5rem;
}

.df-gauge-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.df-gauge {
  width: 220px;
  height: 132px;
}

.df-gauge-score {
  font-size: 2.25rem;
  font-weight: 700;
  fill: #1e293b;
  font-family: 'Inter', sans-serif;
}

.df-gauge-label {
  font-size: 0.7rem;
  fill: #94a3b8;
  font-family: 'Inter', sans-serif;
}

.df-verdict {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0.75rem 0 0.5rem;
  padding: 0.5rem 1.25rem;
  border-radius: 2rem;
  display: inline-block;
}

.df-verdict-real {
  color: #059669;
  background: #ecfdf5;
}

.df-verdict-fake {
  color: #dc2626;
  background: #fef2f2;
}

.df-verdict-uncertain {
  color: #d97706;
  background: #fffbeb;
}

.df-tip {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0.75rem auto;
  max-width: 420px;
  line-height: 1.6;
}

.df-result-file {
  font-size: 0.8125rem;
  color: #94a3b8;
  margin-bottom: 1.5rem;
}

.df-reset-btn {
  display: inline-block;
  padding: 0.625rem 2rem;
  background: #fff;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  border-radius: 0.625rem;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.df-reset-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* ========== RESPONSIVE — DEEPFAKE ========== */
@media (max-width: 768px) {
  .df-card {
    padding: 1.5rem 1rem;
  }

  .df-upload-zone {
    min-height: 150px;
    padding: 1.5rem 1rem;
  }

  .df-gauge {
    width: 180px;
    height: 108px;
  }

  .df-verdict {
    font-size: 1.1rem;
  }
}

/* ========== EMOSENSE ========== */
.es-card {
  background: #fff;
  border-radius: 1.25rem;
  padding: 2.5rem 2rem;
  box-shadow: 8px 8px 20px #e2e8f0, -8px -8px 20px #fff;
  border: 1px solid rgba(226,232,240,0.5);
  margin-bottom: 2rem;
}

.es-upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  border: 2px dashed #e2e8f0;
  border-radius: 1rem;
  background: #f8fafc;
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, transform 0.15s;
  gap: 0.5rem;
}

.es-upload-zone:hover {
  border-color: #a5b4fc;
  background: #fafbff;
}

.es-upload-zone.drag-over {
  border-color: #6366f1;
  background: #eef2ff;
  transform: scale(1.01);
}

.es-upload-zone.has-file {
  min-height: 80px;
  border: 1px solid #c7d2fe;
  background: #f5f7ff;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.08);
}

.es-upload-zone.has-file .es-upload-icon,
.es-upload-zone.has-file .es-upload-hint {
  display: none;
}

.es-upload-zone.has-file .es-upload-label {
  font-size: 0.875rem;
  color: #818cf8;
}

.es-upload-icon {
  margin-bottom: 0.75rem;
  transition: stroke 0.25s;
}

.es-upload-zone:hover .es-upload-icon {
  stroke: #6366f1;
}

.es-upload-label {
  font-size: 1rem;
  font-weight: 500;
  color: #475569;
  margin-bottom: 0.375rem;
}

.es-upload-hint {
  font-size: 0.8125rem;
  color: #94a3b8;
  margin: 0;
}

.es-file-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-top: 1rem;
  padding: 0.625rem 1rem;
  background: #f5f7ff;
  border: 1px solid #e0e7ff;
  border-radius: 0.625rem;
  font-size: 0.875rem;
  color: #334155;
}

.es-file-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.es-file-clear {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: #94a3b8;
  cursor: pointer;
  line-height: 1;
  padding: 0 0.25rem;
}

.es-file-clear:hover {
  color: #dc2626;
}

.es-lang-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}
.es-lang-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #64748b;
}
.es-lang-select {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #fff;
  color: #334155;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}
.es-lang-select:focus {
  border-color: #6366f1;
}

.es-analyze-btn {
  display: block;
  width: 100%;
  max-width: 280px;
  margin: 1.5rem auto 0;
  padding: 0.75rem 2rem;
  background: #1e293b;
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  border: none;
  border-radius: 0.625rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.es-analyze-btn:hover:not(:disabled) {
  background: #334155;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(30,41,59,0.2);
}

.es-analyze-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Result phase */
.es-result-phase {
  text-align: left;
}

.es-result-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 1.25rem;
  text-align: center;
}

.es-result-block {
  margin-bottom: 1rem;
}

.es-result-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin-bottom: 0.375rem;
}

.es-result-text {
  padding: 0.875rem 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.625rem;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: #1e293b;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 200px;
  overflow-y: auto;
}

.es-result-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.es-result-half {
  flex: 1;
  min-width: 0;
}

.es-result-value {
  padding: 0.625rem 0.875rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.625rem;
  font-size: 0.9375rem;
  color: #1e293b;
  word-break: break-word;
}

.es-emotion-value {
  background: #fefce8;
  border-color: #fde68a;
  color: #92400e;
}

.es-result-file {
  font-size: 0.8125rem;
  color: #94a3b8;
  margin-bottom: 1.25rem;
  text-align: center;
}

.es-reset-btn {
  display: block;
  margin: 0 auto;
  padding: 0.625rem 2rem;
  background: #fff;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  border-radius: 0.625rem;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.es-reset-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Divider */
.es-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem 0;
  color: #94a3b8;
  font-size: 0.8125rem;
}

.es-divider::before,
.es-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

/* Record buttons */
.es-rec-row {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.es-rec-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.5rem;
  background: #fff;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  border-radius: 0.625rem;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.es-rec-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.es-stop-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.5rem;
  background: #dc2626;
  color: #fff;
  border: none;
  border-radius: 0.625rem;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  animation: es-pulse-border 2s ease-in-out infinite;
}

.es-stop-btn:hover {
  background: #b91c1c;
  transform: translateY(-1px);
}

@keyframes es-pulse-border {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,0.4); }
  50% { box-shadow: 0 0 0 6px rgba(220,38,38,0); }
}

/* Live recording area */
.es-live {
  margin-top: 1rem;
  padding: 1rem;
  background: #fafbff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
}

.es-live-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.8125rem;
}

.es-rec-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #dc2626;
  animation: es-dot-pulse 1s infinite;
}

@keyframes es-dot-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.es-live-status {
  color: #475569;
  font-weight: 500;
  flex: 1;
}

.es-live-timer {
  color: #6366f1;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.es-waveform {
  width: 100%;
  height: 48px;
  border-radius: 0.5rem;
  background: #f1f5f9;
  margin-bottom: 0.75rem;
}

.es-live-text {
  min-height: 2.5rem;
  padding: 0.625rem 0.875rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #1e293b;
  word-break: break-word;
  white-space: pre-wrap;
}

/* ========== TTS — AI VOICE GENERATOR ========== */
.tts-card {
  background: #fff;
  border-radius: 1.25rem;
  padding: 2.5rem 2rem;
  box-shadow: 8px 8px 20px #e2e8f0, -8px -8px 20px #fff;
  border: 1px solid rgba(226,232,240,0.5);
}

.tts-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.375rem;
}

.tts-text-group {
  margin-bottom: 1rem;
  position: relative;
}

.tts-textarea {
  width: 100%;
  min-height: 100px;
  resize: vertical;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #1e293b;
  background: #f8fafc;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.tts-textarea:focus {
  outline: none;
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.08);
  background: #fff;
}

.tts-char-count {
  text-align: right;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}

.tts-field { margin-bottom: 1rem; }

.tts-select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: #1e293b;
  background: #f8fafc;
  cursor: pointer;
  transition: border-color 0.2s;
}

.tts-select:focus { outline: none; border-color: #818cf8; }

.tts-ref-section {
  margin-bottom: 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #f8fafc;
}

.tts-ref-section > .tts-label { margin-bottom: 0.625rem; }

.tts-ref-methods {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.tts-ref-upload-zone {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 1.25rem 0.75rem;
  border-radius: 0.625rem;
  border: 1.5px dashed #cbd5e1;
  background: #fff;
  transition: all 0.2s;
  text-align: center;
}

.tts-ref-upload-zone:hover {
  background: #eef2ff;
  border-color: #a5b4fc;
}
.tts-ref-upload-zone.drag-over {
  background: #eef2ff;
  border-color: #6366f1;
}
.tts-ref-label { font-size: 0.8125rem; color: #64748b; }

.tts-ref-divider {
  display: flex;
  align-items: center;
  padding: 0 0.875rem;
  color: #94a3b8;
  font-size: 0.75rem;
}

.tts-ref-rec-zone {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.25rem 0.75rem;
  border-radius: 0.625rem;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  transition: background 0.2s;
}

.tts-ref-rec-btn,
.tts-ref-stop-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1.25rem;
  border-radius: 2rem;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.tts-ref-rec-btn {
  background: #f1f5f9;
  color: #475569;
}
.tts-ref-rec-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.tts-ref-stop-btn {
  background: #fef2f2;
  color: #dc2626;
}
.tts-ref-stop-btn:hover {
  background: #fee2e2;
}

.tts-ref-rec-timer {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: #dc2626;
  font-variant-numeric: tabular-nums;
}

.tts-rec-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #dc2626;
  animation: ttsRecPulse 1s ease-in-out infinite;
}

@keyframes ttsRecPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.tts-ref-file-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: #fff;
  border: 1px solid #e0e7ff;
  border-radius: 0.5rem;
  margin-top: 0.625rem;
}

.tts-ref-file-name {
  font-size: 0.8125rem;
  color: #1e293b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.tts-ref-preview {
  flex: 1;
  height: 32px;
  min-width: 0;
}

.tts-ref-file-clear {
  background: none; border: none;
  font-size: 1.125rem; color: #94a3b8;
  cursor: pointer; padding: 0; line-height: 1;
  flex-shrink: 0;
}
.tts-ref-file-clear:hover { color: #ef4444; }

.tts-instruct-group { margin-bottom: 1.25rem; }

.tts-instruct-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: #1e293b;
  background: #f8fafc;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.tts-instruct-input:focus {
  outline: none;
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.08);
  background: #fff;
}

.tts-instruct-hint {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}

.tts-generate-btn,
.tts-download-btn,
.tts-reset-btn {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 0.5rem auto 0;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.625rem;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s, transform 0.15s;
}

.tts-generate-btn { background: #6366f1; color: #fff; }
.tts-generate-btn:hover:not(:disabled) { background: #4f46e5; transform: translateY(-1px); }
.tts-generate-btn:disabled { background: #cbd5e1; color: #94a3b8; cursor: not-allowed; }

.tts-result-phase { text-align: center; }

.tts-result-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 1.5rem;
}

.tts-audio-wrap { margin-bottom: 1rem; }
.tts-audio-wrap audio { width: 100%; border-radius: 0.5rem; }

.tts-result-meta {
  font-size: 0.8125rem;
  color: #64748b;
  margin-bottom: 1.5rem;
}

.tts-result-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.tts-download-btn { background: #6366f1; color: #fff; max-width: 160px; }
.tts-download-btn:hover { background: #4f46e5; }

.tts-reset-btn {
  background: #fff; color: #475569;
  border: 1px solid #e2e8f0; max-width: 160px;
}
.tts-reset-btn:hover { background: #f1f5f9; border-color: #cbd5e1; }

@media (max-width: 768px) {
  .tts-card { padding: 1.5rem 1rem; }
  .tts-row { flex-direction: column; gap: 0.75rem; }
  .tts-result-actions { flex-direction: column; align-items: center; }
  .tts-download-btn, .tts-reset-btn { max-width: 280px; }
}

/* ========== RESPONSIVE — EMOSENSE ========== */
@media (max-width: 768px) {
  .es-card {
    padding: 1.5rem 1rem;
  }

  .es-upload-zone {
    min-height: 150px;
    padding: 1.5rem 1rem;
  }

  .es-result-row {
    flex-direction: column;
    gap: 0.75rem;
  }
}

/* ========== RESPONSIVE — PODCAST ========== */
@media (max-width: 768px) {
  .pc-card {
    padding: 1.5rem 1rem;
  }

  .pc-upload-zone {
    min-height: 150px;
    padding: 1.5rem 1rem;
  }

  .pc-lang-row {
    gap: 0.5rem;
  }

  .pc-lang-group {
    padding: 0.375rem 0.625rem;
  }

  .pc-table {
    font-size: 0.75rem;
  }

  .pc-table th,
  .pc-table td {
    padding: 0.5rem 0.625rem;
  }

  .pc-cell-actions {
    flex-direction: column;
    gap: 0.25rem;
  }
}
