html {
  scroll-behavior: smooth;
}

:root {
  --bg: #0b0f14;
  --bg-elevated: #141a22;
  --bg-card: rgba(20,26,34,0.95);
  --ink: #eaf2ff;
  --ink-soft: #a9b8d6;
  --accent: #3da9ff;
  --accent2: #7ef1c6;
  --muted: #7a8aa6;
  --radius: 16px;
  --shadow: 0 16px 32px rgba(0,0,0,.35);
  --border-color: rgba(125,173,255,.18);
  --border-color-hover: rgba(125,173,255,.35);
  --card-bg: rgba(20,26,34,0.95);
  --input-bg: rgba(255,255,255,.05);
  --overlay-bg: rgba(11,15,20,0.75);
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.25rem;
  --space-xl: 1.75rem;
  --section-gap: clamp(1rem, 4vw, 2rem);
  --card-padding: clamp(1rem, 3vw, 1.75rem);
}

/* Light Theme Variables */
[data-theme="light"] {
  --bg: #f5f7fa;
  --bg-elevated: #ffffff;
  --bg-card: rgba(255,255,255,0.95);
  --ink: #1a2332;
  --ink-soft: #4a5568;
  --accent: #2563eb;
  --accent2: #059669;
  --muted: #64748b;
  
  --border-color: rgba(100,116,139,.15);
  --border-color-hover: rgba(100,116,139,.3);
  --card-bg: rgba(255,255,255,.95);
  --input-bg: rgba(255,255,255,.95);
  --overlay-bg: rgba(0,0,0,0.5);
  
  --shadow: 0 16px 32px rgba(0,0,0,.08);
}

/* Light Theme Specific Overrides */
[data-theme="light"] .hero {
  background: rgba(255,255,255,0.9);
}

[data-theme="light"] main::before {
  background: rgba(245,247,250,0.6);
}

[data-theme="light"] .btn.primary {
  color: #ffffff;
}

[data-theme="light"] footer {
  background: rgba(255,255,255,.5);
  border-top: 1px solid var(--border-color);
}

[data-theme="light"] .craig-output {
  background: rgba(100,116,139,.05);
  border: 1px solid var(--border-color);
}

[data-theme="light"] .benefit-card {
  background: rgba(100,116,139,.03);
  border: 1px solid var(--border-color);
}

[data-theme="light"] .thread-item {
  background: rgba(100,116,139,.04);
  border: 1px solid rgba(100,116,139,.2);
}

[data-theme="light"] .thread-item.expanded {
  background: rgba(100,116,139,.08);
  border-color: rgba(37, 99, 235, 0.4);
}

[data-theme="light"] .thread-vehicle-info {
  background: rgba(5, 150, 105, 0.06);
  border-bottom: 1px solid rgba(5, 150, 105, 0.15);
}

[data-theme="light"] .thread-vehicle-info span {
  color: var(--ink-soft);
}

[data-theme="light"] .thread-vehicle-info strong {
  color: var(--accent2);
}

[data-theme="light"] .account-overview__status-bar {
  background: rgba(100,116,139,.03);
  border: 1px solid var(--border-color);
}

[data-theme="light"] .status-bar__subscription {
  background: rgba(5, 150, 105, 0.06);
  border-color: rgba(5, 150, 105, 0.15);
}

[data-theme="light"] .shop-profile-collapsible {
  border-color: rgba(37, 99, 235, 0.15);
}

[data-theme="light"] .shop-profile-toggle {
  background: rgba(37, 99, 235, 0.03);
}

[data-theme="light"] .account-overview__upload-hero {
  background: rgba(5, 150, 105, 0.03);
  border-color: rgba(5, 150, 105, 0.15);
  box-shadow: 0 4px 16px rgba(0,0,0,.05);
}

[data-theme="light"] .upload-dropzone {
  border-color: rgba(5, 150, 105, 0.25);
}

[data-theme="light"] .upload-dropzone:hover,
[data-theme="light"] .upload-dropzone--active {
  border-color: var(--accent2);
  background: rgba(5, 150, 105, 0.04);
}

[data-theme="light"] .trends-collapsible {
  border-color: var(--border-color);
}

[data-theme="light"] .trends-collapsible__toggle {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.04), rgba(5, 150, 105, 0.03));
}

[data-theme="light"] .reanalyze-banner {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.04), rgba(5, 150, 105, 0.03));
  border-color: rgba(37, 99, 235, 0.12);
}

[data-theme="light"] .auth-submit-file-list li {
  background: rgba(100,116,139,.03);
  border: 1px solid var(--border-color);
}

[data-theme="light"] .progress-bar-container {
  background: rgba(100,116,139,.1);
}

[data-theme="light"] .benefits-section {
  background: radial-gradient(120% 120% at 50% 0%, rgba(37, 99, 235, 0.08) 0%, rgba(245, 247, 250, 0.95) 45%, rgba(255, 255, 255, 0.98) 100%);
  border: 2px solid rgba(37, 99, 235, 0.2);
  box-shadow: 0 16px 40px rgba(0,0,0,.06), 0 0 0 1px rgba(37, 99, 235, 0.05) inset;
}

[data-theme="light"] .benefits-section::before {
  background: radial-gradient(80% 80% at 20% 20%, rgba(5, 150, 105, 0.1) 0%, transparent 60%);
}

[data-theme="light"] .nav-link:hover {
  background: rgba(37, 99, 235, 0.08);
}

[data-theme="light"] #logoutBtn,
[data-theme="light"] .signup-btn {
  border: 1px solid var(--border-color-hover);
  background: rgba(37, 99, 235, 0.05);
}

[data-theme="light"] #logoutBtn:hover,
[data-theme="light"] .signup-btn:hover {
  background: rgba(37, 99, 235, 0.12);
}

[data-theme="light"] .btn.ghost {
  border: 1px solid var(--border-color-hover);
}

[data-theme="light"] .craig-upload {
  border: 2px dashed var(--border-color-hover);
}

[data-theme="light"] .auth-toggle:hover {
  background: rgba(100,116,139,.05);
}

[data-theme="light"] #authClose:hover {
  background: rgba(100,116,139,.1);
}

/* Theme Toggle Button */
.theme-toggle {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 2px solid var(--border-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  z-index: 1000;
}

.theme-toggle:hover {
  border-color: var(--accent);
  transform: scale(1.1) rotate(15deg);
}

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

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header {
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--card-bg);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 999;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.brand-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.brand-link:hover {
  opacity: 0.85;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: contain;
  box-shadow: var(--shadow);
}

.brand h1,
.brand .brand-name {
  font-size: 1.25rem;
  letter-spacing: .3px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.nav-link:hover {
  color: var(--accent);
  background: rgba(61, 169, 255, 0.1);
}

.nav-link-btn {
  border: 1px solid rgba(125,173,255,.25);
}

.nav-link-btn:hover {
  border-color: rgba(125,173,255,.45);
}

.links {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
}

.links-center {
  justify-content: center;
}

.auth-status {
  display: flex;
  align-items: center;
}

#authStatus {
  display: none;
}

#userEmail {
  color: var(--ink-soft);
  margin-right: 0.75rem;
  font-size: 0.9rem;
}

.btn {
  text-decoration: none;
  font-weight: 700;
  padding: .6rem 1rem;
  border-radius: 12px;
  transition: all .15s ease;
  display: inline-block;
}

button.btn {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
}

.btn.primary {
  background: var(--accent);
  color: #08131c;
  box-shadow: var(--shadow);
}

.btn.primary[aria-disabled="true"] {
  background: rgba(125,173,255,.2);
  color: rgba(8,19,28,.5);
  box-shadow: none;
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.5;
}

.btn.ghost {
  background: rgba(125,173,255,.1);
  border: 1px solid rgba(125,173,255,.5);
  color: var(--ink);
}

button.btn.ghost {
  background: rgba(125,173,255,.1);
}

.btn.ghost:hover {
  background: rgba(125,173,255,.15);
  border-color: rgba(125,173,255,.65);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn[aria-disabled="true"]:hover {
  transform: none;
}

.btn-compact {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

#logoutBtn,
.signup-btn {
  border: 1px solid rgba(125,173,255,.6);
  background: rgba(125,173,255,.08);
}

.signup-btn {
  margin-left: 0.75rem;
}

#logoutBtn:hover,
.signup-btn:hover {
  border-color: var(--accent);
  background: rgba(61, 169, 255, 0.15);
}

main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: url("../background.png") center/cover no-repeat;
  padding: clamp(1rem, 3vw, 2rem);
}

.page-section {
  margin: var(--section-gap) auto;
}

main::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(10,15,20,0.6);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.hero {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: clamp(1rem, 3vw, 1.75rem);
  background: rgba(15,20,25,0.6);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1.25rem, 3vw, 2rem);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.hero.hero-split {
  flex-direction: row;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3rem);
  text-align: left;
}

.hero-text {
  flex: 1 1 55%;
  min-width: 0;
}

.hero-text p {
  margin-bottom: 0.75rem;
}

.hero-cta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

.hero-note {
  font-size: 0.85rem !important;
  color: var(--ink-soft) !important;
  margin-top: 0.5rem !important;
}

.hero-image {
  flex: 1 1 40%;
  min-width: 0;
}

.hero-image img {
  width: 100%;
  border-radius: calc(var(--radius) - 4px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  display: block;
}

.hero p {
  margin-bottom: 0;
}

.tag {
  display: inline-block;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #061019;
  padding: clamp(0.6rem, 1.5vw, 0.9rem) clamp(1.25rem, 3vw, 2rem);
  border-radius: 999px;
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: 0.5px;
  box-shadow: 0 8px 24px rgba(61, 169, 255, 0.4);
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.25;
  margin-bottom: 1rem;
}

p {
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 1rem;
}

strong { color: var(--accent2); }

footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
  border-top: 1px solid rgba(125,173,255,.18);
  background: rgba(0,0,0,.25);
}

footer a {
  color: var(--ink-soft);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

footer .privacy-link {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  display: block;
}

footer .privacy-link a {
  color: var(--ink-soft);
  text-decoration: none;
}

footer .privacy-link a:hover {
  text-decoration: underline;
}

/* Privacy Policy Page Styles */
.privacy-hero {
  max-width: 900px;
  text-align: left;
}

.privacy-section {
  margin-bottom: 2.5rem;
}

.privacy-section h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--ink);
}

.privacy-section h4 {
  font-size: 1.2rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--accent);
}

.privacy-section ul {
  margin-left: 1.5rem;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  color: var(--ink-soft);
}

.privacy-section ul li {
  margin-bottom: 0.5rem;
}

.privacy-meta {
  color: var(--ink-soft);
  margin-bottom: 2rem;
}

.privacy-section p {
  margin-bottom: 1rem;
}

.privacy-section a {
  color: var(--accent);
  text-decoration: none;
}

.privacy-section a:hover {
  text-decoration: underline;
}

/* CRAIG embed panel */
.craig-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  margin: var(--section-gap) auto;
  padding: var(--card-padding);
  max-width: 1100px;
  box-shadow: var(--shadow);
}
.craig-panel__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}
.try-me-badge {
  position: absolute;
  top: 0;
  left: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #08131c;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  border-radius: 0 0 12px 0;
  box-shadow: 0 4px 12px rgba(61, 169, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  animation: pulse 2s ease-in-out infinite;
  z-index: 10;
}
@keyframes pulse {
  0%, 100% { 
    box-shadow: 0 4px 12px rgba(61, 169, 255, 0.4);
    transform: scale(1);
  }
  50% { 
    box-shadow: 0 4px 20px rgba(61, 169, 255, 0.7);
    transform: scale(1.05);
  }
}
.craig-panel__header {
  padding-top: 1.25rem;
  text-align: center;
}
.craig-panel__header p { color: var(--ink-soft); }
.craig-upload {
  border: 2px dashed rgba(125,173,255,.35);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  margin-top: 1rem;
}
.craig-file-list { list-style: none; margin-top: .75rem; }
.craig-hint {
  margin-left: .5rem;
  color: var(--ink-soft);
}
.craig-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-top: 1rem;
  justify-content: flex-start;
  flex-wrap: wrap;
}
.craig-output {
  margin-top: 1rem;
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(125,173,255,.2);
  border-radius: 12px;
  padding: 1rem;
  min-height: 80px;
  text-align: left;
  white-space: pre-wrap;
}
.craig-output { 
  max-width: 100%;
  overflow-wrap: anywhere; /* break long unbroken strings */
  word-break: break-word;
}
.craig-output-button-container {
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
}
.craig-output pre,
.craig-output code {
  white-space: pre-wrap; /* wrap lines inside pre/code blocks */
  word-break: break-word;
}
.status { font-size: .9rem; color: var(--ink-soft); }
.craig-input-group {
  margin-top: 1rem;
}
.craig-input-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--ink);
}
.required-indicator {
  color: var(--accent);
}
.craig-input-group textarea {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
  min-height: 80px;
}
.craig-input-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.craig-input-group textarea::placeholder {
  color: var(--ink-soft);
}
.craig-input-group input[type="email"] {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.95rem;
}
.craig-input-group input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
}
.craig-input-group input[type="email"]::placeholder {
  color: var(--ink-soft);
}
.craig-input-group input[type="email"]:invalid {
  border-color: rgba(255, 100, 100, 0.5);
}
/* Hide content for authenticated users */
.authenticated-user-hidden {
  display: none !important;
}
/* Hide email field for authenticated users */
.craig-input-group.authenticated-user-hidden {
  display: none !important;
}
/* Loading animation */
.craig-loading {
  display: none;
  margin-top: 1rem;
  padding: 2rem;
  text-align: center;
}
.craig-loading.active {
  display: block;
}
.loading-spinner {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  position: relative;
}
.spinner-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 4px solid transparent;
  border-top-color: var(--accent);
  border-right-color: var(--accent2);
  border-radius: 50%;
  animation: spin 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}
.spinner-ring:nth-child(2) {
  border-top-color: var(--accent2);
  border-right-color: var(--accent);
  animation-duration: 2s;
  animation-direction: reverse;
  width: 60px;
  height: 60px;
  top: 10px;
  left: 10px;
}
.spinner-ring:nth-child(3) {
  border-top-color: rgba(125,173,255,.5);
  border-right-color: rgba(126,241,198,.5);
  animation-duration: 2.5s;
  width: 40px;
  height: 40px;
  top: 20px;
  left: 20px;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.loading-timer {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 1rem;
  font-variant-numeric: tabular-nums;
}
.loading-message {
  font-size: 1.1rem;
  color: var(--ink);
  min-height: 2.5rem;
  margin-bottom: 0.5rem;
  animation: fadeIn 0.5s ease-in;
}
.loading-submessage {
  font-size: 0.9rem;
  color: var(--ink-soft);
  font-style: italic;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideUpFadeOut {
  0% { 
    opacity: 1; 
    transform: translateY(0);
    max-height: 1000px;
  }
  100% { 
    opacity: 0; 
    transform: translateY(-30px);
    max-height: 0;
  }
}
.progress-bar-container {
  width: 100%;
  max-width: 400px;
  height: 6px;
  background: rgba(255,255,255,.1);
  border-radius: 999px;
  margin: 1.5rem auto 0;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 999px;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px var(--accent);
}
/* Hide animation for form elements */
.craig-upload.hiding,
.craig-input-group.hiding,
.craig-actions.hiding {
  animation: slideUpFadeOut 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  overflow: hidden;
}
.hidden,
.craig-upload.hidden,
.craig-input-group.hidden,
.craig-actions.hidden {
  display: none !important;
}
/* Chrome Extension Promo Section */
.extension-promo {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  max-width: 1100px;
  box-shadow: var(--shadow);
}
.extension-promo-alt {
  background: var(--bg-elevated);
}
.extension-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}
.extension-text h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 1rem;
  color: var(--ink);
}
.extension-text p {
  font-size: 1.05rem;
  color: var(--ink-soft);
  margin-bottom: 0.75rem;
  line-height: 1.6;
}
.extension-text ul {
  list-style: none;
  margin: 1rem 0;
  padding: 0;
}
.extension-text ul li {
  padding: 0.35rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--ink);
}
.extension-text ul li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent2);
  font-weight: bold;
}
.extension-image {
  text-align: right;
}
.extension-image img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,.4);
  border: 1px solid rgba(125,173,255,.2);
  margin-bottom: var(--space-md);
}
@media (max-width: 768px) {
  .extension-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .extension-image {
    text-align: center;
  }
}
/* Benefits Section */
.benefits-section {
  margin: clamp(3rem, 6vw, 4.5rem) auto clamp(1.5rem, 3vw, 2rem);
  padding: clamp(2rem, 4vw, 2.75rem) clamp(1.25rem, 3vw, 1.75rem);
  max-width: 1200px;
  width: 100%;
  background: radial-gradient(120% 120% at 50% 0%, rgba(61, 169, 255, 0.15) 0%, rgba(12, 18, 26, 0.9) 45%, rgba(8, 13, 20, 0.95) 100%);
  border: 2px solid rgba(125,173,255,.35);
  border-radius: 24px;
  box-shadow: 0 16px 40px rgba(0,0,0,.35), 0 0 0 1px rgba(61, 169, 255, 0.1) inset;
  position: relative;
  overflow: hidden;
}
.benefits-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(80% 80% at 20% 20%, rgba(126, 241, 198, 0.2) 0%, transparent 60%);
  opacity: 0.75;
  pointer-events: none;
}
.benefits-inner {
  position: relative;
  z-index: 1;
  max-width: 1040px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}
.benefits-inner h2 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: var(--space-sm);
}
.benefits-intro {
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 720px;
  margin: 0 auto var(--space-lg);
}
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-lg);
}
.benefit-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(125,173,255,.18);
  border-radius: 18px;
  padding: clamp(1.25rem, 3vw, 1.5rem);
  text-align: left;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.benefit-card:hover {
  transform: translateY(-6px);
  border-color: rgba(61, 169, 255, 0.45);
  box-shadow: 0 18px 42px rgba(0,0,0,.35);
}
.benefit-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  font-size: 1.75rem;
  background: rgba(61, 169, 255, 0.12);
  border: 1px solid rgba(61, 169, 255, 0.35);
  border-radius: 14px;
}
.benefit-card h3 {
  font-size: 1.15rem;
  color: var(--ink);
  letter-spacing: 0.3px;
}
.benefit-card p {
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0;
}
.benefits-cta {
  margin-top: var(--space-xl);
  padding: clamp(1.25rem, 3vw, 2rem) clamp(1.25rem, 3vw, 1.75rem);
  border-radius: 18px;
  border: 1px solid rgba(126, 241, 198, 0.35);
  background: linear-gradient(135deg, rgba(126, 241, 198, 0.15), rgba(61, 169, 255, 0.15));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  text-align: center;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
}
.benefits-cta__text {
  width: 100%;
  text-align: center;
}
.benefits-cta__text h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 0.5rem;
  color: var(--ink);
}
.benefits-cta__text p {
  margin: 0.5rem 0;
  color: var(--ink);
  font-size: 1rem;
}
.benefits-cta__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}
.benefits-cta__actions .btn {
  min-width: 160px;
  text-align: center;
}
.benefits-cta__note {
  width: 100%;
  margin-top: var(--space-sm);
  font-size: 0.85rem;
  color: rgba(234, 242, 255, 0.7);
  text-align: center;
}

/* Community CTA Section */
.community-cta {
  margin-top: var(--space-xl);
  padding: clamp(1.5rem, 3vw, 2rem);
  border-radius: 18px;
  border: 1px solid rgba(255, 159, 64, 0.4);
  background: linear-gradient(135deg, rgba(255, 159, 64, 0.18), rgba(255, 193, 7, 0.15), rgba(126, 241, 198, 0.15));
  box-shadow: 0 12px 36px rgba(255, 159, 64, 0.25);
  position: relative;
  overflow: hidden;
}

.community-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 70% at 30% 30%, rgba(255, 193, 7, 0.15) 0%, transparent 70%);
  opacity: 0.6;
  pointer-events: none;
}

.community-cta__content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
}

.community-cta__text {
  text-align: left;
}

.community-cta__text h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 1rem;
  color: var(--ink);
  line-height: 1.3;
}

.community-cta__text p {
  margin: 0.5rem 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.7;
}

.community-cta__actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-top: var(--space-lg);
}

.community-cta__actions .btn {
  min-width: 160px;
  text-align: center;
}

.community-cta__image {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.community-cta__image img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(126, 241, 198, 0.3);
  margin-bottom: 1rem;
}

.community-cta__image-caption {
  font-size: 0.9rem;
  color: var(--ink-soft);
  font-style: italic;
  margin: 0;
  text-align: center;
  line-height: 1.5;
}

/* Light Theme Override for Community CTA */
[data-theme="light"] .community-cta {
  border-color: rgba(245, 158, 11, 0.35);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(251, 146, 60, 0.12), rgba(5, 150, 105, 0.12));
  box-shadow: 0 12px 36px rgba(245, 158, 11, 0.15);
}

[data-theme="light"] .community-cta::before {
  background: radial-gradient(70% 70% at 30% 30%, rgba(251, 191, 36, 0.12) 0%, transparent 70%);
}

[data-theme="light"] .community-cta__image img {
  border-color: rgba(5, 150, 105, 0.25);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

/* Responsive Design for Community CTA */
@media (max-width: 1024px) {
  .community-cta__content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .community-cta__text {
    text-align: center;
  }
  
  .community-cta__actions {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .community-cta {
    padding: 2rem 1.5rem;
    margin-top: 2.5rem;
  }
  
  .community-cta__text h3 {
    font-size: 1.5rem;
  }
  
  .community-cta__actions {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 540px) {
  .community-cta {
    padding: 1.75rem 1.25rem;
  }
  
  .community-cta__actions {
    flex-direction: column;
    width: 100%;
  }
  
  .community-cta__actions .btn {
    width: 100%;
  }
  
  .community-cta__image img {
    max-width: 100%;
  }
}

/* ===================================
   Leaderboard Promo Section (Index Page)
   =================================== */

.leaderboard-promo-section {
  margin: clamp(3rem, 6vw, 4.5rem) auto clamp(1.5rem, 3vw, 2rem);
  padding: clamp(2rem, 4vw, 2.75rem) clamp(1.25rem, 3vw, 1.75rem);
  max-width: 1200px;
  width: 100%;
  background: radial-gradient(120% 120% at 50% 0%, rgba(126, 241, 198, 0.15) 0%, rgba(12, 18, 26, 0.9) 45%, rgba(8, 13, 20, 0.95) 100%);
  border: 2px solid rgba(126, 241, 198, 0.35);
  border-radius: 24px;
  box-shadow: 0 16px 40px rgba(0,0,0,.35), 0 0 0 1px rgba(126, 241, 198, 0.1) inset;
  position: relative;
  overflow: hidden;
}

.leaderboard-promo-section::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: radial-gradient(80% 80% at 20% 20%, rgba(61, 169, 255, 0.2) 0%, transparent 60%);
  opacity: 0.75;
  pointer-events: none;
}

.leaderboard-promo-inner {
  position: relative;
  z-index: 1;
  max-width: 1040px;
  margin: 0 auto;
}

.leaderboard-promo-header {
  text-align: center;
  margin-bottom: 3rem;
}

.leaderboard-promo-badge {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.25), rgba(255, 159, 64, 0.25));
  border: 1px solid rgba(255, 193, 7, 0.4);
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255, 193, 7, 1);
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.leaderboard-promo-header h2 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 1rem;
  color: var(--ink);
}

.leaderboard-promo-intro {
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.7;
}

.leaderboard-promo-content {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.leaderboard-promo-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  padding: 2rem;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(125,173,255,.18);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.leaderboard-promo-feature:hover {
  transform: translateY(-4px);
  border-color: rgba(126, 241, 198, 0.4);
  box-shadow: 0 18px 42px rgba(0,0,0,.35);
}

.leaderboard-promo-feature.reverse {
  direction: rtl;
}

.leaderboard-promo-feature.reverse > * {
  direction: ltr;
}

.leaderboard-promo-image {
  width: 100%;
}

.leaderboard-promo-image img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(126, 241, 198, 0.3);
  transition: transform 0.3s ease;
}

.leaderboard-promo-feature:hover .leaderboard-promo-image img {
  transform: scale(1.02);
}

.leaderboard-promo-text {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.leaderboard-promo-text h3 {
  font-size: 1.5rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.leaderboard-promo-text p {
  font-size: 1rem;
  color: var(--ink-soft);
  line-height: 1.7;
  margin: 0;
}

.leaderboard-promo-benefits {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.leaderboard-promo-benefits li {
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.6;
  padding-left: 1.5rem;
  position: relative;
}

.leaderboard-promo-benefits li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent2);
  font-weight: bold;
  font-size: 1.1rem;
}

.leaderboard-promo-benefits li strong {
  color: var(--accent2);
  font-weight: 600;
}

.leaderboard-promo-cta {
  margin-top: 2rem;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border-radius: 18px;
  border: 1px solid rgba(255, 193, 7, 0.4);
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.18), rgba(255, 159, 64, 0.15), rgba(126, 241, 198, 0.15));
  box-shadow: 0 12px 36px rgba(255, 193, 7, 0.25);
  position: relative;
  overflow: hidden;
}

.leaderboard-promo-cta::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: radial-gradient(70% 70% at 30% 30%, rgba(255, 193, 7, 0.15) 0%, transparent 70%);
  opacity: 0.6;
  pointer-events: none;
}

.leaderboard-promo-cta-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.leaderboard-promo-cta-content h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 1rem;
  color: var(--ink);
}

.leaderboard-promo-cta-content p {
  font-size: 1rem;
  color: var(--ink);
  margin: 0.5rem 0 1.5rem;
  line-height: 1.7;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.leaderboard-promo-cta-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.leaderboard-promo-cta-buttons .btn {
  min-width: 180px;
  text-align: center;
}

.leaderboard-promo-cta-note {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: rgba(234, 242, 255, 0.7);
  font-style: italic;
}

/* Light Theme Override for Leaderboard Promo */
[data-theme="light"] .leaderboard-promo-section {
  background: radial-gradient(120% 120% at 50% 0%, rgba(5, 150, 105, 0.12) 0%, rgba(245, 247, 250, 0.95) 45%, rgba(255, 255, 255, 0.98) 100%);
  border: 2px solid rgba(5, 150, 105, 0.3);
  box-shadow: 0 16px 40px rgba(0,0,0,.06), 0 0 0 1px rgba(5, 150, 105, 0.08) inset;
}

[data-theme="light"] .leaderboard-promo-section::before {
  background: radial-gradient(80% 80% at 20% 20%, rgba(37, 99, 235, 0.1) 0%, transparent 60%);
}

[data-theme="light"] .leaderboard-promo-badge {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(251, 146, 60, 0.2));
  border-color: rgba(245, 158, 11, 0.4);
  color: rgba(180, 83, 9, 1);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

[data-theme="light"] .leaderboard-promo-feature {
  background: rgba(100,116,139,.03);
  border: 1px solid var(--border-color);
}

[data-theme="light"] .leaderboard-promo-feature:hover {
  border-color: rgba(5, 150, 105, 0.4);
}

[data-theme="light"] .leaderboard-promo-image img {
  border-color: rgba(5, 150, 105, 0.25);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .leaderboard-promo-cta {
  border-color: rgba(245, 158, 11, 0.35);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(251, 146, 60, 0.12), rgba(5, 150, 105, 0.12));
  box-shadow: 0 12px 36px rgba(245, 158, 11, 0.15);
}

[data-theme="light"] .leaderboard-promo-cta::before {
  background: radial-gradient(70% 70% at 30% 30%, rgba(251, 191, 36, 0.12) 0%, transparent 70%);
}

/* Responsive Design for Leaderboard Promo */
@media (max-width: 1024px) {
  .leaderboard-promo-feature {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .leaderboard-promo-feature.reverse {
    direction: ltr;
  }
  
  .leaderboard-promo-text {
    text-align: center;
  }
}

@media (max-width: 768px) {
  .leaderboard-promo-section {
    padding: clamp(1.5rem, 6vw, 2.25rem) clamp(1rem, 4vw, 1.5rem);
  }
  
  .leaderboard-promo-header {
    margin-bottom: 2rem;
  }
  
  .leaderboard-promo-header h2 {
    font-size: 1.75rem;
  }
  
  .leaderboard-promo-content {
    gap: 2rem;
  }
  
  .leaderboard-promo-feature {
    padding: 1.5rem;
  }
  
  .leaderboard-promo-text h3 {
    font-size: 1.25rem;
  }
  
  .leaderboard-promo-cta {
    padding: 1.5rem;
  }
  
  .leaderboard-promo-cta-content h3 {
    font-size: 1.35rem;
  }
  
  .leaderboard-promo-cta-buttons {
    flex-direction: column;
    width: 100%;
  }
  
  .leaderboard-promo-cta-buttons .btn {
    width: 100%;
  }
}

/* Auth-related styles */
.extension-promo.authenticated-only {
  display: none; /* Hidden by default until authenticated */
}
.account-overview.authenticated-only {
  display: none;
}
#authContainer {
  display: none; /* Hidden by default, shown on demand */
}
.auth-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay-bg);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.auth-modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2.5rem;
  max-width: 400px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
  position: relative;
}
.auth-modal-header {
  text-align: center;
  margin-bottom: 2rem;
}
.auth-modal-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  display: block;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}
.auth-modal-header h2 {
  margin-bottom: 0.5rem;
}
.auth-modal-header p {
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.auth-form-group {
  margin-bottom: 1rem;
}
.auth-form-group:last-of-type {
  margin-bottom: 1.5rem;
}
.auth-form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--ink);
}
.auth-input {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.95rem;
  box-sizing: border-box;
}
.auth-input:focus {
  outline: none;
  border-color: var(--accent);
}
.auth-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.9rem;
  cursor: pointer;
  font-weight: normal;
}
.auth-checkbox {
  margin-top: 0.25rem;
  cursor: pointer;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.auth-checkbox-label a {
  color: var(--accent);
  text-decoration: underline;
}
.auth-checkbox-label a:hover {
  color: var(--accent2);
}
.auth-error {
  color: #ff6b6b;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  min-height: 1.2rem;
}
.auth-submit {
  width: 100%;
  background: var(--accent);
  color: #08131c;
  border: none;
  border-radius: 12px;
  padding: 0.75rem;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  margin-bottom: 0.75rem;
  transition: transform 0.15s ease;
}
.auth-submit:hover {
  transform: translateY(-1px);
}
.auth-toggle {
  width: 100%;
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid rgba(125,173,255,.35);
  border-radius: 12px;
  padding: 0.75rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}
.auth-toggle:hover {
  background: rgba(255,255,255,.05);
}
#authClose {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--ink-soft);
  font-size: 1.5rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background 0.2s ease;
}
#authClose:hover {
  background: rgba(255,255,255,.1);
}

/* Account Overview Section */
.account-overview {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  margin: 0 auto;
  padding: var(--card-padding);
  max-width: 1200px;
  box-shadow: var(--shadow);
}

.account-overview__inner h3 {
  margin-bottom: 1rem;
  font-size: 1.75rem;
}

.account-overview__credits {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.account-overview__credits span {
  color: var(--accent2);
  font-weight: 700;
  font-size: 1.25rem;
}

.account-overview__error {
  color: #ff6b6b;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  min-height: 1.2rem;
}

/* History Section */
.account-overview__history {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(125,173,255,.18);
}

.account-overview__history h4 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--ink);
}

.history-loading {
  text-align: center;
  padding: var(--space-lg);
  color: var(--ink-soft);
  font-style: italic;
}

.history-error {
  color: #ff6b6b;
  padding: 1rem;
  background: rgba(255, 107, 107, 0.1);
  border-radius: 8px;
  margin-bottom: 1rem;
  display: none;
}

.history-empty {
  text-align: center;
  padding: var(--space-lg);
  color: var(--ink-soft);
  font-style: italic;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* Thread Item */
.thread-item {
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(125,173,255,.2);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.thread-item:hover {
  border-color: rgba(125,173,255,.35);
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
}

.thread-item.expanded {
  background: rgba(255,255,255,.04);
  border-color: var(--accent);
}

.thread-item.expanded .thread-preview__submission,
.thread-item.expanded .thread-preview__response {
  display: none;
}

/* Thread Preview (Collapsed State) */
.thread-preview {
  padding: 1rem;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.thread-vehicle-info {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(126, 241, 198, 0.08);
  border-bottom: 1px solid rgba(126, 241, 198, 0.2);
  font-size: 0.85rem;
  margin: -1rem -1rem 0.75rem -1rem;
}

.thread-vehicle-info span {
  color: var(--ink-soft);
}

.thread-vehicle-info strong {
  color: var(--accent2);
  font-weight: 700;
  margin-right: 0.25rem;
}

.thread-preview__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.thread-preview__date {
  font-size: 0.9rem;
  color: var(--ink);
  font-weight: 700;
  opacity: 0.9;
}

.thread-preview__toggle {
  background: transparent;
  border: none;
  color: var(--accent);
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
  width: 24px;
  height: 24px;
  border-radius: 4px;
}

.thread-preview__toggle:hover {
  background: rgba(61, 169, 255, 0.1);
}

.thread-item.expanded .thread-preview__toggle {
  transform: rotate(180deg);
}

.thread-preview__submission {
  font-size: 0.9rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
  opacity: 0.9;
  font-style: italic;
  font-weight: 500;
}

.thread-preview__response {
  font-size: 0.95rem;
  color: var(--ink);
  line-height: 1.5;
  opacity: 0.85;
}

/* Thread Content (Expanded State) */
.thread-content {
  padding: 0.35rem 0.75rem 0.75rem;
  animation: slideDown 0.3s ease;
}

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

.thread-messages {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
  max-width: none;
  margin: 0;
}

/* Thread Message */
.thread-message {
  max-width: 100%;
  width: 100%;
  padding: 0.4rem 0.75rem;
  border-radius: 12px;
  position: relative;
}

.thread-message__label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
  opacity: 0.7;
}

.thread-message__text {
  font-size: 0.9rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.thread-message__text p,
.accordion-content-inner p,
.missed-operation-description p,
.overall-statement p,
.closing-statement p {
  margin-bottom: 0.5rem;
}

.thread-message__text p:last-child,
.accordion-content-inner p:last-child,
.missed-operation-description p:last-child,
.overall-statement p:last-child,
.closing-statement p:last-child {
  margin-bottom: 0;
}

/* Submission Message (Centered horizontal pill) */
.thread-message--submission {
  align-self: center;
  background: linear-gradient(135deg, rgba(61, 169, 255, 0.15), rgba(61, 169, 255, 0.08));
  border: 1px solid rgba(61, 169, 255, 0.3);
  max-width: min(680px, 90%);
  border-radius: 24px;
  padding: 0.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: flex-start;
}

.thread-message--submission .thread-message__label {
  color: var(--accent);
  font-size: 0.75rem;
  order: 0;
}

.thread-message--submission .thread-message__files {
  color: var(--ink-soft);
  font-size: 0.8rem;
  order: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.thread-message--submission .thread-message__file-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.thread-message--submission .thread-message__file-item svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.thread-message--submission .thread-message__text {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 500;
  order: 2;
}

.thread-message--submission .thread-message__attachment {
  color: var(--ink-soft);
  font-size: 0.85rem;
  order: 3;
  font-style: italic;
}

/* Response Message (Full-width slab) */
.thread-message--response {
  align-self: stretch;
  background: linear-gradient(135deg, rgba(126, 241, 198, 0.12), rgba(126, 241, 198, 0.06));
  border: 1px solid rgba(126, 241, 198, 0.25);
  max-width: 100%;
  width: 100%;
}

.thread-message--response .thread-message__label {
  color: var(--accent2);
}

.thread-message--response .thread-message__text {
  color: var(--ink);
}

/* Responsive Design */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .header-nav {
    width: 100%;
    justify-content: flex-start;
    gap: 0.5rem;
  }
  
  .nav-link {
    font-size: 0.9rem;
    padding: 0.4rem 0.6rem;
  }
  
  .account-overview {
    margin: var(--space-lg) auto;
    padding: clamp(1rem, 5vw, 1.25rem);
  }
  
  .thread-message {
    max-width: 100%;
    width: 100%;
    padding: 0.3rem 0.5rem;
  }
  
  .thread-message__text {
    font-size: 0.9rem;
  }
  
  .thread-messages {
    gap: 0.25rem;
  }
  
  .thread-preview__submission,
  .thread-preview__response {
    font-size: 0.85rem;
  }

  .history-list {
    margin-left: calc(-1 * clamp(0.75rem, 4vw, 1.25rem));
    margin-right: calc(-1 * clamp(0.75rem, 4vw, 1.25rem));
  }

  .thread-item {
    border-radius: 18px;
  }

  .thread-preview,
  .thread-content {
    padding-left: clamp(0.75rem, 4vw, 1.25rem);
    padding-right: clamp(0.75rem, 4vw, 1.25rem);
  }
}

/* ═══════════════════════════════════════════════════════
   Zone 1: Account Status Bar
   ═══════════════════════════════════════════════════════ */
.account-overview__status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-lg);
  padding: 0.75rem 1.25rem;
  background: rgba(255,255,255,.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: var(--space-lg);
}

.status-bar__credits {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
}

.status-bar__label {
  color: var(--ink-soft);
}

.status-bar__value {
  color: var(--accent2);
  font-weight: 700;
  font-size: 1.35rem;
}

.status-bar__subscription {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
  padding: 0.35rem 0.75rem;
  background: rgba(126, 241, 198, 0.08);
  border: 1px solid rgba(126, 241, 198, 0.2);
  border-radius: 8px;
}

.status-bar__divider {
  width: 1px;
  height: 1rem;
  background: var(--border-color);
}

.status-bar__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Shop Profile Collapsible */
.shop-profile-collapsible {
  margin-bottom: var(--space-lg);
  border: 1px solid rgba(61, 169, 255, 0.15);
  border-radius: 10px;
  overflow: hidden;
}

.shop-profile-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1.25rem;
  cursor: pointer;
  background: rgba(61, 169, 255, 0.04);
  list-style: none;
  user-select: none;
}

.shop-profile-toggle::-webkit-details-marker {
  display: none;
}

.shop-profile-toggle__label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
}

.shop-profile-toggle__chevron {
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

details[open] > .shop-profile-toggle .shop-profile-toggle__chevron {
  transform: rotate(-135deg);
}

.shop-profile-body {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(61, 169, 255, 0.1);
}

.shop-profile-content {
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.shop-profile-edit {
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.shop-profile-edit:hover {
  text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════
   Zone 2: Upload Hero Panel
   ═══════════════════════════════════════════════════════ */
.account-overview__upload-hero {
  background: rgba(126, 241, 198, 0.04);
  border: 1px solid rgba(126, 241, 198, 0.18);
  border-radius: 12px;
  padding: var(--space-xl) var(--card-padding);
  margin-bottom: var(--space-lg);
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
}

.account-overview__upload-hero h3 {
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  color: var(--ink);
}

.upload-hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.upload-dropzone {
  border: 2px dashed rgba(126, 241, 198, 0.3);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  min-height: 140px;
}

.upload-dropzone:hover,
.upload-dropzone--active {
  border-color: var(--accent2);
  background: rgba(126, 241, 198, 0.06);
}

.upload-dropzone__icon {
  color: var(--accent2);
  opacity: 0.7;
}

.upload-dropzone__hint {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin: 0;
}

/* ═══════════════════════════════════════════════════════
   Zone 3: Trends Collapsible Wrapper
   ═══════════════════════════════════════════════════════ */
.trends-collapsible {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
}

.trends-collapsible__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(61,169,255,.06), rgba(126,241,198,.04));
  list-style: none;
  user-select: none;
}

.trends-collapsible__toggle::-webkit-details-marker {
  display: none;
}

.trends-collapsible__title {
  margin: 0 !important;
  font-size: 1.25rem;
  color: var(--accent);
}

.trends-collapsible__chevron {
  width: 12px;
  height: 12px;
  border-right: 2.5px solid var(--accent);
  border-bottom: 2.5px solid var(--accent);
  transform: rotate(45deg);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

details[open] > .trends-collapsible__toggle .trends-collapsible__chevron {
  transform: rotate(-135deg);
}

.trends-collapsible__body {
  padding: 0;
}

/* ═══════════════════════════════════════════════════════
   Zone 4: Re-Analyze CTA Banner
   ═══════════════════════════════════════════════════════ */
.reanalyze-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: 0.75rem 1.25rem;
  margin-bottom: var(--space-lg);
  background: linear-gradient(135deg, rgba(61,169,255,.06), rgba(126,241,198,.04));
  border: 1px solid rgba(61,169,255,.15);
  border-radius: 10px;
}

.reanalyze-banner__content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.reanalyze-banner__icon {
  color: var(--accent);
  flex-shrink: 0;
}

.reanalyze-banner__content p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.4;
}

/* Compact button variant */
.btn-compact {
  padding: 0.35rem 0.75rem !important;
  font-size: 0.85rem !important;
}

.start-here-hint {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  padding: 0.75rem 0.9rem;
  border: 1px dashed rgba(61, 169, 255, 0.35);
  background: rgba(61, 169, 255, 0.08);
  border-radius: 10px;
  color: var(--accent);
  font-weight: 600;
}

.start-here-arrow {
  width: 26px;
  height: 16px;
  position: relative;
  flex-shrink: 0;
}

.start-here-arrow::before {
  content: '';
  position: absolute;
  top: 7px;
  left: 0;
  width: 20px;
  height: 2px;
  background: var(--accent);
}

.start-here-arrow::after {
  content: '';
  position: absolute;
  top: 1px;
  right: 0;
  width: 10px;
  height: 10px;
  border-top: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
  transform: rotate(45deg);
}

.start-here-text {
  line-height: 1.35;
  font-size: 0.95rem;
}

/* Authenticated Submission Form */
.auth-submit-upload {
  margin-bottom: 1rem;
}

.auth-submit-file-list {
  list-style: none;
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.auth-submit-file-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(125,173,255,.15);
  border-radius: 8px;
  font-size: 0.9rem;
}

.auth-submit-file-list li span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 0.5rem;
}

.auth-submit-file-list li button {
  background: transparent;
  border: none;
  color: #ff6b6b;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.15s ease;
}

.auth-submit-file-list li button:hover {
  background: rgba(255, 107, 107, 0.1);
}

.auth-submit-input-group {
  margin-bottom: 1rem;
}

.auth-submit-input-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.auth-submit-input-group textarea {
  width: 100%;
  min-height: 100px;
  padding: 0.75rem;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
  transition: border-color 0.15s ease;
}

.auth-submit-input-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.auth-submit-message {
  margin-bottom: 1rem;
  font-size: 0.9rem;
  min-height: 1.2rem;
}

.auth-submit-button-container {
  display: flex;
  justify-content: flex-start;
  gap: 0.75rem;
}

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 6px;
  margin-left: 0.75rem;
}

.status-pending {
  background: rgba(255, 193, 7, 0.2);
  color: #ffca28;
  border: 1px solid rgba(255, 193, 7, 0.5);
}

.status-processing {
  background: rgba(61, 169, 255, 0.2);
  color: #3da9ff;
  border: 1px solid rgba(61, 169, 255, 0.5);
}

.status-completed {
  background: rgba(126, 241, 198, 0.2);
  color: #7ef1c6;
  border: 1px solid rgba(126, 241, 198, 0.5);
}

.status-failed {
  background: rgba(255, 107, 107, 0.2);
  color: #ff8080;
  border: 1px solid rgba(255, 107, 107, 0.5);
}

/* History Header with Refresh Button */
.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.history-header h4 {
  margin-bottom: 0;
}

/* Thread Preview Header Update */
.thread-preview__header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Error and Pending Message Styles */
.thread-message--error {
  align-self: flex-start;
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.3);
}

.thread-message--error .thread-message__label {
  color: #ff6b6b;
}

.thread-message--error .thread-message__text {
  color: var(--ink);
}

.thread-message--pending {
  align-self: flex-start;
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.3);
}

.thread-message--pending .thread-message__label {
  color: #ffc107;
}

.thread-message--pending .thread-message__text {
  color: var(--ink);
}

/* Responsive Design for New Layout */
@media (max-width: 1024px) {
  .upload-hero__grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .account-overview__status-bar {
    padding: 0.65rem 1rem;
    gap: 0.5rem var(--space-md);
  }

  .reanalyze-banner {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }

  .reanalyze-banner__content {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .benefits-section {
    padding: clamp(1.5rem, 6vw, 2.25rem) clamp(1rem, 4vw, 1.5rem);
  }
  .benefits-cta {
    padding: clamp(1.25rem, 4vw, 1.75rem) 1.5rem;
  }
  .benefits-cta__actions {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 540px) {
  .benefits-grid {
    gap: 1.25rem;
  }
  .benefit-card {
    padding: 1.5rem;
  }
  .benefits-cta__actions .btn {
    width: 100%;
  }

  .history-list {
    margin-left: calc(-1 * clamp(1rem, 6vw, 1.5rem));
    margin-right: calc(-1 * clamp(1rem, 6vw, 1.5rem));
  }
}

/* Demo Carousel Section */
.demo-carousel-section {
  margin: clamp(3.5rem, 7vw, 5rem) auto 0;
  padding: 0 clamp(1rem, 4vw, 1.5rem);
  max-width: 1200px;
  width: 100%;
  background: transparent;
}

.demo-carousel-inner {
  background: var(--bg-elevated);
  border: 2px solid rgba(125,173,255,.35);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0,0,0,.35), 0 0 0 1px rgba(61, 169, 255, 0.08) inset;
}

.demo-carousel-header {
  text-align: center;
  padding: clamp(1.5rem, 3vw, 2rem) clamp(1rem, 3vw, 1.5rem) clamp(1rem, 2vw, 1.25rem);
}

.demo-carousel-header h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.75rem);
  color: var(--ink);
  font-weight: 700;
}

.demo-carousel-content {
  padding: clamp(1rem, 3vw, 1.5rem) clamp(1rem, 3vw, 1.5rem) clamp(1.25rem, 3vw, 1.75rem);
}

/* Carousel Container */
.carousel-container {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
}

.carousel-track {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  width: 100%;
  min-height: 420px;
  padding: clamp(1rem, 3vw, 1.5rem);
}

/* Carousel Slide */
.carousel-slide {
  display: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.carousel-slide.active {
  display: block;
  opacity: 1;
}

.carousel-slide-image {
  width: 100%;
  margin: 0 auto var(--space-lg);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
}

.carousel-slide-image img {
  width: 100%;
  height: auto;
  max-height: 520px;
  display: block;
  -webkit-user-select: none;
  user-select: none;
  object-fit: contain;
}

.carousel-slide-text {
  text-align: center;
  padding: 0 1rem;
  margin-bottom: var(--space-lg);
}

.carousel-slide-text h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  margin-bottom: 0.75rem;
  color: var(--ink);
  line-height: 1.3;
}

.carousel-slide-text p {
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0 auto;
  max-width: 700px;
}

/* Navigation Buttons */
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(61, 169, 255, 0.25);
  border: 2px solid rgba(61, 169, 255, 0.5);
  border-radius: 50%;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--accent);
  z-index: 100;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.carousel-nav:hover {
  background: rgba(61, 169, 255, 0.45);
  border-color: var(--accent);
  transform: translateY(-50%) scale(1.1);
}

.carousel-nav:active {
  transform: translateY(-50%) scale(0.95);
}

.carousel-nav-prev {
  left: 10px;
}

.carousel-nav-next {
  right: 10px;
}

/* Dot Indicators */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
  flex-wrap: wrap;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(125, 173, 255, 0.3);
  border: 2px solid rgba(125, 173, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.carousel-dot:hover {
  background: rgba(125, 173, 255, 0.5);
  transform: scale(1.2);
}

.carousel-dot.active {
  background: var(--accent);
  border-color: var(--accent);
  width: 32px;
  border-radius: 6px;
}

/* Carousel CTA */
.carousel-cta {
  margin-top: var(--space-xl);
  padding: clamp(1.25rem, 3vw, 2rem) clamp(1.25rem, 3vw, 1.75rem);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(126, 241, 198, 0.15), rgba(61, 169, 255, 0.15));
  border: 1px solid rgba(126, 241, 198, 0.35);
  text-align: center;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.2);
}

.carousel-cta-text h3 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  margin-bottom: 1rem;
  color: var(--ink);
}

.carousel-cta-text p {
  font-size: 1.05rem;
  color: var(--ink);
  margin: 0 auto 2rem;
  max-width: 700px;
  line-height: 1.7;
}

.carousel-cta-text strong {
  color: var(--accent2);
  font-weight: 700;
}

.carousel-cta-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.carousel-cta-actions .btn {
  min-width: 180px;
}

/* Light Theme Overrides */
[data-theme="light"] .demo-carousel-inner {
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid rgba(37, 99, 235, 0.2);
  box-shadow: 0 16px 40px rgba(0,0,0,.06), 0 0 0 1px rgba(37, 99, 235, 0.05) inset;
}

[data-theme="light"] .demo-carousel-header:hover {
  background: rgba(37, 99, 235, 0.05);
}

[data-theme="light"] .carousel-slide-image {
  background: rgba(100, 116, 139, 0.1);
  border: 1px solid var(--border-color);
}

[data-theme="light"] .carousel-track {
  background: rgba(100, 116, 139, 0.03);
}

[data-theme="light"] .carousel-nav {
  background: rgba(37, 99, 235, 0.15);
  border-color: rgba(37, 99, 235, 0.4);
}

[data-theme="light"] .carousel-nav:hover {
  background: rgba(37, 99, 235, 0.25);
}

[data-theme="light"] .carousel-cta {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.1), rgba(37, 99, 235, 0.1));
  border: 1px solid rgba(5, 150, 105, 0.25);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .carousel-track {
    padding: 1.25rem;
    min-height: 360px;
  }
  
  .carousel-slide-image img {
    max-height: 460px;
  }
  
  .carousel-nav {
    background: rgba(61, 169, 255, 0.35);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }
  
  .carousel-nav-prev {
    left: 8px;
  }
  
  .carousel-nav-next {
    right: 8px;
  }
}

@media (max-width: 768px) {
  .demo-carousel-section {
    padding: 0 1rem;
  }
  
  .demo-carousel-header {
    padding: 2rem 1.5rem 1rem;
  }
  
  .demo-carousel-content {
    padding: 1rem 1.5rem 2rem;
  }
  
  .carousel-track {
    padding: 1rem 0.75rem;
    min-height: 340px;
  }
  
  .carousel-slide-image {
    margin-bottom: var(--space-md);
  }
  
  .carousel-slide-image img {
    max-height: 420px;
  }
  
  .carousel-slide-text {
    padding: 0 0.5rem;
    margin-bottom: var(--space-md);
  }
  
  .carousel-nav {
    width: 48px;
    height: 48px;
  }
  
  .carousel-nav-prev {
    left: 6px;
  }
  
  .carousel-nav-next {
    right: 6px;
  }
  
  .carousel-cta {
    padding: 1.5rem 1.25rem;
  }
  
  .carousel-cta-actions {
    width: 100%;
  }
  
  .carousel-cta-actions .btn {
    flex: 1;
    min-width: 140px;
  }
}

@media (max-width: 540px) {
  .demo-carousel-section {
    padding: 0 0.5rem;
  }
  
  .demo-carousel-header {
    padding: 1.5rem 1rem 0.75rem;
  }
  
  .demo-carousel-content {
    padding: 0.75rem 0.5rem 1.5rem;
  }
  
  .carousel-track {
    padding: 0.75rem 0.5rem;
    min-height: 300px;
  }
  
  .carousel-slide-image {
    margin-bottom: var(--space-sm);
  }
  
  .carousel-slide-image img {
    max-height: 360px;
  }
  
  .carousel-slide-text {
    padding: 0 0.25rem;
    margin-bottom: var(--space-sm);
  }
  
  .carousel-slide-text h3 {
    font-size: 1.1rem;
  }
  
  .carousel-slide-text p {
    font-size: 0.85rem;
  }
  
  .carousel-nav {
    width: 40px;
    height: 40px;
  }
  
  .carousel-nav-prev {
    left: 4px;
  }
  
  .carousel-nav-next {
    right: 4px;
  }
  
  .carousel-nav svg {
    width: 20px;
    height: 20px;
  }
  
  .carousel-dots {
    gap: 0.5rem;
  }
  
  .carousel-dot {
    width: 10px;
    height: 10px;
  }
  
  .carousel-dot.active {
    width: 24px;
  }
  
  .carousel-cta {
    padding: 1.5rem 1rem;
  }
  
  .carousel-cta-actions {
    flex-direction: column;
  }
  
  .carousel-cta-actions .btn {
    width: 100%;
  }
}

/* Feedback Buttons and Toast */
.thread-feedback {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--ink-dim);
}

.feedback-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  background: var(--bg-secondary);
  border: 1px solid var(--ink-dim);
  border-radius: 20px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: auto;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.feedback-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.feedback-btn-up:hover {
  background: rgba(34, 197, 94, 0.1);
  border-color: #22c55e;
  color: #22c55e;
}

.feedback-btn-down:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
  color: #ef4444;
}

.feedback-btn svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
  transition: all 0.2s ease;
}

/* Thumbs Up - Active State (Green) */
.feedback-btn-up.active {
  background: #22c55e;
  border-color: #22c55e;
  color: white;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.4);
}

.feedback-btn-up.active svg {
  stroke: white;
  fill: white;
}

/* Thumbs Down - Active State (Red) */
.feedback-btn-down.active {
  background: #ef4444;
  border-color: #ef4444;
  color: white;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.feedback-btn-down.active svg {
  stroke: white;
  fill: white;
}

/* Light theme adjustments */
[data-theme="light"] .feedback-btn {
  background: #f8f9fa;
  border-color: #d1d5db;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .feedback-btn-up:hover {
  background: rgba(34, 197, 94, 0.15);
}

[data-theme="light"] .feedback-btn-down:hover {
  background: rgba(239, 68, 68, 0.15);
}

.feedback-comment-box {
  width: 100%;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--ink-dim);
}

.feedback-comment-textarea {
  width: 100%;
  min-height: 80px;
  padding: 0.875rem 1rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  border: 1.5px solid var(--ink-dim);
  border-radius: 12px;
  resize: vertical;
  margin-bottom: 0.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.feedback-comment-textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg);
  box-shadow: 0 0 0 3px rgba(126, 241, 198, 0.1), 0 2px 6px rgba(0, 0, 0, 0.1);
}

.feedback-comment-textarea::placeholder {
  color: var(--ink-soft);
}

.feedback-submit-btn {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

/* Feedback Toast Notification */
.feedback-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 1rem 1.5rem;
  background: var(--accent);
  color: #0a0a0a;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 10000;
  pointer-events: none;
}

.feedback-toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Light theme adjustments */
[data-theme="light"] .feedback-toast {
  background: var(--accent);
  color: #0a0a0a;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .thread-feedback {
    flex-wrap: wrap;
  }
  
  .feedback-comment-box {
    width: 100%;
  }
  
  .feedback-toast {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    text-align: center;
  }
}

/* Structured Response Accordion Styles */
.accordion {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.accordion-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  min-height: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.accordion-section:hover {
  border-color: var(--border-color-hover);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.accordion-section.expanded {
  border-color: rgba(61, 169, 255, 0.4);
  background: rgba(15, 25, 35, 0.5);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: background 0.2s ease;
}

.accordion-header:hover {
  background: rgba(255, 255, 255, 0.04);
}

.accordion-section.expanded .accordion-header {
  background: rgba(61, 169, 255, 0.08);
  border-bottom: 1px solid rgba(61, 169, 255, 0.25);
}

.accordion-header-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.3px;
}

.accordion-header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, rgba(61, 169, 255, 0.25), rgba(61, 169, 255, 0.12));
  border-radius: 8px;
  font-size: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.accordion-header-badge {
  display: inline-block;
  padding: 0.3rem 0.65rem;
  background: rgba(61, 169, 255, 0.18);
  border: 1px solid rgba(61, 169, 255, 0.35);
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  margin-left: 0.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.accordion-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  transition: all 0.2s ease;
  color: var(--ink-soft);
}

.accordion-toggle::before {
  content: '▼';
  font-size: 0.8rem;
  transition: transform 0.2s ease;
}

.accordion-section.expanded .accordion-toggle::before {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  padding: 0;
  transition: max-height 0.3s ease, padding 0.2s ease;
}

.accordion-section.expanded .accordion-content {
  max-height: 10000px;
  padding: 0;
}

.accordion-content-inner {
  padding: 0;
}

.accordion-section.expanded .accordion-content-inner {
  padding: 1.5rem 1.75rem 1.75rem 1.75rem;
}

/* Remove extra margins on first/last children */
.accordion-content-inner > :first-child {
  margin-top: 0;
}

.accordion-content-inner > :last-child {
  margin-bottom: 0;
}

.accordion-content-inner p {
  margin-bottom: 1rem;
  line-height: 1.75;
}

.accordion-content-inner p:last-child {
  margin-bottom: 0;
}

/* Overall Statement Section */
.overall-statement {
  font-size: 0.975rem;
  line-height: 1.8;
  color: var(--ink);
}


.overall-statement .section-subtitle {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent2);
  margin: 1.5rem 0 0.75rem 0;
  line-height: 1.4;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(61, 169, 255, 0.15);
}

.overall-statement .section-subtitle:first-child {
  margin-top: 0;
}

.overall-statement .bullet-item {
  margin: 0.5rem 0 0.5rem 1rem;
  padding-left: 0.5rem;
  line-height: 1.75;
  color: var(--ink);
}

/* Missed Operations Section */
.missed-operations {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.missed-operation-card {
  background: rgba(20, 30, 45, 0.7);
  border: 1px solid rgba(61, 169, 255, 0.3);
  border-radius: 8px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.missed-operation-card:hover {
  border-color: rgba(61, 169, 255, 0.5);
  background: rgba(20, 30, 45, 0.9);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.missed-operation-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  gap: 0.75rem;
}

.missed-operation-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0;
  line-height: 1.4;
  letter-spacing: 0.2px;
}

.missed-operation-values {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.68rem;
  white-space: nowrap;
}

.value-chip {
  padding: 0.4rem 0.75rem;
  background: rgba(61, 169, 255, 0.12);
  border: 1px solid rgba(61, 169, 255, 0.3);
  border-radius: 6px;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
  line-height: 1.3;
}

.value-chip.labor {
  background: rgba(126, 241, 198, 0.1);
  border-color: rgba(126, 241, 198, 0.3);
  color: var(--accent2);
}

.value-chip.material {
  background: rgba(255, 193, 7, 0.1);
  border-color: rgba(255, 193, 7, 0.3);
  color: #ffc107;
}

.value-chip.refinish {
  background: rgba(156, 136, 255, 0.1);
  border-color: rgba(156, 136, 255, 0.3);
  color: #9c88ff;
}

.missed-operation-description {
  font-size: 0.925rem;
  line-height: 1.7;
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
}


.missed-operation-description .section-subtitle {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--accent);
  margin: 1rem 0 0.5rem 0;
  line-height: 1.3;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid rgba(61, 169, 255, 0.12);
}

.missed-operation-description .section-subtitle:first-child {
  margin-top: 0;
}

.missed-operation-description .bullet-item {
  margin: 0.4rem 0 0.4rem 0.75rem;
  padding-left: 0.5rem;
  line-height: 1.65;
  color: var(--ink-soft);
}

.missed-operation-note {
  background: #0a0e12;
  border: 1px solid rgba(61, 169, 255, 0.35);
  border-radius: 6px;
  padding: 1rem;
  position: relative;
  margin-top: 0.75rem;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.missed-operation-note-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ink-soft);
  margin-bottom: 0.75rem;
}

.missed-operation-note-text {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  color: #e8f0ff;
  white-space: pre-wrap;
  word-break: break-word;
}

.copy-button {
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(61, 169, 255, 0.12);
  border: 1px solid rgba(61, 169, 255, 0.35);
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.copy-button:hover {
  background: rgba(61, 169, 255, 0.22);
  border-color: rgba(61, 169, 255, 0.55);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.copy-button:active {
  transform: scale(0.96);
}

.copy-button.copied {
  background: rgba(126, 241, 198, 0.18);
  border-color: rgba(126, 241, 198, 0.45);
  color: var(--accent2);
}

/* Closing Statement Section */
.closing-statement {
  font-size: 0.975rem;
  line-height: 1.8;
  color: var(--ink);
}


.closing-statement .section-subtitle {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent2);
  margin: 1.5rem 0 0.75rem 0;
  line-height: 1.4;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(126, 241, 198, 0.15);
}

.closing-statement .section-subtitle:first-child {
  margin-top: 0;
}

.closing-statement .bullet-item {
  margin: 0.5rem 0 0.5rem 1rem;
  padding-left: 0.5rem;
  line-height: 1.75;
  color: var(--ink);
}

/* Light Theme Adjustments */
[data-theme="light"] .accordion-section {
  background: #fefefe;
  border-color: rgba(100, 116, 139, 0.25);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .accordion-section:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .accordion-section.expanded {
  background: #ffffff;
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12), 0 3px 6px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .accordion-header:hover {
  background: rgba(37, 99, 235, 0.04);
}

[data-theme="light"] .accordion-section.expanded .accordion-header {
  background: rgba(37, 99, 235, 0.08);
  border-bottom-color: rgba(37, 99, 235, 0.2);
}

[data-theme="light"] .accordion-header-icon {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(37, 99, 235, 0.1));
}

[data-theme="light"] .missed-operation-card {
  background: #fafbfc;
  border-color: rgba(37, 99, 235, 0.25);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .missed-operation-card:hover {
  background: #ffffff;
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .missed-operation-note {
  background: #1a1f26;
  border-color: rgba(37, 99, 235, 0.4);
}

[data-theme="light"] .missed-operation-note-text {
  color: #e8f0ff;
}

[data-theme="light"] .missed-operation-note-label {
  color: #e8f0ff;
}

[data-theme="light"] .section-subtitle {
  color: var(--accent);
}

[data-theme="light"] .overall-statement .section-subtitle {
  color: var(--accent2);
  border-bottom-color: rgba(5, 150, 105, 0.2);
}

[data-theme="light"] .closing-statement .section-subtitle {
  color: var(--accent2);
  border-bottom-color: rgba(5, 150, 105, 0.2);
}

[data-theme="light"] .missed-operation-description .section-subtitle {
  border-bottom-color: rgba(37, 99, 235, 0.15);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .accordion {
    gap: 0.75rem;
  }
  
  .accordion-header {
    padding: 0.85rem 1rem;
  }
  
  .accordion-header-title {
    font-size: 1.05rem;
  }
  
  .accordion-header-icon {
    width: 26px;
    height: 26px;
    font-size: 1rem;
  }
  
  .accordion-section.expanded .accordion-content-inner {
    padding: 1.25rem 1rem 1.5rem 1rem;
  }
  
  .missed-operation-header {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .missed-operation-values {
    width: 100%;
  }
  
  .value-chip {
    font-size: 0.8rem;
    padding: 0.35rem 0.6rem;
  }

  .missed-operations {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }
  
  .copy-button {
    padding: 0.3rem 0.5rem;
    font-size: 0.7rem;
  }
  
  .missed-operation-card {
    padding: 1rem;
    gap: 0.6rem;
  }
  
  .overall-statement,
  .closing-statement {
    font-size: 0.925rem;
    line-height: 1.7;
  }
  
  .overall-statement .section-subtitle,
  .closing-statement .section-subtitle {
    font-size: 0.9rem;
    margin: 1.25rem 0 0.6rem 0;
  }
  
  .overall-statement .bullet-item,
  .closing-statement .bullet-item {
    margin: 0.4rem 0 0.4rem 0.85rem;
    line-height: 1.65;
  }
  
  .missed-operation-description {
    font-size: 0.9rem;
    line-height: 1.65;
  }
  
  .missed-operation-description .section-subtitle {
    font-size: 0.85rem;
    margin: 0.85rem 0 0.45rem 0;
  }
  
  .missed-operation-description .bullet-item {
    margin: 0.35rem 0 0.35rem 0.65rem;
    line-height: 1.6;
  }
  
  .missed-operation-note {
    padding: 0.85rem;
    margin-top: 0.65rem;
  }
  
  .missed-operation-note-label {
    margin-bottom: 0.6rem;
  }
  
  .missed-operation-note-text {
    font-size: 0.8rem;
    line-height: 1.5;
  }
}

/* ===================================
   Trends Analysis Section Styles
   =================================== */

.account-overview__trends {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

/* Trends Cards Base Styles */
.trends-cta-card,
.trends-processing-card,
.trends-result-card,
.trends-error-card {
  background: linear-gradient(135deg, rgba(61, 169, 255, 0.15) 0%, rgba(126, 241, 198, 0.12) 100%);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow);
}

[data-theme="light"] .trends-cta-card,
[data-theme="light"] .trends-processing-card,
[data-theme="light"] .trends-result-card,
[data-theme="light"] .trends-error-card {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(5, 150, 105, 0.08) 100%);
}

.trends-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  text-align: center;
}

.trends-cta-card h3,
.trends-processing-card h3,
.trends-result-card h3,
.trends-error-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--accent);
}

.trends-cta-card p,
.trends-processing-card p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  color: var(--ink-soft);
}

/* Progress Bar */
.progress-bar {
  background: rgba(61, 169, 255, 0.2);
  border-radius: 10px;
  height: 24px;
  overflow: hidden;
  margin: 1rem 0;
}

.progress-fill {
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent2) 100%);
  height: 100%;
  transition: width 0.3s ease;
}

.progress-text {
  text-align: center;
  font-weight: bold;
  margin-top: 0.5rem;
  font-size: 1.2rem;
  color: var(--accent);
}

/* Result Card */
.trends-result-card {
  background: var(--bg-elevated);
}

.trends-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.trends-header .trends-icon {
  font-size: 2rem;
  margin-bottom: 0;
  flex-shrink: 0;
}

.trends-title {
  flex: 1;
}

.trends-title h3 {
  margin-bottom: 0.25rem;
}

.trends-title .text-muted {
  color: var(--ink-soft);
  font-size: 0.875rem;
}

.trends-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.trends-content {
  background: rgba(61, 169, 255, 0.05);
  border-radius: 12px;
  padding: 2.5rem;
  line-height: 1.85;
  color: var(--ink);
  font-size: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .trends-content {
  background: rgba(37, 99, 235, 0.04);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.trends-content h2 {
  color: var(--accent);
  font-size: 1.65rem;
  font-weight: 700;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid rgba(61, 169, 255, 0.2);
  letter-spacing: 0.3px;
}

.trends-content h2:first-child {
  margin-top: 0;
}

.trends-content h3 {
  color: var(--accent2);
  font-size: 1.3rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(126, 241, 198, 0.2);
  letter-spacing: 0.2px;
}

.trends-content h3:first-of-type {
  margin-top: 0;
}

.trends-content ul {
  margin-left: 1.75rem;
  margin-bottom: 1.5rem;
  margin-top: 0.75rem;
}

.trends-content li {
  margin-bottom: 0.75rem;
  color: var(--ink-soft);
  line-height: 1.8;
}

.trends-content p {
  margin-bottom: 1.25rem;
  color: var(--ink);
  line-height: 1.85;
}

.trends-content p:last-child {
  margin-bottom: 0;
}

.trends-content strong {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.2px;
}

/* Add spacing between recurring issue sections */
.trends-content h3 + p {
  margin-top: 1.25rem;
  margin-bottom: 1rem;
}

/* Add visual separation between recurring issue items */
.trends-content h3 {
  position: relative;
}

.trends-content h3:not(:first-of-type)::before {
  content: '';
  position: absolute;
  top: -1.5rem;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(61, 169, 255, 0.15);
}

/* Spacer between sections */
.trends-content .trends-spacer {
  height: 1.5rem;
}

/* Improve spacing for paragraphs containing strong labels (Frequency, Improvement Tip) */
.trends-content p strong {
  display: inline-block;
  margin-right: 0.75rem;
  font-weight: 700;
  min-width: 140px;
}

/* Special styling for paragraphs with Frequency/Improvement Tip labels */
.trends-content .trends-label-paragraph {
  margin-top: 1rem;
  margin-bottom: 1.25rem;
  padding-left: 1rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  border-left: 3px solid rgba(61, 169, 255, 0.35);
  background: rgba(61, 169, 255, 0.03);
  border-radius: 4px;
  line-height: 1.8;
}

[data-theme="light"] .trends-content .trends-label-paragraph {
  border-left-color: rgba(37, 99, 235, 0.4);
  background: rgba(37, 99, 235, 0.04);
}

/* Ensure proper spacing between issue items */
.trends-content h3 + p + p {
  margin-top: 0.75rem;
}

/* Add more space after the last paragraph in each recurring issue section */
.trends-content h3 ~ p.trends-label-paragraph:last-of-type {
  margin-bottom: 2rem;
}

/* Error State */
.trends-error-card {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.1) 0%, rgba(255, 107, 107, 0.05) 100%);
  border-color: rgba(255, 107, 107, 0.3);
}

.trends-error-card h3 {
  color: #ff6b6b;
}

.trends-message {
  font-size: 0.9rem;
  padding: 0.75rem;
  border-radius: 6px;
  background: rgba(255, 107, 107, 0.1);
  color: #ff6b6b;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .account-overview__trends {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .trends-cta-card,
  .trends-processing-card,
  .trends-result-card,
  .trends-error-card {
    padding: 1.5rem;
  }
  
  .trends-icon {
    font-size: 2.5rem;
  }
  
  .trends-cta-card h3,
  .trends-processing-card h3,
  .trends-result-card h3,
  .trends-error-card h3 {
    font-size: 1.25rem;
  }
  
  .trends-actions {
    flex-direction: column;
  }
  
  .trends-actions button {
    width: 100%;
  }
  
  .trends-content {
    padding: 1.5rem 1.25rem;
    font-size: 0.95rem;
    line-height: 1.75;
  }
  
  .trends-content h2 {
    font-size: 1.35rem;
    margin-top: 2rem;
    margin-bottom: 1.25rem;
  }
  
  .trends-content h3 {
    font-size: 1.15rem;
    margin-top: 2rem;
    margin-bottom: 0.9rem;
  }
  
  .trends-content h3 + p {
    margin-top: 1rem;
  }
  
  .trends-content p {
    margin-bottom: 1.1rem;
    line-height: 1.75;
  }
  
  .trends-content .trends-label-paragraph {
    padding-left: 0.75rem;
    margin-top: 0.85rem;
    margin-bottom: 1.1rem;
  }
  
  .trends-content p strong {
    min-width: 120px;
    margin-right: 0.5rem;
  }
  
  .trends-content .trends-spacer {
    height: 1.25rem;
  }
  
  .trends-content h3 ~ p.trends-label-paragraph:last-of-type {
    margin-bottom: 1.75rem;
  }
}
/* Trends Rating Badge */
.trends-rating {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  min-width: 100px;
  text-align: center;
}

.rating-value {
  font-size: 2rem;
  font-weight: bold;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.rating-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ink-soft);
  font-weight: 600;
}

/* Rating Color Variants */
.trends-rating.rating-excellent {
  border-color: #10b981;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
}

.trends-rating.rating-excellent .rating-value {
  color: #10b981;
}

.trends-rating.rating-good {
  border-color: #3b82f6;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
}

.trends-rating.rating-good .rating-value {
  color: #3b82f6;
}

.trends-rating.rating-fair {
  border-color: #f59e0b;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%);
}

.trends-rating.rating-fair .rating-value {
  color: #f59e0b;
}

.trends-rating.rating-poor {
  border-color: #ef4444;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
}

.trends-rating.rating-poor .rating-value {
  color: #ef4444;
}

/* Responsive adjustments for rating badge */
@media (max-width: 768px) {
  .trends-header {
    flex-wrap: wrap;
  }
  
  .trends-rating {
    width: 100%;
    margin-top: 1rem;
    flex-direction: row;
    justify-content: center;
    gap: 1rem;
  }
  
  .rating-value {
    font-size: 1.5rem;
  }
}

/* ===================================
   Leaderboard Page Styles
   =================================== */

/* Remove any blur effects from main on leaderboard page */
main:has(.leaderboard-container)::before {
  display: none !important;
}

main:has(.leaderboard-container) {
  background: var(--bg) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.leaderboard-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2rem) clamp(1rem, 3vw, 1.5rem);
  background: var(--bg);
  min-height: 100vh;
  position: relative;
  z-index: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Hero Section */
.leaderboard-hero {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem 1rem;
  background: #141a22;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  position: relative;
  z-index: 1;
}

[data-theme="light"] .leaderboard-hero {
  background: #ffffff;
}

.leaderboard-hero-badge {
  display: inline-block;
  font-size: 1.25rem;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #061019;
  padding: 0.85rem 2rem;
  border-radius: 999px;
  font-weight: 800;
  margin-bottom: 1.5rem;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 12px rgba(61, 169, 255, 0.3);
}

.leaderboard-hero h2 {
  font-size: clamp(2.75rem, 6vw, 3.75rem);
  margin-bottom: 1rem;
  color: var(--ink);
  line-height: 1.2;
  font-weight: 700;
}

.leaderboard-hero p {
  font-size: 1.1rem;
  color: var(--ink);
  margin: 0 auto;
  max-width: 700px;
  line-height: 1.6;
}

.leaderboard-disclaimer {
  margin-top: 1.5rem;
  padding: 1rem 1.5rem;
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.3);
  border-radius: 8px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.leaderboard-disclaimer p {
  font-size: 0.95rem;
  color: var(--ink);
  margin: 0;
  line-height: 1.5;
}

.leaderboard-disclaimer strong {
  color: #f59e0b;
}

/* Stats Section */
.leaderboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.stat-card {
  background: #141a22;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

[data-theme="light"] .stat-card {
  background: #ffffff;
}

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

.stat-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.5rem;
  line-height: 1;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.stat-label {
  font-size: 0.95rem;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  opacity: 0.9;
}

/* Loading State */
.leaderboard-loading {
  text-align: center;
  padding: 3rem 1rem;
}

.leaderboard-loading p {
  margin-top: 1rem;
  color: var(--ink-soft);
  font-size: 1rem;
}

/* Error State */
.leaderboard-error {
  text-align: center;
  padding: 3rem 2rem;
  background: rgba(255, 107, 107, 0.08);
  border: 1px solid rgba(255, 107, 107, 0.25);
  border-radius: 16px;
  margin-bottom: 3rem;
}

.error-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.leaderboard-error h3 {
  font-size: 1.5rem;
  color: #ff6b6b;
  margin-bottom: 1rem;
}

.leaderboard-error p {
  color: var(--ink-soft);
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

/* Empty State */
.leaderboard-empty {
  text-align: center;
  padding: 4rem 2rem;
  background: rgba(61, 169, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  margin-bottom: 3rem;
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.leaderboard-empty h3 {
  font-size: 1.5rem;
  color: var(--ink);
  margin-bottom: 1rem;
}

.leaderboard-empty p {
  color: var(--ink-soft);
  font-size: 1rem;
  margin: 0 0 1.5rem 0;
}

/* Leaderboard Table Wrapper */
.leaderboard-table-wrapper {
  margin-bottom: 3rem;
}

.leaderboard-table-header {
  text-align: center;
  margin-bottom: 2rem;
  background: #141a22;
  padding: 1.5rem;
  border-radius: 16px;
  border: 1px solid var(--border-color);
}

[data-theme="light"] .leaderboard-table-header {
  background: #ffffff;
}

.leaderboard-table-header h3 {
  font-size: 1.75rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.leaderboard-table-header .text-muted {
  font-size: 0.9rem;
  color: var(--ink);
  opacity: 0.95;
  font-weight: 500;
}

/* Leaderboard Table */
.leaderboard-table-container {
  background: #141a22;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: clamp(1rem, 3vw, 1.5rem);
  box-shadow: var(--shadow);
  overflow-x: auto;
  margin-bottom: 1rem;
}

[data-theme="light"] .leaderboard-table-container {
  background: #ffffff;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}

.leaderboard-table thead {
  background: rgba(61, 169, 255, 0.1);
  border-bottom: 2px solid var(--border-color-hover);
}

.leaderboard-table th {
  padding: 1rem;
  text-align: left;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
}

.leaderboard-table th.col-rank {
  width: 100px;
  text-align: center;
}

.leaderboard-table th.col-user {
  width: auto;
}

.leaderboard-table th.col-rating {
  width: 140px;
  text-align: center;
}

.leaderboard-table th.col-jobs {
  width: 160px;
  text-align: right;
}

.leaderboard-table tbody tr {
  border-bottom: 1px solid var(--border-color);
  transition: background 0.2s ease;
}

.leaderboard-table tbody tr:hover {
  background: rgba(61, 169, 255, 0.05);
}

.leaderboard-table tbody tr.top-rank {
  background: linear-gradient(135deg, rgba(61, 169, 255, 0.08), rgba(126, 241, 198, 0.08));
}

.leaderboard-table tbody tr.top-rank:hover {
  background: linear-gradient(135deg, rgba(61, 169, 255, 0.12), rgba(126, 241, 198, 0.12));
}

.leaderboard-table td {
  padding: 1rem;
  color: var(--ink);
  font-size: 0.95rem;
}

.leaderboard-table td.col-rank {
  text-align: center;
}

.leaderboard-table td.col-rating {
  text-align: center;
}

.leaderboard-table td.col-rating .rating-value {
  display: inline-block;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  background: rgba(61, 169, 255, 0.1);
  border: 1px solid rgba(61, 169, 255, 0.3);
}

.leaderboard-table td.col-rating .rating-value.rating-excellent {
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
}

.leaderboard-table td.col-rating .rating-value.rating-good {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
}

.leaderboard-table td.col-rating .rating-value.rating-fair {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
}

.leaderboard-table td.col-rating .rating-value.rating-poor {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
}

.leaderboard-table td.col-jobs {
  text-align: right;
  font-weight: 600;
  color: var(--accent2);
  font-size: 1.05rem;
}

/* Rank Badge */
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.rank-badge.rank-top {
  font-size: 1.5rem;
  background: transparent;
  border: none;
}

/* Leaderboard Footer */
.leaderboard-footer {
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.leaderboard-footer .text-muted {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 0;
}

/* Info Section */
.leaderboard-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.info-card {
  background: #141a22;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--shadow);
}

[data-theme="light"] .info-card {
  background: #ffffff;
}

.info-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-color-hover);
  box-shadow: 0 20px 40px rgba(0,0,0,.4);
}

.info-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.info-card h4 {
  font-size: 1.25rem;
  color: var(--ink);
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.info-card p {
  font-size: 0.95rem;
  color: var(--ink);
  line-height: 1.6;
  margin: 0;
  opacity: 1;
  font-weight: 500;
}

/* CTA Section */
.leaderboard-cta {
  background: linear-gradient(135deg, rgba(61, 169, 255, 0.2), rgba(126, 241, 198, 0.2));
  border: 2px solid rgba(126, 241, 198, 0.4);
  border-radius: 20px;
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3);
}

.leaderboard-cta h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--ink);
  margin-bottom: 1rem;
  font-weight: 700;
}

.leaderboard-cta p {
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  opacity: 1;
  font-weight: 500;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-buttons .btn {
  min-width: 160px;
}

/* Light Theme Adjustments */

[data-theme="light"] .leaderboard-table thead {
  background: rgba(37, 99, 235, 0.1);
}

[data-theme="light"] .leaderboard-table tbody tr:hover {
  background: rgba(37, 99, 235, 0.06);
}

[data-theme="light"] .leaderboard-table tbody tr.top-rank {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(5, 150, 105, 0.1));
}

[data-theme="light"] .leaderboard-table tbody tr.top-rank:hover {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(5, 150, 105, 0.15));
}

[data-theme="light"] .rank-badge {
  background: rgba(100, 116, 139, 0.08);
  border-color: var(--border-color);
}

[data-theme="light"] .leaderboard-empty {
  background: rgba(37, 99, 235, 0.06);
}

[data-theme="light"] .leaderboard-cta {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(5, 150, 105, 0.12));
  border: 2px solid rgba(5, 150, 105, 0.3);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .info-card:hover {
  box-shadow: 0 20px 40px rgba(0,0,0,.12);
}

/* Responsive Design */
@media (max-width: 768px) {
  .leaderboard-container {
    padding: 1rem 0.75rem;
  }
  
  .leaderboard-hero {
    margin-bottom: 2rem;
    padding: 1.5rem 0.5rem;
  }
  
  .leaderboard-hero h2 {
    font-size: 1.75rem;
  }
  
  .leaderboard-hero p {
    font-size: 1rem;
  }
  
  .leaderboard-stats {
    gap: 1rem;
    margin-bottom: 2rem;
  }
  
  .stat-card {
    padding: 1.5rem 1rem;
  }
  
  .stat-icon {
    font-size: 2rem;
  }
  
  .stat-value {
    font-size: 2rem;
  }
  
  .leaderboard-table-wrapper {
    margin-bottom: 2rem;
  }
  
  .leaderboard-table-header {
    margin-bottom: 1.5rem;
  }
  
  .leaderboard-table-header h3 {
    font-size: 1.5rem;
  }
  
  .leaderboard-table-container {
    padding: 1rem;
    border-radius: 12px;
  }
  
  .leaderboard-table th,
  .leaderboard-table td {
    padding: 0.75rem 0.5rem;
  }
  
  .leaderboard-table th {
    font-size: 0.8rem;
  }
  
  .leaderboard-table td {
    font-size: 0.9rem;
  }
  
  .leaderboard-table th.col-rank,
  .leaderboard-table td.col-rank {
    width: 60px;
  }
  
  .leaderboard-table th.col-rating,
  .leaderboard-table td.col-rating {
    width: 90px;
  }
  
  .leaderboard-table td.col-rating .rating-value {
    font-size: 0.95rem;
    padding: 0.25rem 0.5rem;
  }
  
  .leaderboard-table th.col-jobs,
  .leaderboard-table td.col-jobs {
    width: 90px;
  }
  
  .rank-badge {
    min-width: 32px;
    height: 32px;
    font-size: 1rem;
  }
  
  .rank-badge.rank-top {
    font-size: 1.25rem;
  }
  
  .leaderboard-info {
    gap: 1.5rem;
    margin-bottom: 2rem;
  }
  
  .info-card {
    padding: 1.5rem;
  }
  
  .info-icon {
    font-size: 2.5rem;
  }
  
  .info-card h4 {
    font-size: 1.1rem;
  }
  
  .leaderboard-cta {
    padding: 2rem 1.5rem;
  }
  
  .cta-buttons {
    flex-direction: column;
    width: 100%;
  }
  
  .cta-buttons .btn {
    width: 100%;
  }
}

@media (max-width: 540px) {
  .leaderboard-container {
    padding: 0.75rem 0.5rem;
  }
  
  .leaderboard-hero {
    padding: 1rem 0.5rem;
  }
  
  .leaderboard-hero-badge {
    font-size: 1rem;
    padding: 0.6rem 1.25rem;
  }
  
  .leaderboard-disclaimer {
    padding: 0.85rem 1rem;
  }
  
  .leaderboard-disclaimer p {
    font-size: 0.85rem;
  }
  
  .leaderboard-stats {
    grid-template-columns: 1fr;
  }
  
  .stat-card {
    padding: 1.25rem 1rem;
  }
  
  .leaderboard-table-container {
    padding: 0.75rem;
  }
  
  .leaderboard-table th,
  .leaderboard-table td {
    padding: 0.6rem 0.4rem;
  }
  
  .leaderboard-table th {
    font-size: 0.75rem;
  }
  
  .leaderboard-table td {
    font-size: 0.85rem;
  }
  
  .leaderboard-table td.col-jobs {
    font-size: 0.95rem;
  }
  
  .rank-badge {
    min-width: 28px;
    height: 28px;
    font-size: 0.9rem;
  }
  
  .rank-badge.rank-top {
    font-size: 1.1rem;
  }
  
  .leaderboard-info {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .info-card {
    padding: 1.25rem;
  }
  
  .leaderboard-cta {
    padding: 1.5rem 1rem;
  }
  
  .leaderboard-cta h3 {
    font-size: 1.25rem;
  }
}

/* ======================================================
   Feature Showcase (replaces demo carousel)
   ====================================================== */

.feature-showcase-section {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 3vw, 2rem);
}

.feature-showcase-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.feature-showcase-header {
  text-align: center;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.feature-showcase-header h2 {
  margin-bottom: 0.75rem;
}

.feature-showcase-grid {
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 4vw, 3rem);
}

.feature-showcase-item {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: center;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: clamp(1rem, 2.5vw, 1.75rem);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.feature-showcase-item:hover {
  border-color: var(--border-color-hover);
  box-shadow: var(--shadow);
}

.feature-showcase-item--reverse {
  grid-template-columns: 1fr 1.2fr;
}

.feature-showcase-item--reverse .feature-showcase-image {
  order: 2;
}

.feature-showcase-item--reverse .feature-showcase-text {
  order: 1;
}

.feature-showcase-image img {
  width: 100%;
  border-radius: calc(var(--radius) - 4px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  display: block;
}

.feature-showcase-text h3 {
  font-size: clamp(1.15rem, 2.5vw, 1.4rem);
  margin-bottom: 0.5rem;
}

.feature-showcase-text p {
  color: var(--ink-soft);
  line-height: 1.6;
}

.feature-showcase-cta {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
}

[data-theme="light"] .feature-showcase-item {
  background: rgba(100,116,139,.03);
  border: 1px solid var(--border-color);
}

/* ======================================================
   Community & Competition Section
   ====================================================== */

.community-section {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 3vw, 2rem);
}

.community-section-inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.community-section-inner h2 {
  margin-bottom: 0.75rem;
}

.community-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 3vw, 2rem);
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  text-align: left;
}

.community-feature {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: clamp(1rem, 2.5vw, 1.5rem);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.community-feature:hover {
  border-color: var(--border-color-hover);
  box-shadow: var(--shadow);
}

.community-feature-image {
  margin-bottom: 1rem;
}

.community-feature-image img {
  width: 100%;
  border-radius: calc(var(--radius) - 4px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  display: block;
}

.community-feature-text h3 {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  margin-bottom: 0.5rem;
}

.community-feature-text p {
  color: var(--ink-soft);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

[data-theme="light"] .community-feature {
  background: rgba(100,116,139,.03);
  border: 1px solid var(--border-color);
}

/* ======================================================
   Bottom CTA
   ====================================================== */

.bottom-cta {
  text-align: center;
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1rem, 3vw, 2rem);
  background: linear-gradient(180deg, transparent 0%, rgba(61, 169, 255, 0.06) 100%);
  border-top: 1px solid var(--border-color);
}

.bottom-cta-inner {
  max-width: 700px;
  margin: 0 auto;
}

.bottom-cta-inner h2 {
  margin-bottom: 0.75rem;
}

.bottom-cta-inner p {
  color: var(--ink-soft);
  margin-bottom: 1rem;
}

.bottom-cta-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
  margin-bottom: 1.5rem;
}

.bottom-cta-note {
  font-size: 0.8rem !important;
  color: var(--muted) !important;
  font-style: italic;
}

[data-theme="light"] .bottom-cta {
  background: linear-gradient(180deg, transparent 0%, rgba(37, 99, 235, 0.04) 100%);
}

/* ======================================================
   Responsive: Hero split + Feature showcase + Community
   ====================================================== */

@media (max-width: 768px) {
  .hero.hero-split {
    flex-direction: column;
    text-align: center;
  }

  .hero-text {
    flex: 1 1 auto;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-image {
    flex: 1 1 auto;
    max-width: 400px;
    margin: 0 auto;
  }

  .feature-showcase-item,
  .feature-showcase-item--reverse {
    grid-template-columns: 1fr;
  }

  .feature-showcase-item--reverse .feature-showcase-image {
    order: 0;
  }

  .feature-showcase-item--reverse .feature-showcase-text {
    order: 0;
  }

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

@media (max-width: 480px) {
  .hero-cta .btn {
    width: 100%;
    text-align: center;
  }

  .bottom-cta-actions .btn {
    width: 100%;
    text-align: center;
  }

  .feature-showcase-cta .btn {
    width: 100%;
    text-align: center;
  }
}
