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

:root {
  --primary: #0a0a0f;
  --secondary: #12121a;
  --tertiary: #1a1a24;
  --accent: #00d4aa;
  --accent-blue: #00a8ff;
  --accent-hover: #00f5c4;
  --accent-dim: rgba(0, 212, 170, 0.15);
  --text-primary: #ffffff;
  --text-secondary: #a2abc0;
  --text-muted: #7c859b;
  --border: #1f2636;
  --border-light: #313a4f;
  --glass-border: rgba(255, 255, 255, 0.09);
  --warning: #f6c15b;
  --gradient-accent: linear-gradient(135deg, #00d4aa 0%, #00a8ff 100%);
  --gradient-bg: linear-gradient(180deg, #0a0a0f 0%, #12121a 100%);
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --header-height: 64px;
  --sidebar-width: 280px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

.bg-pattern {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 212, 170, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 85% 100%, rgba(0, 168, 255, 0.08) 0%, transparent 50%),
    var(--gradient-bg);
  opacity: 0.5;
}

.grid-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background-image: 
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 50px 50px;
}

/* ========== HEADER ========== */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-height);
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.header-left { display: flex; align-items: center; gap: 24px; }

.logo {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.site-logo,
.footer-logo,
.logo img {
  display: block;
  height: 28px;
  width: auto;
}

.nav-tabs {
  display: flex;
  gap: 8px;
  min-width: 0;
}

.nav-tab {
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-tab.active {
  color: var(--accent);
  background: var(--accent-dim);
}

.nav-tab-studio {
  color: var(--text-primary);
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.12) 0%, rgba(0, 168, 255, 0.08) 100%);
  border: 1px solid rgba(0, 212, 170, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  white-space: nowrap;
}

.nav-tab-studio:hover {
  color: var(--text-primary);
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.18) 0%, rgba(0, 168, 255, 0.12) 100%);
  border-color: rgba(0, 212, 170, 0.22);
}

.nav-tab-studio.active {
  color: #061111;
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.94) 0%, rgba(0, 168, 255, 0.82) 100%);
  border-color: transparent;
}

.nav-tab svg { width: 16px; height: 16px; }

.header-right { display: flex; align-items: center; gap: 12px; }

.header-right > .plan-badge {
  display: none;
}

.studio-header-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.plan-badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.plan-badge.free { background: rgba(255, 255, 255, 0.1); color: var(--text-secondary); }
.plan-badge.start { background: rgba(0, 212, 170, 0.14); color: var(--accent-hover); border: 1px solid rgba(0, 212, 170, 0.22); }
.plan-badge.pro { background: linear-gradient(135deg, #f5a623 0%, #f5d023 100%); color: #0a0a0f; }
.plan-badge.infinity,
.plan-badge.enterprise { background: var(--gradient-accent); color: #0a0a0f; }

/* ========== BUTTONS ========== */
.btn {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

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

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

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

.btn-primary:hover {
  transform: scale(1.02);
  box-shadow: 0 0 24px rgba(0, 212, 170, 0.3);
}

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-danger { background: #ff5f57; color: white; }
.btn-danger:hover { background: #ff6b67; }

/* ========== USER MENU ========== */
.user-menu { position: relative; }

.header-profile-pill {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 6px 14px 6px 7px;
  border-radius: 999px;
  border: 1px solid rgba(0, 212, 170, 0.18);
  background: rgba(18, 23, 34, 0.72);
  color: #f8fbff;
  font-family: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255,255,255,0.05);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.header-profile-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 212, 170, 0.34);
  background: rgba(21, 28, 42, 0.86);
  box-shadow: 0 18px 42px rgba(0, 212, 170, 0.12), inset 0 1px 0 rgba(255,255,255,0.07);
}

.profile-avatar {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #061111;
  background: var(--gradient-accent);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  flex: 0 0 auto;
}

.profile-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
  min-width: 0;
}

.profile-copy strong {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.86rem;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  color: var(--primary);
  cursor: pointer;
  transition: all 0.2s;
}

.user-avatar:hover { transform: scale(1.05); }

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 240px;
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s;
  z-index: 200;
}

.user-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-user-info {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.dropdown-user-name { font-weight: 600; font-size: 14px; }
.dropdown-user-email { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.dropdown-user-plan {
  width: fit-content;
  margin-top: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 212, 170, 0.2);
  background: rgba(0, 212, 170, 0.1);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dropdown-divider { height: 1px; background: var(--border); margin: 8px 0; }

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.dropdown-item.danger:hover {
  background: rgba(255, 87, 87, 0.1);
  color: #ff5f57;
}

.dropdown-item svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ========== MAIN ========== */
main {
  padding-top: var(--header-offset, var(--header-height));
  padding-bottom: 0;
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

/* ========== LANDING ========== */
.landing-section {
  padding: 88px 5%;
  min-height: 100vh;
  display: none;
  flex-direction: column;
  justify-content: center;
}

.landing-section,
.landing-section.show { display: flex; }
.landing-section.short { min-height: auto; padding: 68px 5%; }

#hero {
  text-align: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-bg-image {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('../images/hero-bg.webp') center/cover;
  opacity: 0.15;
  z-index: -1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(0, 212, 170, 0.1);
  border: 1px solid rgba(0, 212, 170, 0.3);
  border-radius: 100px;
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 32px;
  animation: fadeInUp 0.6s ease-out;
}

.hero-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.9); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

#hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(42px, 6.2vw, 66px);
  font-weight: 700;
  line-height: 1.04;
  max-width: 980px;
  margin: 0 auto 22px;
  letter-spacing: -2.2px;
  animation: fadeInUp 0.6s ease-out 0.1s backwards;
}

.hero-subtitle {
  font-size: clamp(17px, 1.9vw, 19px);
  color: rgba(244, 249, 255, 0.8);
  max-width: 720px;
  margin-bottom: 30px;
  text-shadow: 0 12px 32px rgba(0, 0, 0, 0.24);
  animation: fadeInUp 0.6s ease-out 0.2s backwards;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeInUp 0.6s ease-out 0.3s backwards;
}

.hero-cta .btn {
  min-width: 188px;
  min-height: 48px;
  justify-content: center;
}

.hero-cta .btn-primary {
  color: #f5fbff;
  box-shadow: 0 14px 38px rgba(0, 212, 170, 0.2);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.22);
}

.hero-cta .btn-ghost {
  background: rgba(12, 16, 26, 0.34);
  border-color: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.tool-carousel {
  width: min(760px, 100%);
  margin: 28px auto 0;
  animation: fadeInUp 0.6s ease-out 0.4s backwards;
}

.tool-carousel-track {
  position: relative;
  min-height: 104px;
}

.tool-carousel-card {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px;
  min-height: 104px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(18, 23, 34, 0.8) 0%, rgba(9, 13, 22, 0.64) 100%);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(18px);
  color: var(--text-primary);
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px) scale(0.985);
  transition: opacity 260ms ease, transform 260ms ease, visibility 260ms ease, border-color 220ms ease;
}

.tool-carousel-card.active {
  position: relative;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.tool-carousel-card:hover {
  border-color: rgba(0, 212, 170, 0.34);
}

.tool-carousel-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: rgba(0, 212, 170, 0.1);
  border: 1px solid rgba(0, 212, 170, 0.18);
  flex-shrink: 0;
}

.tool-carousel-icon svg {
  width: 25px;
  height: 25px;
}

.tool-carousel-copy {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  text-align: left;
}

.tool-carousel-copy strong {
  font-family: var(--font-heading);
  font-size: 18px;
  line-height: 1.15;
  letter-spacing: 0;
}

.tool-carousel-copy small {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.45;
}

.tool-carousel-controls {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 12px;
}

.tool-carousel-controls span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  transition: width 220ms ease, background 220ms ease;
}

.tool-carousel-controls span.active {
  width: 24px;
  background: var(--gradient-accent);
}

.tools-grid {
  width: min(100%, 1040px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 26px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(17, 21, 33, 0.82) 0%, rgba(12, 15, 24, 0.78) 100%);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255,255,255,0.04);
  backdrop-filter: blur(18px);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.tool-card-body {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.tool-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.tool-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.tool-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(34, 169, 255, 0.14) 0%, rgba(34, 169, 255, 0) 44%);
  pointer-events: none;
}

.tool-card:hover {
  transform: translateY(-4px);
  border-color: rgba(35, 214, 198, 0.18);
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.24), 0 0 0 1px rgba(35, 214, 198, 0.05);
}

.tool-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tool-badge,
.tool-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tool-badge {
  background: rgba(0, 212, 170, 0.12);
  border: 1px solid rgba(0, 212, 170, 0.18);
  color: #8ef2db;
}

.tool-badge.alt {
  background: rgba(74, 131, 255, 0.14);
  border: 1px solid rgba(74, 131, 255, 0.22);
  color: #b9d4ff;
}

.tool-status {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(233, 240, 250, 0.74);
}

.tool-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(23, 212, 191, 0.2) 0%, rgba(34, 169, 255, 0.16) 100%);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.tool-icon.alt {
  background: linear-gradient(135deg, rgba(74, 131, 255, 0.18) 0%, rgba(142, 112, 255, 0.16) 100%);
}

.tool-icon svg {
  width: 26px;
  height: 26px;
  color: #f5fbff;
}

.tool-card h3 {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}

.tool-card p {
  color: rgba(220, 230, 242, 0.78);
  font-size: 15px;
  line-height: 1.7;
}

.tool-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tool-meta span {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  font-size: 12px;
  color: rgba(216, 226, 238, 0.72);
}

.tool-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #dff7ff;
  font-size: 14px;
  font-weight: 600;
}

.tool-card:hover .tool-cta {
  color: #9ef0df;
}

@media (max-width: 900px) {
  .tools-grid {
    width: min(100%, 760px);
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .tool-card {
    padding: 22px 20px;
    border-radius: 22px;
    gap: 16px;
  }

  .tool-card h3 {
    font-size: 24px;
  }
}

@media (max-width: 640px) {
  .tools-grid {
    width: 100%;
    gap: 14px;
  }

  .tool-card {
    padding: 16px 15px;
    border-radius: 18px;
    gap: 12px;
  }

  .tool-card-top {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
  }

  .tool-card-body {
    gap: 12px;
  }

  .tool-copy {
    gap: 7px;
  }

  .tool-card-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .tool-badge,
  .tool-status {
    min-height: 24px;
    padding: 5px 9px;
    font-size: 10px;
    letter-spacing: 0.03em;
  }

  .tool-icon {
    width: 50px;
    height: 50px;
    border-radius: 16px;
  }

  .tool-icon svg {
    width: 22px;
    height: 22px;
  }

  .tool-card h3 {
    font-size: 20px;
    line-height: 1.02;
  }

  .tool-card p {
    font-size: 13px;
    line-height: 1.5;
  }

  .tool-meta {
    gap: 7px;
  }

  .tool-meta span {
    padding: 6px 8px;
    font-size: 10px;
  }

  .tool-cta {
    font-size: 12px;
  }
}

@media (max-width: 430px) {
  .tool-card {
    padding: 14px 13px;
    border-radius: 16px;
  }

  .tool-card-top {
    justify-content: flex-start;
  }

  .tool-card-body {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
  }

  .tool-card h3 {
    font-size: 18px;
  }

  .tool-card p {
    font-size: 12px;
    line-height: 1.45;
  }

  .tool-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }

  .tool-icon svg {
    width: 18px;
    height: 18px;
  }

  .tool-meta span {
    font-size: 10px;
    padding: 6px 8px;
  }

  .tool-cta {
    font-size: 11px;
  }

  .tool-card-bottom {
    gap: 8px;
  }
}

.section-header { text-align: center; margin-bottom: 42px; }

h2 {
  font-family: var(--font-heading);
  font-size: clamp(30px, 3.8vw, 40px);
  font-weight: 600;
  margin-bottom: 14px;
  letter-spacing: -1px;
}

.section-desc {
  color: rgba(229, 236, 247, 0.78);
  font-size: 16px;
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.72;
}

/* ========== MODELS ========== */
.models-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.model-card {
  background: rgba(18, 18, 26, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all 0.3s;
  position: relative;
  cursor: pointer;
}

.model-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-accent);
  opacity: 0;
  transition: opacity 0.3s;
}

.model-card:hover {
  border-color: rgba(0, 212, 170, 0.4);
  box-shadow: 0 8px 40px rgba(0, 212, 170, 0.1);
  transform: translateY(-2px);
}

.model-card:hover::before { opacity: 1; }

.model-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 30px rgba(0, 212, 170, 0.2);
}

.model-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 5px 10px;
  background: var(--gradient-accent);
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.model-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
}

.model-name {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.model-desc {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 16px;
}

.model-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.model-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.plan-required {
  font-size: 12px;
  color: #f5a623;
  background: rgba(245, 166, 35, 0.15);
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.available {
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 4px 10px;
  border-radius: 20px;
}

/* ========== FEATURES ========== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  max-width: 1100px;
  margin: 0 auto;
}

.feature-card {
  padding: 24px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(17, 22, 35, 0.72), rgba(11, 15, 25, 0.64));
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: all 0.3s;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
}

.feature-card:hover {
  border-color: rgba(0, 212, 170, 0.18);
  transform: translateY(-2px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 20px;
}

.feature-icon svg { width: 24px; height: 24px; }

.feature-title {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 9px;
}

.feature-desc {
  color: rgba(228, 235, 247, 0.76);
  font-size: 13.5px;
  line-height: 1.66;
}

/* ========== EXAMPLES ========== */
.examples-highlight {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.8fr);
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto 24px;
  padding: 22px 24px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at top left, rgba(35, 214, 198, 0.08), transparent 34%),
    radial-gradient(circle at bottom right, rgba(122, 168, 255, 0.08), transparent 32%),
    linear-gradient(180deg, rgba(15, 19, 29, 0.92) 0%, rgba(10, 13, 22, 0.88) 100%);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255,255,255,0.04);
}

.examples-highlight-copy {
  display: grid;
  gap: 10px;
  align-content: center;
}

.examples-eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(233, 241, 255, 0.76);
}

.examples-highlight-copy h3 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.1;
}

.examples-highlight-copy p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.75;
  max-width: 62ch;
}

.examples-highlight-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-content: center;
}

.example-stat {
  min-height: 108px;
  padding: 16px 14px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.04);
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  text-align: center;
}

.example-stat strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 28px;
  line-height: 1;
  color: #f7fbff;
  width: 100%;
  text-align: center;
}

.example-stat span {
  font-size: 12px;
  color: var(--text-muted);
  width: 100%;
  text-align: center;
}

.examples-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto;
}

.example-card {
  position: relative;
  min-height: 208px;
  padding: 18px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(18, 23, 34, 0.92) 0%, rgba(11, 15, 25, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  display: grid;
  gap: 12px;
  align-content: start;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255,255,255,0.03);
}

.example-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(35, 214, 198, 0.08), transparent 30%),
    radial-gradient(circle at bottom right, rgba(122, 168, 255, 0.08), transparent 30%);
  opacity: 0.85;
  pointer-events: none;
}

.example-card-top,
.example-card > * {
  position: relative;
  z-index: 1;
}

.example-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.example-card-featured {
  border-color: rgba(35, 214, 198, 0.18);
  background:
    linear-gradient(180deg, rgba(18, 25, 36, 0.96) 0%, rgba(10, 15, 24, 0.94) 100%);
}

.example-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 11px;
  color: rgba(226, 235, 248, 0.76);
}

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

  .examples-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .examples-highlight-stats {
    grid-template-columns: 1fr;
  }

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

.example-card:hover {
  border-color: rgba(35, 214, 198, 0.34);
  background:
    linear-gradient(180deg, rgba(18, 25, 36, 0.98) 0%, rgba(10, 15, 24, 0.96) 100%);
  transform: translateY(-4px);
  box-shadow: 0 28px 52px rgba(0, 0, 0, 0.24), 0 0 0 1px rgba(35, 214, 198, 0.08);
}

.example-category {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  width: fit-content;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.example-prompt {
  font-family: var(--font-heading);
  font-size: 18px;
  line-height: 1.22;
  color: #f7fbff;
}

/* ========== PRICING ========== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  max-width: 1240px;
  margin: 0 auto;
  align-items: stretch;
}

.pricing-card {
  position: relative;
  padding: 34px 20px 20px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(14, 20, 34, 0.78) 0%, rgba(10, 15, 26, 0.68) 100%);
  border: 1px solid var(--border);
  text-align: left;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s, background 0.3s;
  overflow: visible;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(20px) saturate(115%);
  -webkit-backdrop-filter: blur(20px) saturate(115%);
}

.pricing-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055) 0%, rgba(255, 255, 255, 0.015) 22%, rgba(255, 255, 255, 0) 48%),
    linear-gradient(180deg, rgba(4, 7, 14, 0) 40%, rgba(4, 7, 14, 0.16) 100%);
  opacity: 1;
}

/* Plan-specific glow effects on cards */
.pricing-card.free {
  opacity: 1;
  box-shadow: none;
  border-color: rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(16, 20, 34, 0.8) 0%, rgba(10, 13, 24, 0.72) 100%);
}

.pricing-card.start {
  opacity: 1;
  border-color: rgba(0, 212, 170, 0.18);
  box-shadow: 0 0 0 1px rgba(0, 212, 170, 0.05), 0 0 28px rgba(0, 212, 170, 0.12);
  background: linear-gradient(180deg, rgba(10, 24, 31, 0.82) 0%, rgba(8, 18, 29, 0.74) 100%);
}

.pricing-card.pro {
  opacity: 1;
  border-color: rgba(0, 212, 170, 0.32);
  box-shadow: 0 0 0 1px rgba(0, 212, 170, 0.08), 0 0 44px rgba(0, 212, 170, 0.22), inset 0 0 38px rgba(0, 212, 170, 0.04);
  background: linear-gradient(180deg, rgba(10, 24, 33, 0.84) 0%, rgba(7, 17, 30, 0.76) 100%);
}

.pricing-card.infinity {
  opacity: 1;
  border-color: rgba(0, 212, 170, 0.46);
  box-shadow: 0 0 0 1px rgba(0, 212, 170, 0.1), 0 0 58px rgba(0, 212, 170, 0.28), inset 0 0 44px rgba(0, 212, 170, 0.06);
  animation: infinityHalo 3.4s ease-in-out infinite;
  background: linear-gradient(180deg, rgba(10, 24, 36, 0.84) 0%, rgba(7, 17, 30, 0.78) 100%);
}

.pricing-card.pro,
.pricing-card.infinity {
  border-width: 1.5px;
}

@keyframes infinityHalo {
  0%, 100% { box-shadow: 0 0 0 1px rgba(0, 212, 170, 0.1), 0 0 58px rgba(0, 212, 170, 0.28), inset 0 0 44px rgba(0, 212, 170, 0.06); }
  50% { box-shadow: 0 0 0 1px rgba(0, 212, 170, 0.14), 0 0 84px rgba(0, 212, 170, 0.4), inset 0 0 70px rgba(0, 168, 255, 0.1); }
}

.pricing-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 0;
}

.pricing-card.start::before {
  background: radial-gradient(circle at 50% 0%, rgba(0, 212, 170, 0.16), transparent 60%);
  opacity: 1;
}

.pricing-card.pro::before {
  background: radial-gradient(circle at 50% 0%, rgba(0, 212, 170, 0.24), transparent 62%);
  opacity: 1;
}

.pricing-card.infinity::before {
  background: radial-gradient(circle at 50% 0%, rgba(0, 212, 170, 0.32), transparent 64%);
  opacity: 1;
}

.pricing-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.pricing-card.popular {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(0, 212, 170, 0.1), 0 0 50px rgba(0, 212, 170, 0.26), inset 0 0 40px rgba(0, 212, 170, 0.05);
}

.pricing-card.popular.pro::after {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.02) 20%, rgba(255, 255, 255, 0) 46%),
    linear-gradient(180deg, rgba(8, 14, 26, 0) 38%, rgba(8, 14, 26, 0.18) 100%);
}

.pricing-card.infinity::after {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.018) 18%, rgba(255, 255, 255, 0) 44%),
    linear-gradient(180deg, rgba(6, 12, 24, 0) 36%, rgba(6, 12, 24, 0.22) 100%);
}

.pricing-card .btn {
  width: 100%;
  justify-content: center;
  margin-top: auto;
  position: relative;
  z-index: 1;
}

.pricing-badge {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 14px;
  background: var(--gradient-accent);
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
  z-index: 2;
}

.pricing-badge.soft {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.pricing-badge.subtle {
  background: rgba(0, 212, 170, 0.14);
  color: var(--accent-hover);
  border: 1px solid rgba(0, 212, 170, 0.16);
}

.pricing-badge.premium {
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.95) 0%, rgba(0, 168, 255, 0.95) 100%);
  color: #071019;
}

.pricing-name {
  font-family: var(--font-heading);
  font-size: 21px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #f7fbff;
  position: relative;
  z-index: 1;
}

.pricing-card.pro .pricing-name,
.pricing-card.infinity .pricing-name {
  letter-spacing: -0.02em;
}

.pricing-price {
  font-size: 34px;
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  color: #f8ffff;
  position: relative;
  z-index: 1;
}

.pricing-period {
  font-size: 13px;
  color: rgba(220, 236, 244, 0.62);
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.pricing-target {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  margin-bottom: 16px;
  line-height: 1.4;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  position: relative;
  z-index: 1;
}

.pricing-target::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.85;
}

.pricing-card.start .pricing-target {
  color: #8ff3de;
  border-color: rgba(0, 212, 170, 0.18);
  background: rgba(0, 212, 170, 0.08);
}

.pricing-card.pro .pricing-target {
  color: #ffe08f;
  border-color: rgba(245, 166, 35, 0.22);
  background: rgba(245, 166, 35, 0.08);
}

.pricing-card.infinity .pricing-target {
  color: #c9fff4;
  border-color: rgba(0, 212, 170, 0.2);
  background: rgba(0, 168, 255, 0.08);
}

.price-amount {
  letter-spacing: -0.03em;
}

.pricing-card.pro .price-amount {
  text-shadow: 0 0 28px rgba(0, 212, 170, 0.16);
}

.pricing-card.infinity .price-amount {
  text-shadow: 0 0 34px rgba(0, 212, 170, 0.22);
}

.pricing-desc {
  color: rgba(232, 240, 248, 0.76);
  font-size: 14px;
  line-height: 1.65;
  margin-bottom: 16px;
  min-height: 78px;
  position: relative;
  z-index: 1;
}

.pricing-features {
  text-align: left;
  margin-bottom: 22px;
  flex: 1;
  position: relative;
  z-index: 1;
}

.pricing-feature {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 0;
  font-size: 13px;
  color: rgba(240, 246, 251, 0.78);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  line-height: 1.45;
}

.pricing-feature.disabled {
  color: rgba(188, 198, 210, 0.42);
}

.pricing-feature:last-child { border-bottom: none; }

.pricing-feature svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}

.pricing-card .btn-ghost {
  background: rgba(8, 12, 24, 0.42);
  border-color: rgba(255, 255, 255, 0.1);
}

.pricing-card .btn-ghost:hover {
  background: rgba(0, 212, 170, 0.12);
}

.pricing-card .btn-primary {
  box-shadow: 0 14px 32px rgba(0, 168, 255, 0.2);
}

.pricing-card.pro .btn-primary {
  background: linear-gradient(135deg, #19d4bf 0%, #1ba8ff 100%);
  box-shadow: 0 16px 34px rgba(0, 168, 255, 0.24);
}

.pricing-card.infinity .btn-ghost {
  background: rgba(8, 15, 28, 0.5);
  border-color: rgba(0, 212, 170, 0.16);
}

/* ========== CHAT LAYOUT ========== */
.chat-layout { display: none; min-height: calc(100vh - var(--header-offset, var(--header-height))); }
.chat-layout.active { display: flex !important; }

.chat-sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, rgba(18, 18, 28, 0.96) 0%, rgba(13, 14, 24, 0.94) 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--header-offset, var(--header-height)));
  position: fixed;
  left: 0;
  top: var(--header-offset, var(--header-height));
  transition: transform 0.22s ease;
}

.sidebar-header {
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255,255,255,0) 100%);
}

.sidebar-header-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.new-chat-btn { width: 100%; justify-content: center; }

.sidebar-collapse-btn {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.2s;
}

.sidebar-collapse-btn:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(35, 214, 198, 0.26);
}

.sidebar-tools {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-export-btn {
  width: 100%;
  justify-content: center;
}

.sidebar-model-panel {
  padding: 12px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.02) 100%);
  border: 1px solid rgba(255,255,255,0.07);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.sidebar-model-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(184, 200, 220, 0.68);
  margin-bottom: 10px;
}

.sidebar-model-selector,
.sidebar-model-selector .model-dropdown {
  width: 100%;
}

.sidebar-model-btn {
  width: 100%;
  justify-content: space-between;
}

.sidebar-model-selector .model-dropdown-menu {
  width: 100%;
  max-width: min(360px, calc(100vw - 40px));
}

.sidebar-history {
  flex: 1;
  overflow-y: auto;
  padding: 12px 8px;
}

.history-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px;
  border-radius: 14px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.22s;
  margin-bottom: 6px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.015);
}

.history-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.07);
}

.history-item.active {
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.16) 0%, rgba(0, 168, 255, 0.08) 100%);
  color: #9cf6e4;
  border-color: rgba(0, 212, 170, 0.18);
  box-shadow: 0 12px 26px rgba(0, 212, 170, 0.08);
}

.history-item-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.history-item-icon {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.05);
  color: var(--accent);
  flex-shrink: 0;
}

.history-item-actions { display: flex; gap: 4px; opacity: 0; transition: opacity 0.2s; }
.history-item:hover .history-item-actions { opacity: 1; }

.history-item-btn { padding: 4px; border-radius: 4px; transition: all 0.2s; }
.history-item-btn:hover { background: rgba(255, 255, 255, 0.1); }
.history-item-btn.delete:hover { background: rgba(255, 87, 87, 0.2); color: #ff5f57; }

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

.storage-info {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}

/* Chat Main */
.chat-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--header-offset, var(--header-height)));
  transition: margin-left 0.22s ease;
}

.chat-layout.sidebar-collapsed .chat-sidebar {
  transform: translateX(calc(-1 * var(--sidebar-width)));
}

.chat-layout.sidebar-collapsed .chat-main {
  margin-left: 0;
}

.sidebar-restore-pill {
  position: fixed;
  top: calc(var(--header-offset, var(--header-height)) + 14px);
  left: 14px;
  z-index: 95;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(35, 214, 198, 0.18);
  background: linear-gradient(180deg, rgba(18, 23, 36, 0.92) 0%, rgba(12, 16, 27, 0.9) 100%);
  color: rgba(241, 247, 255, 0.92);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(14px);
  cursor: pointer;
}

.chat-layout.sidebar-collapsed .sidebar-restore-pill {
  display: inline-flex;
}

.sidebar-restore-pill:hover {
  border-color: rgba(35, 214, 198, 0.34);
}

.mobile-panel-fab {
  display: none;
  position: fixed;
  left: 12px;
  bottom: calc(104px + env(safe-area-inset-bottom, 0px));
  z-index: 98;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(14, 18, 28, 0.94) 0%, rgba(11, 14, 23, 0.9) 100%);
  color: rgba(244, 249, 255, 0.94);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255,255,255,0.05);
  backdrop-filter: blur(18px);
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.connection-status {
  padding: 10px 16px;
  font-size: 12px;
  color: var(--accent);
  background: linear-gradient(180deg, rgba(18, 18, 28, 0.92) 0%, rgba(18, 18, 28, 0.76) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(14px);
  box-shadow: inset 0 -1px 0 rgba(255,255,255,0.03);
}

.connection-status-copy {
  color: rgba(196, 208, 224, 0.62);
  font-size: 12px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 40px 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.chat-message {
  display: flex;
  gap: 14px;
  max-width: 780px;
  margin: 0 auto;
  width: 100%;
  align-items: flex-start;
}

.chat-message.user { flex-direction: row-reverse; }

.chat-message.user .message-content {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.message-avatar {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(135deg, #18d2bf 0%, #1ba8ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 12px 24px rgba(0, 168, 255, 0.14);
  border: 1px solid rgba(255,255,255,0.06);
  overflow: hidden;
}

.chat-message.user .message-avatar {
  background: linear-gradient(135deg, rgba(28, 31, 48, 0.98) 0%, rgba(19, 22, 35, 0.98) 100%);
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.message-avatar::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.02) 42%, rgba(255,255,255,0.01) 100%);
  pointer-events: none;
}

.message-avatar::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  right: -5px;
  top: -5px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0) 72%);
  opacity: 0.38;
  pointer-events: none;
}

.message-avatar-glyph {
  position: relative;
  z-index: 1;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #06131d;
}

.chat-message.user .message-avatar-glyph {
  color: #bfe4ff;
}

.message-content {
  flex: 1;
  min-width: 0;
}

.message-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.chat-message.user .message-header {
  justify-content: flex-end;
}

.chat-message.user .message-role {
  order: 2;
}

.chat-message.user .message-model {
  order: 1;
}

.message-role {
  font-weight: 600;
  font-size: 14px;
  color: rgba(248, 251, 255, 0.94);
  letter-spacing: -0.01em;
}

.message-model {
  font-size: 11px;
  color: rgba(211, 222, 236, 0.54);
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.05);
  letter-spacing: 0.01em;
}

.message-card {
  position: relative;
  padding: 16px 18px 14px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(15, 20, 32, 0.7) 0%, rgba(12, 16, 27, 0.64) 100%);
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(16px);
  overflow: hidden;
}

.chat-message.user .message-card {
  background: linear-gradient(180deg, rgba(17, 22, 34, 0.76) 0%, rgba(14, 18, 28, 0.7) 100%);
  border-color: rgba(89, 140, 255, 0.08);
}

.message-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.01) 28%, rgba(255,255,255,0) 100%);
  pointer-events: none;
}

.chat-message.assistant .message-card::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(29, 211, 191, 0.95) 0%, rgba(34, 169, 255, 0.8) 100%);
  opacity: 0.72;
}

.message-text {
  position: relative;
  z-index: 1;
  font-size: 14px;
  line-height: 1.68;
  color: rgba(246, 250, 255, 0.9);
  letter-spacing: -0.005em;
}

.message-image-wrap {
  margin-top: 14px;
  position: relative;
  z-index: 1;
}

.message-image-loading {
  display: grid;
  gap: 12px;
  width: min(100%, 520px);
  margin-top: 14px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background:
    linear-gradient(180deg, rgba(17, 22, 33, 0.9) 0%, rgba(11, 15, 24, 0.88) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.image-loading-frame {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-height: 118px;
}

.image-loading-frame span {
  display: block;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%),
    radial-gradient(circle at top, rgba(35, 214, 198, 0.08), transparent 60%);
  border: 1px solid rgba(255,255,255,0.05);
  position: relative;
  overflow: hidden;
}

.image-loading-frame span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0%, rgba(255,255,255,0.12) 42%, transparent 70%);
  transform: translateX(-120%);
  animation: imageShimmer 1.8s ease-in-out infinite;
}

.image-loading-frame span:nth-child(2)::after {
  animation-delay: 0.18s;
}

.image-loading-frame span:nth-child(3)::after {
  animation-delay: 0.36s;
}

.image-loading-copy {
  display: grid;
  gap: 4px;
}

.image-loading-copy strong {
  font-size: 12px;
  line-height: 1.2;
  color: #f7fbff;
}

.image-loading-copy span {
  font-size: 11px;
  line-height: 1.45;
  color: rgba(198, 208, 222, 0.74);
}

.message-image-wrap a {
  display: block;
  text-decoration: none;
}

.message-image {
  display: block;
  width: 100%;
  max-width: 520px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.18);
}

.message-image-expired {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(100%, 520px);
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(180deg, rgba(22, 26, 37, 0.8) 0%, rgba(16, 19, 28, 0.76) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.message-image-expired[hidden] {
  display: none !important;
}

.message-image-expired-icon {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  color: rgba(255, 216, 143, 0.9);
  font-size: 14px;
}

.message-image-expired-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.message-image-expired-copy strong {
  font-size: 11px;
  line-height: 1.2;
  color: #f7fbff;
}

.message-image-expired-copy span {
  font-size: 10px;
  line-height: 1.35;
  color: rgba(198, 208, 222, 0.66);
}

.message-text p { margin-bottom: 12px; }
.message-text p:last-child { margin-bottom: 0; }
.message-text strong { font-weight: 600; }
.message-text em { font-style: italic; }
.message-text h2, .message-text h3, .message-text h4 {
  margin: 20px 0 10px 0;
  font-weight: 600;
}
.message-text h2 { font-size: 18px; }
.message-text h3 { font-size: 16px; }
.message-text h4 { font-size: 14px; }

.message-text .inline-code {
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
}

.message-text .code-block {
  background: #0d0d14;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin: 12px 0;
  overflow: hidden;
}

.message-text .code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid var(--border);
}

.message-text .code-lang {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--accent);
  font-family: var(--font-mono);
}

.message-text .code-copy {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.message-text .code-copy:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

.message-text .code-content {
  padding: 16px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre;
}

.message-text .code-content.python { border-left: 3px solid #3776ab; }
.message-text .code-content.javascript { border-left: 3px solid #f7df1e; }
.message-text .code-content.js { border-left: 3px solid #f7df1e; }
.message-text .code-content.typescript { border-left: 3px solid #3178c6; }
.message-text .code-content.html { border-left: 3px solid #e34f26; }
.message-text .code-content.css { border-left: 3px solid #264de4; }
.message-text .code-content.json { border-left: 3px solid #5b5b5b; }
.message-text .code-content.bash { border-left: 3px solid #4eaa25; }
.message-text .code-content.shell { border-left: 3px solid #4eaa25; }
.message-text .code-content.sql { border-left: 3px solid #336791; }
.message-text .code-content.markdown { border-left: 3px solid #083fa1; }

.message-text pre {
  background: #0d0d14;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 12px 0;
  overflow-x: auto;
}

.message-text pre code { background: none; padding: 0; font-size: 13px; line-height: 1.6; }

.message-text ul, .message-text ol {
  margin: 12px 0;
  padding-left: 24px;
}
.message-text ul { list-style: disc; }
.message-text ol { list-style: decimal; }
.message-text li { margin-bottom: 6px; }

.message-text table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 13px;
}
.message-text td, .message-text th {
  padding: 8px 12px;
  border: 1px solid var(--border);
  text-align: left;
}
.message-text th {
  background: rgba(255, 255, 255, 0.05);
  font-weight: 600;
}

.message-actions {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  opacity: 0;
  transition: opacity 0.2s;
  flex-wrap: wrap;
}

.chat-message:hover .message-actions { opacity: 1; }

.message-action-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  color: rgba(216, 225, 238, 0.58);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255,255,255,0.05);
  cursor: pointer;
  transition: all 0.2s;
}

.message-action-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-primary);
}

.message-action-btn.copy:hover { color: var(--accent); }
.message-action-btn.branch:hover { color: #7aa8ff; }
.message-action-btn.regenerate:hover { color: #f5a623; }
.message-action-btn.delete:hover { color: #ff5f57; }
.message-action-btn svg { width: 13px; height: 13px; }

@keyframes imageShimmer {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 8px 0;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: bounce 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce { 
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; } 
  30% { transform: translateY(-8px); opacity: 1; } 
}

.typing-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 8px;
  animation: pulse 2s infinite;
}

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

/* Message Animations */
.chat-message {
  animation: messageSlideIn 0.3s ease-out;
}

.chat-message.typing {
  animation: typingPulse 2s infinite;
}

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

@keyframes typingPulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* Chat Input */
.chat-input-container {
  padding: 12px 22px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  z-index: 50;
  background: linear-gradient(180deg, rgba(8, 10, 18, 0) 0%, rgba(8, 10, 18, 0.16) 16%, rgba(8, 10, 18, 0.42) 100%);
  backdrop-filter: blur(8px);
}

.chat-input-wrapper {
  max-width: 780px;
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(15, 18, 27, 0.92) 0%, rgba(11, 14, 22, 0.88) 100%);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255,255,255,0.04);
  backdrop-filter: blur(18px);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  animation: inputDockIn 0.34s ease-out;
}

.chat-input-wrapper:focus-within {
  border-color: rgba(122, 169, 255, 0.16);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(122, 169, 255, 0.05);
  transform: translateY(-1px);
}

.chat-input-wrapper.image-mode {
  border-radius: 18px;
}

.model-selector { display: flex; align-items: center; gap: 10px; }
.model-dropdown { position: relative; }

.model-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 15px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  background: linear-gradient(180deg, rgba(22, 27, 40, 0.88) 0%, rgba(14, 18, 29, 0.82) 100%);
  border: 1px solid rgba(255,255,255,0.09);
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.model-dropdown-btn:hover {
  border-color: rgba(35, 214, 198, 0.34);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255,255,255,0.04);
}
.model-dropdown-btn svg { width: 16px; height: 16px; transition: transform 0.2s; }
.model-dropdown.open .model-dropdown-btn svg { transform: rotate(180deg); }

.model-dropdown-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  width: 360px;
  background: linear-gradient(180deg, rgba(16, 20, 31, 0.96) 0%, rgba(12, 16, 26, 0.94) 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 22px;
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.98);
  transition: all 0.15s ease;
  max-height: 350px;
  overflow-y: auto;
  z-index: 9999;
  box-shadow: 0 24px 64px rgba(0,0,0,0.34);
  backdrop-filter: blur(18px);
}

.model-dropdown.open .model-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.model-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px;
  border-radius: 18px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0%, rgba(255,255,255,0.015) 100%);
  margin-bottom: 6px;
  text-align: left;
}

.model-option:last-child {
  margin-bottom: 0;
}

.model-option:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255,255,255,0.10);
}

.model-option.selected {
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.13) 0%, rgba(0, 168, 255, 0.08) 100%);
  border-color: rgba(0, 212, 170, 0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 16px 28px rgba(0, 212, 170, 0.08);
}

.model-option-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(28, 210, 191, 0.22) 0%, rgba(34, 169, 255, 0.18) 100%);
  border: 1px solid rgba(255,255,255,0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.model-option-mark.tier-free {
  background: linear-gradient(135deg, rgba(136, 153, 177, 0.18) 0%, rgba(87, 98, 118, 0.16) 100%);
}

.model-option-mark.tier-start {
  background: linear-gradient(135deg, rgba(28, 210, 191, 0.22) 0%, rgba(34, 169, 255, 0.18) 100%);
}

.model-option-mark.tier-pro {
  background: linear-gradient(135deg, rgba(255, 190, 92, 0.24) 0%, rgba(217, 124, 38, 0.18) 100%);
}

.model-option-mark.tier-infinity {
  background: linear-gradient(135deg, rgba(255, 116, 202, 0.24) 0%, rgba(143, 110, 255, 0.2) 100%);
}

.model-option-symbol {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #f8fbff;
}

.model-option-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }

.model-option-info.compact {
  justify-content: center;
  gap: 6px;
}

.model-option-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.model-option-name { font-size: 14px; font-weight: 600; color: #f8fbff; }
.model-option-level {
  display: block;
  width: 58px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
}

.model-option-level.tier-free {
  background: linear-gradient(90deg, rgba(167, 178, 198, 0.9) 0%, rgba(105, 118, 141, 0.55) 100%);
}

.model-option-level.tier-start {
  background: linear-gradient(90deg, rgba(23, 212, 191, 0.92) 0%, rgba(34, 169, 255, 0.65) 100%);
}

.model-option-level.tier-pro {
  background: linear-gradient(90deg, rgba(255, 192, 91, 0.96) 0%, rgba(245, 136, 42, 0.78) 100%);
}

.model-option-level.tier-infinity {
  background: linear-gradient(90deg, rgba(255, 110, 204, 0.96) 0%, rgba(142, 112, 255, 0.82) 100%);
}

.model-option-context {
  font-size: 11px;
  color: rgba(192, 208, 225, 0.72);
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
}

.model-option-desc {
  font-size: 12px;
  color: rgba(220, 231, 244, 0.78);
  line-height: 1.45;
}

.model-option-meta {
  font-size: 11px;
  color: rgba(170, 190, 212, 0.58);
  line-height: 1.5;
}

.model-option-badge {
  align-self: flex-start;
  font-size: 9px;
  padding: 4px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-left: 12px;
  flex-shrink: 0;
}

.model-option-badge.free {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(240, 245, 255, 0.82);
  border: 1px solid rgba(255,255,255,0.08);
}

.model-option-badge.pro {
  background: linear-gradient(135deg, rgba(245, 166, 35, 0.18) 0%, rgba(255, 205, 94, 0.14) 100%);
  color: #f7c661;
  border: 1px solid rgba(245, 166, 35, 0.16);
}

.chat-input-toolbar {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 0;
}

.chat-input-body {
  position: relative;
  display: block;
  padding: 12px;
}

.chat-input-body.image-mode {
  padding: 10px;
}

.chat-mode-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 11px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(18, 24, 35, 0.6);
  color: rgba(235, 241, 255, 0.66);
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(14px);
}

.chat-mode-btn svg {
  width: 14px;
  height: 14px;
}

.chat-mode-btn:hover {
  border-color: rgba(98, 150, 255, 0.28);
  color: #fff;
}

.chat-mode-btn.active {
  border-color: rgba(122, 169, 255, 0.24);
  box-shadow: 0 8px 20px rgba(16, 28, 48, 0.16);
  color: #f7fbff;
}

.chat-mode-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.chat-mode-btn span {
  display: none;
}

.chat-upload-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(20, 25, 38, 0.68);
  color: rgba(235, 241, 255, 0.76);
  cursor: pointer;
  transition: all 0.2s ease;
}

.chat-upload-btn svg {
  width: 16px;
  height: 16px;
}

.chat-upload-btn:hover {
  border-color: rgba(98, 150, 255, 0.28);
  color: #fff;
}

.chat-input-actions {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.chat-input-actions > * {
  pointer-events: auto;
}

.composer-upload-btn,
.chat-send-btn {
  position: absolute;
  bottom: 20px;
  z-index: 2;
}

.composer-upload-btn {
  left: 20px;
}

.image-edit-preview,
.image-edit-guidance {
  display: none !important;
}

.image-mask-preview .image-edit-preview-thumb {
  background: #0b0f16;
  object-fit: contain;
}

.image-edit-preview-thumb {
  width: 32px;
  height: 32px;
  display: block;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.06);
}

.image-edit-preview-copy {
  min-width: 0;
  display: grid;
  gap: 0;
}

.image-edit-guidance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 14px 6px;
  padding: 6px 8px;
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(245, 166, 35, 0.1);
  background: rgba(40, 30, 16, 0.52);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.image-edit-guidance-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.image-edit-guidance-copy strong {
  font-size: 10px;
  color: #ffd98f;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.image-edit-guidance-copy span {
  font-size: 10px;
  line-height: 1.2;
  color: rgba(243, 229, 202, 0.72);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.image-edit-guidance .btn {
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
  box-shadow: none;
  flex: 0 0 auto;
}

.image-edit-guidance .btn:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.12);
}

.image-edit-preview-title {
  font-size: 11px;
  font-weight: 600;
  color: #f6fbff;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.image-edit-preview-subtitle {
  font-size: 10px;
  line-height: 1.2;
  color: rgba(194, 206, 222, 0.62);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.image-edit-preview-clear {
  margin-left: 0;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.03);
  color: rgba(235, 241, 255, 0.8);
  cursor: pointer;
}

.image-edit-preview-clear svg {
  width: 10px;
  height: 10px;
}

.modal-wide {
  max-width: min(920px, calc(100vw - 28px));
}

.mask-editor-modal {
  overflow: hidden;
}

.mask-editor-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.mask-editor-copy {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mask-editor-caption {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.mask-editor-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.mask-editor-control {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-secondary);
}

.mask-editor-control input[type="range"] {
  width: min(260px, 52vw);
}

.mask-editor-control strong {
  min-width: 54px;
  font-size: 12px;
  color: #f6fbff;
}

.mask-editor-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mask-editor-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.08);
  background:
    linear-gradient(180deg, rgba(13, 18, 28, 0.92) 0%, rgba(9, 13, 21, 0.96) 100%),
    radial-gradient(circle at top, rgba(88, 140, 255, 0.12), transparent 55%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

#maskEditorCanvas {
  max-width: 100%;
  max-height: min(70vh, 640px);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(180deg, rgba(5, 7, 12, 0.88) 0%, rgba(8, 11, 18, 0.92) 100%);
  touch-action: none;
  cursor: crosshair;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.26);
}

.image-preset-toggle {
  display: none;
  align-items: center;
  gap: 3px;
  padding: 2px;
  border-radius: 11px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(18, 24, 35, 0.6);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
  backdrop-filter: blur(14px);
}

.image-preset-toggle.visible {
  display: inline-flex;
}

.image-preset-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: rgba(222, 231, 246, 0.72);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.image-preset-btn:hover {
  color: #f6fbff;
}

.image-preset-btn.active {
  background: linear-gradient(180deg, rgba(51, 103, 255, 0.2) 0%, rgba(24, 39, 84, 0.24) 100%);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.chat-upload-menu {
  position: absolute;
  left: 16px;
  bottom: 68px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: min(204px, calc(100vw - 56px));
  padding: 8px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.07);
  background: linear-gradient(180deg, rgba(16, 20, 31, 0.95) 0%, rgba(12, 16, 26, 0.93) 100%);
  box-shadow: 0 18px 38px rgba(0,0,0,0.28);
  backdrop-filter: blur(18px);
}

.chat-input-wrapper.image-mode .chat-upload-menu {
  left: 12px;
  bottom: 58px;
  width: min(176px, calc(100vw - 52px));
  padding: 6px;
  gap: 5px;
  border-radius: 12px;
}

.chat-upload-menu[hidden] {
  display: none !important;
}

.chat-upload-menu-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 11px;
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  background: rgba(255,255,255,0.025);
  color: rgba(235, 241, 255, 0.86);
  cursor: pointer;
  text-align: left;
  font-size: 12px;
}

.chat-input-wrapper.image-mode .chat-upload-menu-item {
  padding: 8px 9px;
  gap: 8px;
  border-radius: 10px;
  font-size: 11px;
}

.chat-input-wrapper.image-mode .chat-upload-menu-item svg {
  width: 14px;
  height: 14px;
}

.chat-upload-menu-item svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.chat-upload-menu-item:hover {
  border-color: rgba(98, 150, 255, 0.28);
  background: rgba(255,255,255,0.06);
}

.context-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 14px 0;
  min-width: 0;
}

.context-chip {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.028);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.context-chip.pending {
  border-color: rgba(102, 154, 255, 0.16);
  background: rgba(20, 34, 62, 0.32);
}

.context-chip.active {
  border-color: rgba(78, 206, 173, 0.12);
  background: rgba(14, 30, 28, 0.3);
}

.context-chip-icon {
  flex: 0 0 auto;
  font-size: 11px;
  color: rgba(233, 240, 250, 0.58);
}

.context-chip-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.context-chip-copy strong {
  font-size: 9px;
  line-height: 1.2;
  color: rgba(244, 248, 255, 0.9);
  font-weight: 600;
}

.context-chip-copy span {
  max-width: 220px;
  font-size: 9px;
  line-height: 1.2;
  color: rgba(194, 206, 222, 0.56);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.context-chip-clear {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  color: rgba(238, 243, 252, 0.66);
  cursor: pointer;
  line-height: 1;
}

.composer-upgrade-hint {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin: 6px 14px 0;
  padding: 0;
  border: none;
  background: transparent;
}

.composer-upgrade-copy {
  font-size: 10px;
  line-height: 1.25;
  color: rgba(188, 200, 216, 0.56);
}

.composer-upgrade-link {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 600;
  color: rgba(142, 242, 219, 0.84);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.composer-upgrade-link:hover {
  color: #b8fff0;
}

@media (max-width: 640px) {
  .chat-input-toolbar {
    top: 10px;
    right: 10px;
    gap: 8px;
  }

  .chat-mode-btn {
    width: 32px;
    height: 32px;
    min-height: 32px;
  }

  .image-preset-btn {
    width: 26px;
    height: 26px;
    font-size: 11px;
  }

  .chat-upload-btn {
    width: 40px;
    height: 40px;
  }

  .chat-input-body {
    padding: 10px;
  }

  .chat-input-body.image-mode {
    padding: 8px;
  }

  .chat-textarea {
    min-height: 120px;
    padding: 50px 54px 42px 54px;
  }

  .chat-input-wrapper.image-mode .chat-textarea {
    min-height: 88px;
    max-height: 136px;
    padding: 42px 48px 32px 48px;
  }

  .composer-upload-btn {
    left: 18px;
    bottom: 20px;
  }

  .chat-input-wrapper.image-mode .composer-upload-btn {
    left: 16px;
    bottom: 16px;
  }

  .chat-send-btn {
    right: 18px;
    bottom: 20px;
  }

  .chat-input-wrapper.image-mode .chat-send-btn {
    right: 16px;
    bottom: 16px;
  }

  .chat-upload-menu {
    left: 10px;
    right: 10px;
    width: auto;
  }

  .chat-input-wrapper.image-mode .chat-upload-menu {
    left: 8px;
    right: auto;
    bottom: 56px;
    width: min(164px, calc(100vw - 44px));
  }

  .mask-editor-controls {
    align-items: stretch;
  }

  .mask-editor-control {
    width: 100%;
    flex-wrap: wrap;
  }

  .mask-editor-control input[type="range"] {
    width: 100%;
  }

  .mask-editor-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

.chat-textarea {
  width: 100%;
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  resize: none;
  outline: none;
  max-height: 200px;
  min-height: 118px;
  padding: 48px 54px 38px 54px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(12, 16, 26, 0.8) 0%, rgba(10, 13, 22, 0.76) 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
}

.chat-input-wrapper.image-mode .chat-textarea {
  min-height: 96px;
  max-height: 168px;
  padding: 44px 50px 34px 50px;
}

.chat-textarea::placeholder { color: var(--text-muted); }

.chat-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(26, 210, 191, 0.95) 0%, rgba(34, 169, 255, 0.92) 100%);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
  flex: 0 0 auto;
  box-shadow: 0 10px 20px rgba(0, 168, 255, 0.16);
  right: 20px;
}

.chat-send-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(0, 168, 255, 0.22);
}

.chat-send-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

.chat-send-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.chat-send-btn svg { width: 18px; height: 18px; color: var(--primary); }

.chat-input-footer {
  padding: 0 14px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: rgba(177, 191, 208, 0.54);
}

.chat-input-wrapper.image-mode .chat-input-footer {
  padding-top: 2px;
}

.chat-input-wrapper.image-mode .keyboard-hint {
  opacity: 0.7;
}

.rate-limit-status {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(196, 208, 224, 0.54);
  min-width: 0;
  flex-wrap: wrap;
}

.rate-progress {
  width: 56px;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}

.rate-progress-fill { height: 100%; background: var(--accent); transition: width 0.3s; }
.rate-progress-fill.warning { background: #f5a623; }
.rate-progress-fill.danger { background: #ff5f57; }

.keyboard-hint kbd {
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
}

@keyframes inputDockIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Empty State */
.chat-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
}

.empty-icon {
  width: 80px;
  height: 80px;
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(23, 212, 191, 0.24) 0%, rgba(34, 169, 255, 0.18) 100%);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 20px 44px rgba(0, 168, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin-bottom: 24px;
}

.empty-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 12px;
}

.empty-desc {
  color: var(--text-secondary);
  font-size: 15px;
  max-width: 400px;
  margin-bottom: 32px;
}

.empty-prompts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  max-width: 600px;
  width: 100%;
}

.empty-prompt {
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(20, 24, 36, 0.72) 0%, rgba(14, 18, 29, 0.66) 100%);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
}

.empty-prompt:hover {
  border-color: rgba(24, 210, 191, 0.34);
  background: linear-gradient(180deg, rgba(24, 210, 191, 0.12) 0%, rgba(21, 32, 46, 0.72) 100%);
  transform: translateY(-2px);
}

.empty-prompt-title { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.empty-prompt-desc { font-size: 12px; color: var(--text-muted); }

@media (max-width: 600px) {
  .empty-prompts {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
}

/* ========== MODAL ========== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(10px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.modal-overlay.open { opacity: 1; pointer-events: auto; }

.modal {
  width: 420px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 64px);
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.3s;
}

.modal-overlay.open .modal { transform: scale(1); }

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title { font-family: var(--font-heading); font-size: 18px; font-weight: 600; }

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.modal-close:hover { background: rgba(255, 255, 255, 0.1); color: var(--text-primary); }

.modal-body { padding: 24px; overflow-y: auto; }

.modal-tabs { display: flex; gap: 8px; margin-bottom: 24px; }

.modal-tab {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
}

.modal-tab.active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }

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

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

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

.form-error { color: #ff5f57; font-size: 12px; margin-top: 8px; display: none; }
.form-error.show { display: block; }

.confirm-modal .modal { width: 360px; }

.confirm-message { font-size: 15px; line-height: 1.7; color: var(--text-secondary); margin-bottom: 24px; }

.confirm-actions { display: flex; gap: 12px; justify-content: flex-end; }

/* ========== TOAST ========== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  animation: slideIn 0.3s ease-out;
  min-width: 280px;
}

@keyframes slideIn { from { opacity: 0; transform: translateX(100%); } to { opacity: 1; transform: translateX(0); } }

.toast.success { border-color: var(--accent); }
.toast.error { border-color: #ff5f57; }
.toast.warning { border-color: #f5a623; }

.toast-icon { width: 20px; height: 20px; flex-shrink: 0; }
.toast.success .toast-icon { color: var(--accent); }
.toast.error .toast-icon { color: #ff5f57; }
.toast.warning .toast-icon { color: #f5a623; }

.toast-message { flex: 1; font-size: 14px; }

.toast-close {
  padding: 4px;
  border-radius: 4px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.toast-close:hover { background: rgba(255, 255, 255, 0.1); color: var(--text-primary); }

/* ========== FOOTER ========== */
footer, #landingFooter {
  padding: 20px 5%;
  border-top: 1px solid var(--border);
  background: var(--primary);
  position: relative;
  z-index: 20;
}

#landingFooter { display: none !important; }
#landingFooter.show { display: block !important; }

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.footer-center {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-center a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.footer-center a:hover { color: var(--accent); }

.footer-divider {
  color: var(--border);
}

.footer-copy {
  color: var(--text-muted);
  font-size: 13px;
}

.pricing-currency-note {
  margin: -6px auto 18px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.hero-microcopy {
  margin-top: 0.9rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.brand-architecture-copy {
  margin-top: 1.15rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  color: var(--text-secondary);
}

.brand-architecture-copy p {
  margin: 0;
  line-height: 1.65;
}

#models .brand-architecture-copy {
  width: min(100%, 900px);
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.tool-disclaimer {
  margin-top: 0.85rem;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--warning);
  opacity: 0.9;
}

.legal-copy {
  margin-top: 0.9rem;
  max-width: 760px;
  font-size: 0.96rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.88);
}

.legal-copy a {
  color: var(--accent);
  text-decoration: none;
}

.legal-copy a:hover {
  text-decoration: underline;
}

.legal-copy-extended {
  max-width: 920px;
}

.legal-hero-card {
  max-width: 920px;
  margin: 0 auto 22px;
  padding: 24px 26px;
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(0, 212, 170, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.legal-eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.legal-hero-card h3 {
  margin: 14px 0 10px;
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  line-height: 1.15;
  font-family: var(--font-heading);
  color: var(--text-primary);
}

.legal-hero-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.72;
}

.legal-grid,
.contact-grid {
  max-width: 920px;
  margin: 0 auto 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.legal-card,
.contact-card {
  padding: 18px 18px 16px;
  border-radius: 18px;
  border: 1px solid var(--glass-border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.042), rgba(255, 255, 255, 0.018));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.14);
}

.legal-card h4,
.contact-card h4 {
  margin: 0 0 10px;
  font-size: 1rem;
  color: var(--text-primary);
}

.legal-card p,
.contact-card p {
  margin: 0;
  color: rgba(233, 239, 249, 0.82);
  line-height: 1.68;
}

.contact-label {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.contact-shell {
  width: min(100%, 1180px);
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.contact-route-grid {
  max-width: 1180px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-card .section-cta-row {
  margin-top: auto;
  padding-top: 8px;
}

.contact-card.featured {
  border-color: rgba(0, 212, 170, 0.18);
  background:
    radial-gradient(circle at top right, rgba(0, 212, 170, 0.09), transparent 34%),
    linear-gradient(180deg, rgba(18, 24, 36, 0.88), rgba(11, 15, 25, 0.72));
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.contact-card-meta {
  font-size: 0.9rem;
  color: var(--text-secondary) !important;
}

.diagnostic-layout {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.78fr);
  gap: 18px;
  align-items: start;
}

.support-steps {
  max-width: 920px;
  margin: 0 auto 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.support-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 16px 14px;
  border-radius: 18px;
  border: 1px solid var(--glass-border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.018));
  color: rgba(255, 255, 255, 0.84);
}

.support-step strong {
  color: var(--accent);
  font-size: 1rem;
  line-height: 1;
}

.strategic-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.section-cta-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.section-cta-row.align-left {
  justify-content: flex-start;
}

.custom-solution-card {
  max-width: 1180px;
  margin: 22px auto 0;
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.9fr);
  gap: 22px;
  border-radius: 28px;
  border: 1px solid var(--glass-border);
  background:
    radial-gradient(circle at top right, rgba(0, 212, 170, 0.1), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.22);
}

.custom-solution-copy h3 {
  margin: 0 0 10px;
  font-size: clamp(1.4rem, 2.4vw, 1.95rem);
  color: var(--text-primary);
  font-family: var(--font-heading);
}

.custom-solution-copy p {
  margin: 0;
  line-height: 1.72;
  color: rgba(229, 236, 247, 0.76);
}

.custom-solution-actions {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}

.tool-preview-note,
.model-note {
  margin-top: 0.85rem;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-muted);
}

#solutionScope .tool-preview-note {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.tool-preview-shell {
  margin-top: 16px;
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
  overflow: hidden;
}

.tool-preview-placeholder {
  min-height: 124px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
}

.examples-highlight.secondary {
  margin-top: 34px;
}

#examples .use-case-grid + .examples-highlight {
  margin-top: 24px;
}

#examples .examples-highlight.secondary .example-stat {
  display: grid;
  place-content: center;
  place-items: center;
  grid-template-columns: 1fr;
  padding-inline: 10px;
}

#examples .examples-highlight.secondary .example-stat strong,
#examples .examples-highlight.secondary .example-stat span {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-inline: auto;
  text-align: center;
}

#examples .examples-highlight {
  background:
    radial-gradient(circle at top left, rgba(35, 214, 198, 0.06), transparent 34%),
    radial-gradient(circle at bottom right, rgba(122, 168, 255, 0.06), transparent 32%),
    linear-gradient(180deg, rgba(15, 19, 29, 0.7) 0%, rgba(10, 13, 22, 0.7) 100%);
}

#examples .example-card {
  background:
    linear-gradient(180deg, rgba(18, 23, 34, 0.7) 0%, rgba(11, 15, 25, 0.7) 100%);
}

#examples .example-card-featured {
  background:
    linear-gradient(180deg, rgba(18, 25, 36, 0.72) 0%, rgba(10, 15, 24, 0.72) 100%);
}

#examples .example-card:hover {
  background:
    linear-gradient(180deg, rgba(18, 25, 36, 0.76) 0%, rgba(10, 15, 24, 0.74) 100%);
}

.use-case-grid .example-card {
  display: flex;
  flex-direction: column;
}

.use-case-grid .example-card .example-action {
  margin-top: auto;
  padding-top: 16px;
}

.process-steps {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.process-step {
  padding: 20px 18px 18px;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
}

.process-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-bottom: 14px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(0, 212, 170, 0.08);
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 700;
}

.process-step h4 {
  margin: 0 0 10px;
  font-size: 1rem;
  color: var(--text-primary);
}

.process-step p {
  margin: 0;
  line-height: 1.64;
  color: rgba(229, 236, 247, 0.74);
}

.diagnostic-form {
  max-width: none;
  margin: 0;
  padding: 22px;
  border-radius: 28px;
  border: 1px solid var(--glass-border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
}

.diagnostic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.diagnostic-span {
  grid-column: 1 / -1;
}

.form-textarea {
  min-height: 132px;
  resize: vertical;
}

.diagnostic-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
  align-items: center;
}

.contact-aside {
  display: grid;
  gap: 16px;
}

.contact-aside-card {
  padding: 22px 20px;
  border-radius: 24px;
  border: 1px solid var(--glass-border);
  background:
    linear-gradient(180deg, rgba(16, 21, 34, 0.82), rgba(10, 13, 24, 0.72));
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
}

.contact-aside-card.compact {
  background:
    radial-gradient(circle at top right, rgba(0, 168, 255, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(15, 20, 33, 0.8), rgba(10, 13, 24, 0.72));
}

.contact-aside-card h3 {
  margin: 8px 0 10px;
  font-family: var(--font-heading);
  font-size: 1.18rem;
  color: var(--text-primary);
}

.contact-aside-card p {
  margin: 0;
  color: rgba(229, 236, 247, 0.78);
  line-height: 1.7;
}

.contact-flow-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.contact-flow-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 14px 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.025);
}

.contact-flow-item strong {
  color: var(--accent);
  font-size: 0.98rem;
  line-height: 1;
}

.contact-flow-item span {
  color: rgba(229, 236, 247, 0.78);
  line-height: 1.58;
}

.solution-tier-grid {
  width: 100%;
  grid-template-columns: 1fr;
  margin: 0;
}

.solution-tier-card {
  min-height: 0;
}

.support-step span {
  line-height: 1.6;
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.form-checkbox input[type="checkbox"] {
  margin-top: 0.15rem;
  accent-color: var(--accent);
}

.form-checkbox a {
  color: var(--accent);
  text-decoration: none;
}

.form-checkbox a:hover {
  text-decoration: underline;
}

/* ========== RESPONSIVE ========== */
@media (min-width: 1181px) {
  .pricing-card.popular.pro {
    transform: translateY(-10px);
  }

  .pricing-card.popular.pro:hover {
    transform: translateY(-14px);
  }
}

@media (max-width: 1180px) {
  header {
    padding: 0 18px;
  }

  .header-left {
    gap: 16px;
  }

  .nav-tabs {
    gap: 4px;
  }

  .nav-tab {
    padding: 8px 12px;
  }

  .pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 820px;
    gap: 16px;
  }

  .pricing-card.popular.pro {
    transform: none;
  }

  .pricing-desc {
    min-height: auto;
  }

  .footer-content {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }

  .legal-grid,
  .contact-grid,
  .support-steps {
    grid-template-columns: 1fr;
  }

  .diagnostic-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  :root {
    --header-height: 62px;
  }

  header {
    padding: 8px 12px 10px;
    height: auto;
    min-height: var(--header-height);
    align-items: stretch;
    gap: 8px;
    flex-wrap: nowrap;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(9, 11, 18, 0.94) 0%, rgba(9, 11, 18, 0.84) 100%);
    border-bottom-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
  }

  main {
    padding-top: 96px;
  }

  .header-left {
    width: 100%;
    order: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 10px;
  }

  .header-right {
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
    order: 1;
    min-width: 0;
  }

  .plan-badge {
    order: 0;
  }

  #userMenu,
  #authButtons {
    order: 1;
    width: auto;
  }

  #authButtons {
    display: flex;
    gap: 8px;
  }

  #authButtons .btn {
    flex: 1 1 0;
    justify-content: center;
  }

  .logo {
    align-self: center;
    padding-left: 2px;
  }

  .site-logo,
  .logo img {
    height: 25px;
  }

  .nav-tabs {
    display: flex;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    gap: 6px;
    padding: 4px;
    margin: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    justify-content: flex-start;
    scroll-snap-type: x proximity;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0%, rgba(255,255,255,0.02) 100%);
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
  }

  .nav-tabs::-webkit-scrollbar {
    display: none;
  }

  .nav-tab {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid transparent;
    background: rgba(12, 16, 26, 0.18);
    scroll-snap-align: start;
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
  }

  .nav-tab.active {
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.18) 0%, rgba(0, 168, 255, 0.10) 100%);
    border-color: rgba(0, 212, 170, 0.18);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
  }

  .landing-section {
    min-height: auto;
    padding: 72px 5% 54px;
    align-items: center;
  }

  .hero-subtitle {
    max-width: 100%;
    color: rgba(255, 255, 255, 0.82);
  }

  .hero-cta {
    width: 100%;
    flex-wrap: wrap;
  }

  .hero-cta .btn {
    width: 100%;
    justify-content: center;
  }

  .tool-carousel {
    margin-top: 22px;
  }

  .tool-carousel-track,
  .tool-carousel-card {
    min-height: 116px;
  }

  .tool-carousel-card {
    padding: 16px;
    gap: 13px;
    border-radius: 16px;
  }

  .tool-carousel-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  .tool-carousel-copy strong {
    font-size: 16px;
  }

  .tool-carousel-copy small {
    font-size: 13px;
  }

  .section-header {
    margin-bottom: 28px;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
  }

  .model-tabs {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .model-tab-btn {
    flex: 1 1 calc(50% - 8px);
    min-width: 120px;
  }

  .model-details {
    grid-template-columns: 1fr;
  }

  .model-detail-card {
    padding: 24px;
  }

  .features-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .examples-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .examples-categories {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    justify-content: flex-start;
  }

  .category-btn {
    white-space: nowrap;
    flex: 0 0 auto;
  }

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

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 620px;
  }

  .pricing-card {
    padding: 24px 20px;
  }

  .pricing-price {
    font-size: 32px;
  }

  .pricing-target {
    width: 100%;
    justify-content: center;
  }

  .chat-sidebar {
    display: flex;
    position: fixed;
    left: 0;
    top: var(--header-offset, var(--header-height));
    width: min(304px, calc(100vw - 34px));
    height: calc(100vh - var(--header-offset, var(--header-height)));
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    z-index: 120;
    box-shadow: 0 24px 64px rgba(0,0,0,0.54);
    border-right: 1px solid rgba(255,255,255,0.08);
    border-top-right-radius: 20px;
    border-bottom-right-radius: 20px;
    background: linear-gradient(180deg, rgba(16, 18, 30, 0.985) 0%, rgba(12, 13, 24, 0.97) 100%);
  }

  .chat-layout.drawer-open .chat-sidebar {
    transform: translateX(0);
  }

  .chat-layout.sidebar-collapsed .sidebar-restore-pill {
    display: none;
  }

  .mobile-panel-fab {
    display: inline-flex;
  }

  .chat-layout.drawer-open .mobile-panel-fab {
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px);
  }

  .chat-drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    top: var(--header-offset, var(--header-height));
    background: rgba(3, 6, 14, 0.62);
    z-index: 110;
  }

  .chat-layout.drawer-open .chat-drawer-overlay {
    display: block;
  }

  .drawer-handle {
    position: fixed;
    top: var(--header-offset, var(--header-height));
    left: 0;
    width: 14px;
    height: calc(100vh - var(--header-offset, var(--header-height)));
    z-index: 105;
  }

  .drawer-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(12, 16, 26, 0.46);
    color: var(--text-primary);
    font-size: 12px;
    cursor: pointer;
  }

  .connection-status {
    padding: 8px 12px;
    min-height: 40px;
    gap: 10px;
  }

  .chat-main {
    margin-left: 0;
    width: 100%;
  }

  .sidebar-restore-pill {
    display: none !important;
  }

  .chat-messages {
    padding: 20px 16px;
  }

  .chat-input-container {
    padding: 10px 12px 16px;
  }

  .chat-input-body,
  .chat-input-footer {
    gap: 10px;
  }

  .chat-input-footer {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }

  .connection-status-copy {
    display: none;
  }

  .footer-content {
    flex-direction: column;
    align-items: center;
  }

  .footer-center {
    flex-wrap: wrap;
    justify-content: center;
  }

  .modal {
    width: min(460px, calc(100vw - 24px));
    max-height: calc(100vh - 32px);
  }

  footer,
  #landingFooter {
    padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 640px) {
  body {
    overflow-x: hidden;
  }

  header {
    padding: 7px 10px 9px;
    gap: 7px;
  }

  main {
    padding-top: 90px;
  }

  .header-left {
    gap: 8px;
  }

  .header-right {
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
  }

  .plan-badge {
    align-self: center;
    font-size: 9px;
    padding: 4px 6px;
    letter-spacing: 0.02em;
    border-radius: 999px;
  }

  .plan-badge.infinity,
  .plan-badge.enterprise {
    background: linear-gradient(135deg, rgba(28, 210, 191, 0.88) 0%, rgba(34, 169, 255, 0.84) 100%);
    color: #051018;
    box-shadow: 0 10px 20px rgba(0, 168, 255, 0.12);
  }

  #authButtons {
    width: auto;
    gap: 8px;
  }

  #authButtons .btn {
    min-height: 32px;
    padding: 7px 10px;
    font-size: 11px;
  }

  .user-menu {
    margin-left: auto;
  }

  .user-avatar {
    width: 30px;
    height: 30px;
    font-size: 11px;
    border-radius: 10px;
    box-shadow: 0 10px 22px rgba(0, 168, 255, 0.14);
  }

  .site-logo,
  .logo img {
    height: 23px;
  }

  .landing-section {
    padding: 92px 16px 44px;
  }

  h1 {
    letter-spacing: -1.2px;
  }

  #hero h1,
  .section-header h2 {
    line-height: 0.98;
  }

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

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

  .feature-card {
    padding: 24px 20px;
  }

  .model-details,
  .features-grid,
  .examples-grid,
  .pricing-grid {
    width: min(100%, 720px);
    margin-left: auto;
    margin-right: auto;
  }

  .example-card,
  .model-detail-card,
  .pricing-card {
    border-radius: 18px;
  }

  .section-desc {
    font-size: 15px;
  }

  .chat-messages {
    padding: 16px 10px 18px;
    gap: 16px;
  }

  .chat-message {
    gap: 10px;
  }

  .message-actions {
    opacity: 1;
  }

  .message-action-btn {
    padding: 6px 10px;
    font-size: 11px;
  }

  .chat-message.user .message-header {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .message-content {
    min-width: 0;
    max-width: calc(100% - 42px);
  }

  .message-avatar {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .message-header {
    gap: 8px;
    margin-bottom: 8px;
  }

  .message-role {
    font-size: 14px;
  }

  .message-model {
    font-size: 11px;
    padding: 4px 8px;
  }

  .message-card {
    padding: 15px 15px 14px;
    border-radius: 18px;
  }

  .message-text {
    font-size: 14px;
    line-height: 1.62;
  }

  .message-actions {
    opacity: 1;
    flex-wrap: wrap;
  }

  .chat-input-container {
    padding: 9px 10px 13px;
  }

  .chat-input-body {
    padding: 9px 11px;
    gap: 10px;
  }

  .chat-textarea {
    font-size: 14px;
  }

  .connection-status {
    padding: 7px 10px;
  }

  .drawer-toggle-btn {
    padding: 7px 9px;
    border-radius: 11px;
  }

  .drawer-toggle-label {
    display: none;
  }

  .context-attachments {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 6px;
    margin: 6px 10px 0;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .context-attachments::-webkit-scrollbar {
    display: none;
  }

  .context-chip {
    flex: 0 0 auto;
    max-width: min(240px, calc(100vw - 56px));
  }

  .composer-upgrade-hint {
    margin: 6px 10px 0;
    gap: 8px;
    align-items: flex-start;
  }

  .composer-upgrade-copy,
  .composer-upgrade-link {
    font-size: 10px;
    line-height: 1.2;
  }

  .chat-input-footer {
    padding: 0 10px 8px;
  }

  .keyboard-hint {
    display: none;
  }

  .model-dropdown-btn {
    max-width: 100%;
  }

  .model-dropdown-menu {
    width: min(320px, calc(100vw - 24px));
  }

  .sidebar-model-selector .model-dropdown-menu {
    max-width: min(320px, calc(100vw - 36px));
  }

  .empty-prompts {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .empty-prompt {
    padding: 14px;
  }

  .toast-container {
    left: 12px;
    right: 12px;
    bottom: 14px;
  }

  .toast {
    min-width: 0;
    width: 100%;
  }

  .modal-header,
  .modal-body {
    padding: 18px;
  }

  .footer-center {
    gap: 10px;
  }

  .footer-center a {
    font-size: 13px;
  }
}

@media (max-width: 430px) {
  :root {
    --radius-lg: 16px;
    --radius-md: 12px;
  }

  header {
    padding: 6px 8px 8px;
  }

  main {
    padding-top: 84px;
  }

  .header-left {
    gap: 8px;
  }

  .header-right {
    gap: 6px;
  }

  .site-logo,
  .logo img,
  .footer-logo {
    height: 24px;
  }

  .plan-badge {
    font-size: 9px;
    padding: 3px 5px;
    max-width: 82px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .btn {
    padding: 10px 14px;
  }

  .btn-sm {
    padding: 6px 9px;
  }

  .landing-section {
    padding: 88px 12px 40px;
  }

  .nav-tabs {
    gap: 4px;
    padding: 3px;
  }

  .nav-tab {
    min-height: 30px;
    padding: 6px 9px;
    font-size: 10px;
    gap: 5px;
    border-radius: 11px;
  }

  .nav-tab svg {
    width: 13px;
    height: 13px;
  }

  .hero-subtitle,
  .section-desc,
  .pricing-desc,
  .empty-desc {
    font-size: 14px;
  }

  .hero-cta .btn-primary {
    box-shadow: 0 14px 30px rgba(0, 212, 170, 0.26);
  }

  .hero-cta .btn-ghost {
    background: rgba(10, 14, 24, 0.5);
  }

  .pricing-grid {
    gap: 14px;
  }

  .pricing-card {
    padding: 34px 16px 22px;
  }

  .pricing-badge {
    top: 10px;
    font-size: 9px;
    padding: 5px 10px;
  }

  .pricing-name {
    font-size: 20px;
  }

  .pricing-price {
    font-size: 30px;
  }

  .pricing-feature {
    font-size: 12px;
    gap: 8px;
  }

  .pricing-target {
    font-size: 11px;
    padding: 7px 10px;
  }

  .pricing-card .btn {
    min-height: 42px;
  }

  .chat-input-footer {
    font-size: 10px;
  }

  .context-chip {
    max-width: min(210px, calc(100vw - 46px));
    padding: 5px 8px;
  }

  .context-chip-copy strong,
  .context-chip-copy span {
    font-size: 9px;
  }

  .keyboard-hint {
    display: none;
  }

  .rate-progress {
    width: 62px;
  }

  .chat-messages {
    padding: 14px 8px 16px;
    gap: 14px;
  }

  .mobile-panel-fab {
    left: 10px;
    top: calc(var(--header-offset, var(--header-height)) + 14px);
    bottom: auto;
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  .sidebar-header {
    padding: 14px 14px 12px;
    gap: 10px;
  }

  .sidebar-tools {
    gap: 8px;
  }

  .sidebar-model-panel {
    padding: 10px;
    border-radius: 14px;
  }

  .sidebar-model-label {
    margin-bottom: 8px;
    font-size: 10px;
  }

  .history-item {
    padding: 11px 10px;
    border-radius: 12px;
  }

  .history-item-title {
    font-size: 12px;
  }

  .sidebar-footer {
    padding: 12px 14px;
  }

  .chat-message {
    gap: 8px;
  }

  .message-content {
    max-width: calc(100% - 38px);
  }

  .message-avatar {
    width: 30px;
    height: 30px;
    border-radius: 11px;
  }

  .message-avatar-glyph {
    font-size: 14px;
  }

  .message-header {
    gap: 7px;
    margin-bottom: 7px;
  }

  .message-role {
    font-size: 13px;
  }

  .message-model {
    font-size: 10px;
    padding: 3px 7px;
  }

  .message-card {
    padding: 13px 13px 12px;
    border-radius: 16px;
  }

  .message-image-expired {
    gap: 10px;
    padding: 12px 13px;
    border-radius: 16px;
  }

  .message-image-expired-icon {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    font-size: 14px;
  }

  .message-image-expired-copy strong {
    font-size: 11px;
  }

  .message-image-expired-copy span {
    font-size: 10px;
  }

  .message-text {
    font-size: 13px;
    line-height: 1.58;
  }

  .chat-input-body {
    padding: 8px 9px;
  }

  .chat-input-body.image-mode {
    padding: 7px 8px;
  }

  .chat-mode-btn {
    min-height: 40px;
    padding: 0 12px;
    font-size: 12px;
  }

  .image-preset-toggle {
    width: auto;
  }

  .image-preset-btn {
    flex: 0 0 auto;
    justify-content: center;
  }

  .chat-upload-btn {
    width: 40px;
    height: 40px;
    border-radius: 13px;
  }

  .chat-textarea {
    min-height: 96px;
    max-height: 116px;
    padding: 14px 50px 40px 50px;
  }

  .chat-input-wrapper.image-mode .chat-textarea {
    min-height: 82px;
    max-height: 118px;
    padding: 40px 46px 30px 46px;
  }

  .chat-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 13px;
    right: 17px;
    bottom: 17px;
  }

  .composer-upload-btn {
    left: 17px;
    bottom: 17px;
  }

  .chat-input-wrapper.image-mode .composer-upload-btn {
    left: 14px;
    bottom: 14px;
  }

  .chat-upload-menu {
    left: 9px;
    right: 9px;
    width: auto;
    bottom: 66px;
  }

  .chat-input-wrapper.image-mode .chat-upload-menu {
    left: 8px;
    right: auto;
    bottom: 52px;
    width: min(156px, calc(100vw - 40px));
  }

  .modal-tabs {
    gap: 6px;
  }

  .modal-tab {
    padding: 9px 6px;
    font-size: 12px;
  }

  .confirm-actions {
    flex-direction: column-reverse;
  }

  .confirm-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 375px) {
  main {
    padding-top: 80px;
  }

  .landing-section {
    padding-left: 10px;
    padding-right: 10px;
  }

  .nav-tab {
    min-height: 29px;
    padding: 6px 8px;
    font-size: 10px;
  }

  .message-content {
    max-width: calc(100% - 36px);
  }

  .mobile-panel-fab {
    left: 8px;
    top: calc(var(--header-offset, var(--header-height)) + 12px);
    bottom: auto;
    width: 40px;
    height: 40px;
  }

  h1 {
    font-size: 42px;
  }

  .empty-icon {
    width: 64px;
    height: 64px;
    font-size: 28px;
    margin-bottom: 18px;
  }

  .empty-title {
    font-size: 22px;
  }

  .chat-input-container {
    padding-left: 8px;
    padding-right: 8px;
  }

  .chat-textarea {
    min-height: 88px;
    max-height: 104px;
    padding: 13px 47px 38px 47px;
  }

  .chat-input-wrapper.image-mode .chat-textarea {
    min-height: 76px;
    max-height: 108px;
    padding: 38px 44px 28px 44px;
  }

  .composer-upload-btn {
    left: 15px;
    bottom: 15px;
  }

  .chat-input-wrapper.image-mode .composer-upload-btn {
    left: 13px;
    bottom: 13px;
  }

  .chat-send-btn {
    right: 15px;
    bottom: 15px;
  }

  .chat-input-wrapper.image-mode .chat-send-btn {
    right: 13px;
    bottom: 13px;
  }

  .image-edit-preview,
  .image-edit-guidance {
    margin-left: 8px;
    margin-right: 8px;
  }
}

/* ========== MODEL TABS ========== */
.model-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 40px;
  padding: 10px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(14, 18, 27, 0.54);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
  backdrop-filter: blur(12px);
  flex-wrap: wrap;
}

.model-tab-btn {
  min-height: 40px;
  padding: 0 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.11) 0%, rgba(255, 255, 255, 0.06) 100%);
  border: 1px solid rgba(255,255,255,0.24);
  border-radius: 999px;
  color: rgba(236, 242, 250, 0.84);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.model-tab-btn:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.08) 100%);
  color: #ffffff;
  border-color: rgba(255,255,255,0.36);
  transform: translateY(-1px);
}

.model-tab-btn.active {
  background: linear-gradient(135deg, rgba(35, 214, 198, 0.24) 0%, rgba(86, 138, 255, 0.2) 100%);
  border-color: rgba(35, 214, 198, 0.52);
  color: #f7fbff;
  box-shadow: 0 14px 28px rgba(18, 44, 62, 0.26), inset 0 1px 0 rgba(255,255,255,0.08);
}

/* ========== MODEL DETAILS ========== */
.model-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.model-detail-card {
  display: none;
  background: rgba(18, 18, 26, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.model-detail-card.active {
  display: block;
}

.detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.detail-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.detail-icon-img {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  object-fit: cover;
}

.detail-info h3 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 600;
}

.detail-info .plan-badge {
  margin-left: 8px;
}

.detail-desc {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 24px;
}

.detail-specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
}

.spec-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.spec-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.spec-value {
  font-size: 13px;
  font-weight: 500;
}

.detail-features {
  margin-bottom: 24px;
}

.detail-features h4 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.detail-features ul {
  list-style: none;
}

.detail-features li {
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.detail-features li:last-child {
  border-bottom: none;
}

.detail-features li.plan-required {
  color: #f5a623;
}

/* ========== EXAMPLES ========== */
.examples-categories {
  display: flex;
  justify-content: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 32px;
  flex-wrap: wrap;
  padding: 10px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(14, 18, 27, 0.54);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
  backdrop-filter: blur(12px);
}

.category-btn {
  min-height: 38px;
  padding: 0 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.11) 0%, rgba(255, 255, 255, 0.06) 100%);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(236, 242, 250, 0.84);
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.category-btn:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.08) 100%);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.36);
  transform: translateY(-1px);
}

.category-btn.active {
  background: linear-gradient(135deg, rgba(35, 214, 198, 0.24) 0%, rgba(86, 138, 255, 0.2) 100%);
  border-color: rgba(35, 214, 198, 0.52);
  color: #f7fbff;
  box-shadow: 0 14px 28px rgba(18, 44, 62, 0.26), inset 0 1px 0 rgba(255,255,255,0.08);
}

.example-card.hidden {
  display: none;
}

.example-result {
  font-size: 13px;
  line-height: 1.65;
  color: rgba(205, 215, 230, 0.76);
}

.example-cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(237, 244, 255, 0.82);
}

.example-card:hover .example-cta {
  border-color: rgba(35, 214, 198, 0.24);
  color: #f7fbff;
}

/* ========== PRICING TOGGLE ========== */
.pricing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 40px;
}

.toggle-label {
  font-size: 14px;
  color: var(--text-secondary);
}

.toggle-save {
  color: var(--accent);
  font-weight: 600;
  font-size: 12px;
}

.switch {
  position: relative;
  width: 52px;
  height: 28px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--border);
  border-radius: 28px;
  transition: 0.3s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}

input:checked + .slider {
  background: var(--accent);
}

input:checked + .slider:before {
  transform: translateX(24px);
}

.pricing-desc {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 24px;
}

.price-amount {
  font-size: 36px;
  font-weight: 700;
}

.price-period {
  font-size: 14px;
  color: var(--text-muted);
}

.pricing-feature.disabled {
  opacity: 0.4;
}

.pricing-feature.disabled svg {
  color: var(--text-muted);
}

@media (max-width: 1180px) {
  .pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 820px;
  }
}

/* ========== FAQ ========== */
.pricing-faq {
  max-width: 800px;
  margin: 60px auto 0;
}

.pricing-faq h3 {
  text-align: center;
  font-size: 28px;
  margin-bottom: 32px;
}

.faq-grid {
  display: grid;
  gap: 16px;
}

.faq-item {
  padding: 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.faq-item h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}

.faq-item p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ========== AURORA BOREALIS & STARS BACKGROUND ========== */
.aurora-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.stars-layer {
  position: absolute;
  width: 100%;
  height: 100%;
  background: transparent;
}

.shooting-star {
  position: absolute;
  width: 5px;
  height: 5px;
  background: #fff;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 0 15px rgba(255, 255, 255, 1),
              0 0 30px rgba(255, 255, 255, 0.8),
              0 0 50px rgba(255, 255, 255, 0.4);
  transform: rotate(-45deg);
}

.shooting-star::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 100%;
  width: 0;
  height: 2px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.5), #fff);
  transform: translateY(-50%);
}

.shooting-star::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 100%;
  width: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.25));
  transform: translateY(-50%);
}

.shooting-star.active {
  animation: shootStar 0.9s linear forwards;
}

.shooting-star.active::before {
  animation: shootTail 0.9s linear forwards;
}

.shooting-star.active::after {
  animation: shootTailDim 0.9s linear forwards;
}

@keyframes shootStar {
  0% {
    opacity: 0;
    transform: rotate(-45deg) translateX(0);
  }
  8% {
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: rotate(-45deg) translateX(-500px);
  }
}

@keyframes shootTail {
  0% { width: 0; }
  15% { width: 120px; }
  85% { width: 120px; }
  100% { width: 0; }
}

@keyframes shootTailDim {
  0% { width: 0; }
  20% { width: 200px; }
  80% { width: 200px; }
  100% { width: 0; }
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: #fff;
  border-radius: 50%;
  opacity: 0.8;
  animation: twinkle 3s infinite;
  box-shadow: 0 0 4px 1px rgba(255,255,255,0.5);
}

.star.active { opacity: 1; }

@keyframes twinkle {
  0%, 100% { opacity: 0.2; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.2); }
}

.aurora-layer {
  position: absolute;
  width: 100%;
  height: 100%;
  filter: blur(60px);
  opacity: 0.5;
  transition: opacity 1s ease;
}

.aurora-layer.active { opacity: 1; }

.aurora-wave {
  position: absolute;
  width: 200%;
  height: 450px;
  border-radius: 50%;
  animation: auroraWave 7s ease-in-out infinite;
}

.aurora-wave:nth-child(1) {
  top: 15%;
  left: -50%;
  background: linear-gradient(90deg, transparent 0%, rgba(0, 212, 170, 0.5) 30%, rgba(0, 255, 200, 0.6) 50%, rgba(0, 212, 170, 0.5) 70%, transparent 100%);
  animation-delay: 0s;
}

.aurora-wave:nth-child(2) {
  top: 30%;
  left: -50%;
  background: linear-gradient(90deg, transparent 0%, rgba(0, 168, 255, 0.4) 30%, rgba(100, 200, 255, 0.5) 50%, rgba(0, 168, 255, 0.4) 70%, transparent 100%);
  animation-delay: -2s;
}

.aurora-wave:nth-child(3) {
  top: 20%;
  left: -50%;
  background: linear-gradient(90deg, transparent 0%, rgba(138, 43, 226, 0.35) 30%, rgba(180, 100, 255, 0.5) 50%, rgba(138, 43, 226, 0.35) 70%, transparent 100%);
  animation-delay: -4s;
}

@keyframes auroraWave {
  0%, 100% { transform: translateX(-20%) scaleY(1); }
  50% { transform: translateX(20%) scaleY(1.3); }
}

/* Plan upgrade animation containers */
.plan-upgrade-effect {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

.plan-upgrade-effect.free {
  opacity: 0;
}

.plan-upgrade-effect.pro {
  opacity: 1;
}

.plan-upgrade-effect.pro .aurora-layer {
  opacity: 0.6;
}

.plan-upgrade-effect.pro .aurora-wave:nth-child(1) {
  background: linear-gradient(90deg, transparent 0%, rgba(0, 212, 170, 0.5) 50%, transparent 100%);
}

.plan-upgrade-effect.pro .aurora-wave:nth-child(2) {
  background: linear-gradient(90deg, transparent 0%, rgba(0, 168, 255, 0.4) 50%, transparent 100%);
}

.plan-upgrade-effect.pro .star {
  animation-duration: 2s;
}

.plan-upgrade-effect.pro .shooting-star {
  display: block;
  animation-delay: 0.5s;
}

.plan-upgrade-effect.enterprise {
  opacity: 1;
}

.plan-upgrade-effect.enterprise .aurora-layer {
  opacity: 1;
  filter: blur(40px);
}

.plan-upgrade-effect.enterprise .aurora-wave {
  height: 500px;
}

.plan-upgrade-effect.enterprise .aurora-wave:nth-child(1) {
  background: linear-gradient(90deg, transparent 0%, rgba(0, 212, 170, 0.7) 50%, transparent 100%);
}

.plan-upgrade-effect.enterprise .aurora-wave:nth-child(2) {
  background: linear-gradient(90deg, transparent 0%, rgba(0, 168, 255, 0.6) 50%, transparent 100%);
}

.plan-upgrade-effect.enterprise .aurora-wave:nth-child(3) {
  background: linear-gradient(90deg, transparent 0%, rgba(138, 43, 226, 0.5) 50%, transparent 100%);
  top: 30%;
}

.plan-upgrade-effect.enterprise .star {
  animation-duration: 1.5s;
}

.plan-upgrade-effect.enterprise .shooting-star {
  display: block;
  animation-delay: 0.2s, 1s, 2s;
}

.plan-upgrade-effect.enterprise .shooting-star:nth-child(2) {
  animation-delay: 0.8s;
}

.plan-upgrade-effect.enterprise .shooting-star:nth-child(3) {
  animation-delay: 1.5s;
}

.celebration-particle {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  pointer-events: none;
}

@keyframes celebrationBurst {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; }
}

/* Upgrade celebration overlay */
.upgrade-celebration {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10000;
}

.upgrade-celebration.active .celebration-particle {
  animation: celebrationBurst 2s ease-out forwards;
}

.hidden { display: none !important; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button:disabled,
input:disabled,
textarea:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.history-item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toast {
  max-width: min(420px, calc(100vw - 32px));
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 1080px) {
  .strategic-grid,
  .legal-grid,
  .contact-grid,
  .support-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .process-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .custom-solution-card {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .strategic-grid,
  .legal-grid,
  .contact-grid,
  .support-steps,
  .process-steps {
    grid-template-columns: 1fr;
  }

  .custom-solution-card {
    padding: 22px 20px;
    border-radius: 22px;
  }

  .diagnostic-form {
    padding: 20px;
    border-radius: 22px;
  }

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

  .section-cta-row {
    justify-content: stretch;
  }

  .section-cta-row .btn {
    width: 100%;
    justify-content: center;
  }

  .diagnostic-actions .btn {
    width: 100%;
    justify-content: center;
  }
}
