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

html {
  width: 100%;
  min-width: 100%;
  height: 100%;
}

:root,
[data-theme="dark"] {
  --bg-primary: #0F1419;
  --bg-secondary: #1A1F26;
  --bg-tertiary: #242B34;
  --bg-hover: #2D3748;
  --nav-bg: rgba(15, 20, 25, 0.95);
  --card-bg: #1A1F26;
  --hero-gradient: linear-gradient(180deg, #0F1419 0%, #0a0e13 100%);
  --cta-gradient: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
  --primary: #3B82F6;
  --primary-hover: #60A5FA;
  --primary-dark: #2563EB;
  --text-primary: #E5E7EB;
  --text-secondary: #9CA3AF;
  --text-tertiary: #6B7280;
  --border: #2D3748;
  --success: #10B981;
  --error: #EF4444;
  --warning: #F59E0B;
  --highlight: rgba(59, 130, 246, 0.25);
  --preview-shadow: 0 40px 80px rgba(0, 0, 0, 0.4);
  --card-shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.3);
  --sidebar-width: 280px;
  --header-height: 70px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] {
  --bg-primary: #FFFFFF;
  --bg-secondary: #F8FAFC;
  --bg-tertiary: #EEF2F7;
  --bg-hover: #E2E8F0;
  --nav-bg: rgba(255, 255, 255, 0.95);
  --card-bg: #FFFFFF;
  --hero-gradient: linear-gradient(180deg, #FFFFFF 0%, #F1F5F9 100%);
  --cta-gradient: linear-gradient(135deg, #E0F2FE 0%, #F1F5F9 100%);
  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --primary-dark: #1E40AF;
  --text-primary: #0F172A;
  --text-secondary: #334155;
  --text-tertiary: #475569;
  --border: #CBD5E1;
  --success: #059669;
  --error: #DC2626;
  --warning: #D97706;
  --highlight: rgba(37, 99, 235, 0.12);
  --preview-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
  --card-shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  width: 100%;
  min-width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.hidden {
  display: none !important;
}

#app {
  width: 100%;
  min-width: 100%;
  max-width: none;
}

.view {
  min-height: 100vh;
  width: 100%;
  max-width: none;
}

#landing-view {
  width: 100%;
  min-width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

/* ==========================================
   LANDING PAGE STYLES
   ========================================== */

/* Navigation */
.landing-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.nav-logo svg {
  color: var(--primary);
}

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

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--text-primary);
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: var(--bg-tertiary);
  border-radius: 50%;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.theme-toggle:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.theme-toggle svg {
  transition: transform 0.3s ease;
}

.theme-toggle:hover svg {
  transform: rotate(15deg);
}

/* Hero Section */
.hero-section {
  width: 100%;
  min-height: 100vh;
  background: var(--hero-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 120px 40px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 48px;
}

.hero-content {
  max-width: 700px;
}

.hero-badge {
  display: inline-block;
  padding: 8px 16px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  color: var(--primary-hover);
  margin-bottom: 24px;
}

.hero-content h1 {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  color: var(--text-primary);
}

/* Dark mode: gradient text effect */
[data-theme="dark"] .hero-content h1 {
  background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 20px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 40px;
}

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

.hero-stats {
  display: flex;
  align-items: center;
  gap: 32px;
  justify-content: center;
}

.hero-stats .stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-stats .stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.hero-stats .stat-label {
  font-size: 14px;
  color: var(--text-tertiary);
}

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

/* Hero Visual / App Preview */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.app-preview {
  width: 100%;
  max-width: 640px;
  background: var(--bg-secondary);
  border-radius: 16px;
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--preview-shadow);
}

.preview-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
}

.preview-dots {
  display: flex;
  gap: 8px;
}

.preview-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border);
}

.preview-dots span:first-child { background: #ef4444; }
.preview-dots span:nth-child(2) { background: #f59e0b; }
.preview-dots span:last-child { background: #10b981; }

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

.preview-content {
  padding: 32px 24px;
}

.preview-text {
  margin-bottom: 32px;
}

.preview-sentence {
  font-size: 18px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 16px;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.preview-sentence:hover {
  background: rgba(59, 130, 246, 0.1);
  color: var(--text-primary);
}

.preview-sentence.active {
  background: var(--highlight);
  color: var(--text-primary);
}

.preview-controls {
  background: var(--bg-tertiary);
  border-radius: 12px;
  padding: 20px;
}

.preview-settings-row {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.preview-voice-select {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 180px;
}

.preview-speed-control {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 140px;
}

.preview-speed-control label {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

.preview-speed-control input[type="range"] {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--border);
  border-radius: 3px;
  cursor: pointer;
}

.preview-speed-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.preview-speed-control input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.preview-speed-control input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: var(--primary);
  border-radius: 50%;
  border: none;
  cursor: pointer;
}

.preview-voice-select label {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

.preview-voice-select select {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
}

.preview-voice-select select:focus {
  outline: none;
  border-color: var(--primary);
}

.preview-progress {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.preview-progress-bar {
  position: absolute;
  left: 0;
  top: 0;
  width: 0%;
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.preview-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.preview-nav-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  transition: color 0.2s;
}

.preview-nav-btn:hover {
  color: var(--text);
}

.preview-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.preview-buttons svg {
  color: var(--text-tertiary);
  cursor: pointer;
  transition: color 0.2s;
}

.preview-buttons svg:hover {
  color: var(--text-primary);
}

.preview-play {
  width: 56px;
  height: 56px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.preview-play:hover {
  transform: scale(1.1);
  background: var(--primary-hover);
}

.preview-play svg {
  color: white;
  margin-left: 4px;
}

/* Screenshots Gallery Carousel */
.screenshots-section {
  width: 100%;
  padding: 100px 40px;
  background: var(--bg-primary);
}

.screenshots-carousel {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.carousel-slide {
  flex: 0 0 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.5s ease;
}

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

.carousel-slide img {
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 100%;
  height: auto;
  transition: transform 0.3s ease;
}

.carousel-slide[data-type="mobile"] img {
  max-width: 280px;
  max-height: 500px;
  object-fit: contain;
}

.carousel-slide[data-type="desktop"] img {
  max-width: 100%;
  max-height: 450px;
  object-fit: contain;
}

.carousel-slide:hover img {
  transform: scale(1.02);
}

.carousel-caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
}

.caption-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.caption-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  padding: 6px 16px;
  background: var(--bg-secondary);
  border-radius: 20px;
  border: 1px solid var(--border);
}

.caption-subtitle.real {
  background: linear-gradient(135deg, var(--primary) 0%, #8B5CF6 100%);
  color: white;
  border: none;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 32px;
}

.carousel-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.carousel-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  transform: scale(1.1);
}

.carousel-dots {
  display: flex;
  gap: 8px;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-dot:hover {
  background: var(--text-tertiary);
}

.carousel-dot.active {
  background: var(--primary);
  border-color: var(--primary);
  transform: scale(1.2);
}

/* Light mode adjustments for carousel */
[data-theme="light"] .carousel-slide img {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .carousel-slide:hover img {
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.2);
}

/* Features Section */
.features {
  width: 100%;
  padding: 120px 40px;
  background: var(--bg-secondary);
}

.section-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

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

.section-header h2 {
  font-size: 40px;
  font-weight: 700;
  margin-bottom: 16px;
}

.section-header p {
  font-size: 18px;
  color: var(--text-secondary);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.feature-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  transition: transform 0.3s, border-color 0.3s;
}

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

.feature-icon {
  width: 64px;
  height: 64px;
  background: rgba(59, 130, 246, 0.15);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--primary);
}

.feature-card h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
}

.feature-card p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* How It Works */
.how-it-works {
  width: 100%;
  padding: 120px 40px;
  background: var(--bg-primary);
}

.steps-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.step {
  flex: 1;
  max-width: 280px;
  text-align: center;
  padding: 32px;
}

.step-number {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  margin: 0 auto 24px;
}

.step h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
}

.step p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.step-arrow {
  color: var(--text-tertiary);
}

/* CTA Section */
/* Community Section on Landing Page */
.community-section {
  width: 100%;
  padding: 80px 40px;
  background: var(--bg-secondary);
}

.community-actions-landing {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 24px;
}

.landing-forum-posts {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.landing-forum-post {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.landing-forum-post:hover {
  background: var(--bg-hover);
  border-color: var(--primary);
}

.landing-post-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.landing-post-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 16px;
}

.landing-post-meta {
  flex: 1;
}

.landing-post-author {
  font-weight: 600;
  color: var(--text-primary);
}

.landing-post-date {
  font-size: 13px;
  color: var(--text-tertiary);
}

.landing-post-category {
  background: var(--primary);
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.landing-post-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.landing-post-content {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.landing-post-footer {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.landing-post-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-tertiary);
  font-size: 13px;
}

.landing-post-stat svg {
  width: 16px;
  height: 16px;
}

.landing-post-stat.vote-display {
  display: flex;
  align-items: center;
  gap: 4px;
}

.landing-post-stat .vote-score {
  min-width: 20px;
  text-align: center;
  font-weight: 500;
}

/* Pricing Section */
.pricing-section {
  width: 100%;
  padding: 100px 40px;
  background: var(--bg-secondary);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  max-width: 800px;
  margin: 0 auto;
}

.pricing-card {
  position: relative;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
}

.pricing-card.featured {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, var(--bg-tertiary) 100%);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  right: 24px;
  background: var(--primary);
  color: white;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 20px;
}

.pricing-header {
  margin-bottom: 32px;
}

.pricing-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.pricing-amount {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.pricing-amount .price {
  font-size: 48px;
  font-weight: 700;
  color: var(--text-primary);
}

.pricing-amount .currency {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
}

.pricing-amount .period {
  font-size: 16px;
  color: var(--text-secondary);
  margin-left: 4px;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 32px 0;
  flex: 1;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: var(--text-secondary);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

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

.pricing-features li svg {
  color: var(--success);
  flex-shrink: 0;
}

.pricing-trial {
  text-align: center;
  margin-top: 32px;
  font-size: 15px;
  color: var(--text-secondary);
}

/* FAQ Section */
.faq-section {
  width: 100%;
  padding: 80px 40px;
  background: var(--bg-primary);
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 16px;
  transition: all 0.2s ease;
  cursor: pointer;
  overflow: hidden;
}

.faq-item:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.faq-question-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  gap: 16px;
}

.faq-question {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  flex: 1;
}

.faq-expand-icon {
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.faq-item.expanded .faq-expand-icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 24px;
}

.faq-item.expanded .faq-answer {
  max-height: 500px;
  padding: 0 24px 20px 24px;
}

.faq-answer p {
  font-size: 15px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

.faq-category-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 32px 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
}

.faq-category-title:first-child {
  margin-top: 0;
}

.faq-loading,
.faq-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
  font-size: 15px;
}

.faq-category-header {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 32px 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
}

.faq-category-header:first-child {
  margin-top: 0;
}

@media (max-width: 768px) {
  .faq-section {
    padding: 60px 20px;
  }
  
  .faq-question-row {
    padding: 16px 20px;
  }
  
  .faq-question {
    font-size: 16px;
  }
  
  .faq-answer {
    padding: 0 20px;
  }
  
  .faq-item.expanded .faq-answer {
    padding: 0 20px 16px 20px;
  }
}

@media (max-width: 768px) {
  .pricing-section {
    padding: 60px 20px;
  }
  
  .pricing-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .pricing-card {
    padding: 32px 24px;
  }
  
  .pricing-amount .price {
    font-size: 40px;
  }
}

/* Screenshots carousel responsive */
@media (max-width: 768px) {
  .screenshots-section {
    padding: 60px 20px;
  }
  
  .screenshots-carousel {
    max-width: 100%;
  }
  
  .carousel-slide[data-type="mobile"] img {
    max-width: 200px;
  }
  
  .carousel-slide[data-type="desktop"] img {
    max-width: 100%;
    max-height: 300px;
  }
  
  .carousel-controls {
    gap: 16px;
  }
  
  .carousel-btn {
    width: 40px;
    height: 40px;
  }
  
  .carousel-dot {
    width: 8px;
    height: 8px;
  }
  
  .caption-title {
    font-size: 16px;
  }
  
  .caption-subtitle {
    font-size: 12px;
    padding: 4px 12px;
  }
}

.cta-section {
  width: 100%;
  padding: 120px 40px;
  background: var(--cta-gradient);
  text-align: center;
}

.cta-container {
  max-width: 640px;
  margin: 0 auto;
}

.cta-section h2 {
  font-size: 40px;
  font-weight: 700;
  margin-bottom: 16px;
}

.cta-section p {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

/* Footer */
.landing-footer {
  width: 100%;
  padding: 40px;
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 600;
}

.footer-brand svg {
  color: var(--primary);
}

.footer-text {
  font-size: 14px;
  color: var(--text-tertiary);
}

/* ==========================================
   LOGIN MODAL
   ========================================== */

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: var(--bg-secondary);
  border-radius: 20px;
  padding: 48px;
  max-width: 480px;
  width: 90%;
  border: 1px solid var(--border);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.4);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 8px;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--text-primary);
}

.login-card {
  width: 100%;
}

.login-card-header {
  text-align: center;
  margin-bottom: 40px;
}

.login-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  color: white;
}

.login-card-header h2 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 8px;
}

.login-card-header p {
  color: var(--text-secondary);
  font-size: 15px;
}

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

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

.form-group input {
  width: 100%;
  padding: 16px 20px;
  font-size: 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.form-group input::placeholder {
  color: var(--text-tertiary);
}

.form-group textarea,
.form-group select {
  width: 100%;
  padding: 16px 20px;
  font-size: 16px;
  font-family: inherit;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.5;
}

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 48px;
}

.form-group select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 12px;
}

.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.form-group textarea::placeholder {
  color: var(--text-tertiary);
}

.field-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-tertiary);
}

.login-hint {
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
  color: var(--text-tertiary);
}

.auth-hint {
  margin: 16px 0;
  text-align: center;
  font-size: 14px;
  color: var(--text-tertiary);
  line-height: 1.5;
}

.code-sent-info {
  margin-bottom: 20px;
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
}

.code-sent-info strong {
  color: var(--primary);
}

.code-actions {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 16px;
}

#verification-code {
  text-align: center;
  font-size: 24px;
  letter-spacing: 8px;
  font-weight: 600;
}

.auth-form.hidden {
  display: none;
}

.auth-switch {
  margin-top: 24px;
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
}

.auth-switch.hidden {
  display: none;
}

.link-btn {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: inherit;
  font-weight: 600;
  padding: 0;
  text-decoration: none;
}

.link-btn:hover {
  text-decoration: underline;
}

.auth-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
  text-align: center;
}

.auth-hint {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 16px;
  line-height: 1.5;
}

.password-input-wrapper {
  position: relative;
}

.password-input-wrapper input {
  width: 100%;
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 4px;
}

.password-toggle:hover {
  color: var(--text-secondary);
}

.password-requirements {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
}

.requirement {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: var(--bg-tertiary);
  border-radius: 12px;
  color: var(--text-tertiary);
}

.requirement.met {
  color: var(--success);
  background: rgba(34, 197, 94, 0.1);
}

.requirement::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}

.requirement.met::before {
  background: var(--success);
  border-color: var(--success);
}

/* ==========================================
   BUTTONS
   ========================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

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

.btn-primary:hover {
  background: var(--primary-hover);
}

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

.btn-ghost:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 16px;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}

.btn-full {
  width: 100%;
}

/* ==========================================
   MAIN APP VIEW (AFTER LOGIN)
   ========================================== */

#main-view {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 50;
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 700;
}

.sidebar-logo svg {
  color: var(--primary);
}

.sidebar-nav {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s;
}

.nav-item:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(59, 130, 246, 0.15);
  color: var(--primary);
}

.nav-item svg {
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 20px;
  padding-bottom: 32px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.user-avatar {
  width: 36px;
  height: 36px;
  min-width: 36px;
  background: var(--bg-tertiary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
}

.user-info span {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  background: var(--bg-primary);
}

.page {
  display: none;
  padding: 40px;
  height: 100%;
}

.page.active {
  display: flex;
  flex-direction: column;
}

#reader-page.page.active {
  padding: 20px;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}

.page-header h1 {
  font-size: 28px;
  font-weight: 700;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-width: 280px;
}

.search-box svg {
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.search-box input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
}

.search-box input::placeholder {
  color: var(--text-tertiary);
}

/* Documents Grid */
.documents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.documents-grid.table-view {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.view-toggle {
  display: flex;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 4px;
  gap: 4px;
}

.view-btn {
  padding: 8px;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-tertiary);
  transition: all 0.2s;
}

.view-btn:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.view-btn.active {
  background: var(--primary);
  color: white;
}

.library-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 16px;
}

.filter-buttons {
  display: flex;
  gap: 8px;
}

.filter-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  background: var(--bg-secondary);
}

.filter-btn.active {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--primary);
  color: var(--primary);
}

.filter-btn.active svg {
  fill: var(--primary);
}

.selection-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
}

.selection-bar span {
  color: var(--primary);
  font-weight: 500;
}

.table-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-tertiary);
}

.table-cell {
  display: flex;
  align-items: center;
  gap: 4px;
}

.table-cell-checkbox { width: 40px; }
.table-cell-fav { width: 40px; }
.table-cell-name { flex: 2; min-width: 200px; }
.table-cell-size { width: 100px; }
.table-cell-progress { width: 120px; }
.table-cell-date { width: 100px; }
.table-cell-time { width: 80px; }
.table-cell-actions { width: 80px; justify-content: flex-end; }

.table-cell.sortable {
  cursor: pointer;
  user-select: none;
}

.table-cell.sortable:hover {
  color: var(--text-primary);
}

.sort-icon::after {
  content: '';
}

.sort-icon.asc::after {
  content: ' ▲';
}

.sort-icon.desc::after {
  content: ' ▼';
}

.table-row {
  display: flex;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s;
}

.table-row:hover {
  background: var(--bg-secondary);
}

.table-row.selected {
  background: rgba(59, 130, 246, 0.1);
}

.table-row .fav-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text-tertiary);
  transition: color 0.2s;
}

.table-row .fav-btn:hover,
.table-row .fav-btn.active {
  color: #FFB800;
}

.table-row .fav-btn.active svg {
  fill: #FFB800;
}

.table-cell-progress {
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-row .progress-bar {
  flex: 1;
  height: 6px;
  min-width: 60px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.table-row .progress-text {
  font-size: 12px;
  color: var(--text-secondary);
  min-width: 35px;
  text-align: right;
  font-weight: 500;
  flex-shrink: 0;
}

.document-card .fav-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text-tertiary);
  transition: color 0.2s;
}

.document-card .fav-btn:hover,
.document-card .fav-btn.active {
  color: #FFB800;
}

.document-card .fav-btn.active svg {
  fill: #FFB800;
}

.document-card {
  position: relative;
}

.document-card .card-checkbox {
  position: absolute;
  top: 12px;
  left: 12px;
}

.document-card.selected {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.05);
}

.document-reading-time {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 8px;
}

.document-last-read {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

.btn-danger {
  background: #dc2626;
  color: white;
  border: none;
}

.btn-danger:hover {
  background: #b91c1c;
}

.empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 40px;
  text-align: center;
  color: var(--text-tertiary);
}

.empty-state svg {
  margin-bottom: 24px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.empty-state p {
  font-size: 15px;
  margin-bottom: 24px;
}

/* Document Card */
.document-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
}

.document-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

.document-icon {
  width: 48px;
  height: 48px;
  background: rgba(59, 130, 246, 0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--primary);
}

.document-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.document-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-tertiary);
}

.document-progress {
  margin-top: 16px;
}

.progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  transition: width 0.3s;
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 32px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.breadcrumb-item:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.breadcrumb-item.active {
  color: var(--text-primary);
  font-weight: 500;
}

.breadcrumb-separator {
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
}

/* Folder Card */
.folder-card {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
}

.folder-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

.folder-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.folder-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.folder-meta {
  font-size: 13px;
  color: var(--text-tertiary);
}

.folder-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  opacity: 0;
  transition: opacity 0.2s;
}

.folder-card:hover .folder-actions {
  opacity: 1;
}

/* Folder Table Row */
.folder-row {
  background: rgba(99, 102, 241, 0.05);
}

.folder-row .table-cell-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

/* Modal Enhancements */
.modal-sm .modal-content {
  max-width: 420px;
}

.modal-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  text-align: center;
}

.modal-header svg {
  color: var(--primary);
}

.modal-header h2 {
  font-size: 20px;
  font-weight: 600;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.modal-actions .btn {
  flex: 1;
}

/* Folder List (Move Modal) */
.folder-list {
  max-height: 300px;
  overflow-y: auto;
  margin: 16px 0;
}

.folder-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  text-align: left;
  transition: background 0.2s;
}

.folder-option:hover:not(.disabled) {
  background: var(--bg-secondary);
}

.folder-option.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.folder-option span:first-of-type {
  flex: 1;
  font-size: 14px;
}

.folder-doc-count {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* Drag and Drop */
.table-row[draggable="true"],
.document-card[draggable="true"] {
  cursor: grab;
}

.table-row.dragging,
.document-card.dragging {
  opacity: 0.5;
}

.folder-row.drag-over,
.folder-card.drag-over {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--primary);
}

/* Context Menu */
.context-menu {
  position: fixed;
  z-index: 1000;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  min-width: 180px;
  padding: 6px 0;
}

.context-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 16px;
  background: none;
  border: none;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.context-menu-item:hover {
  background: var(--bg-tertiary);
}

.context-menu-item.danger {
  color: #ef4444;
}

.context-menu-item.danger:hover {
  background: rgba(239, 68, 68, 0.1);
}

.context-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

/* Upload Zone */
.upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 40px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.05);
}

.upload-zone svg {
  color: var(--text-tertiary);
  margin-bottom: 24px;
}

.upload-zone h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.upload-zone p {
  font-size: 15px;
  color: var(--text-tertiary);
  margin-bottom: 24px;
}

.upload-progress {
  margin-top: 32px;
}

.progress-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
}

.progress-item .filename {
  flex: 1;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.progress-item .progress-bar {
  flex: 2;
}

.progress-text {
  font-size: 14px;
  color: var(--text-secondary);
  min-width: 40px;
  text-align: right;
}

/* Settings */
.settings-content {
  max-width: 640px;
}

.settings-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

.settings-section h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

.setting-item label {
  font-size: 15px;
  color: var(--text-secondary);
}

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

.setting-control input[type="range"] {
  width: 160px;
  accent-color: var(--primary);
}

.setting-control span {
  font-size: 14px;
  color: var(--text-tertiary);
  min-width: 50px;
  text-align: right;
}

.settings-section select {
  padding: 10px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
}

.usage-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 12px;
}

.usage-stats .stat-item {
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
}

.usage-stats .stat-value {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.usage-stats .stat-label {
  font-size: 13px;
  color: var(--text-tertiary);
}

/* Referral Section */
.section-description {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.5;
}

.referral-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.referral-stat {
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
}

.referral-stat-value {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.referral-stat-label {
  font-size: 13px;
  color: var(--text-tertiary);
}

.referral-link-section,
.referral-invite-section {
  margin-bottom: 16px;
}

.referral-link-section label,
.referral-invite-section label,
.invite-history label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.referral-link-row,
.referral-invite-row {
  display: flex;
  gap: 8px;
}

.referral-link-input,
.referral-invite-input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
}

.referral-link-input:focus,
.referral-invite-input:focus {
  outline: none;
  border-color: var(--primary);
}

.referral-link-row .btn,
.referral-invite-row .btn {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.invite-message {
  margin-top: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.invite-message.success {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.invite-message.error {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.invite-history {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.invite-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.invite-email {
  font-size: 14px;
  color: var(--text-primary);
}

.invite-status {
  font-size: 12px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 4px;
}

.invite-status.sent {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.invite-status.accepted {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

/* Settings Forms */
.setting-form {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.setting-input-row {
  display: flex;
  gap: 12px;
  width: 100%;
}

.setting-input-row input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
}

.setting-input-row input:focus {
  outline: none;
  border-color: var(--primary);
}

.password-placeholder {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-tertiary);
  font-size: 14px;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

/* Theme Toggle in Settings */
.setting-control.theme-toggle {
  display: flex;
  gap: 8px;
  width: auto;
  height: auto;
  background: transparent;
  border: none;
  border-radius: 0;
  justify-content: flex-end;
}

.theme-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.theme-btn:hover {
  background: var(--bg-hover);
}

.theme-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* Settings Danger Zone */
.settings-danger {
  border-color: var(--error);
  background: rgba(239, 68, 68, 0.05);
}

.settings-danger h3 {
  color: var(--error);
  border-bottom-color: var(--error);
}

.danger-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.danger-info p {
  font-size: 13px;
  color: var(--text-tertiary);
  margin: 0;
}

.btn-danger {
  background: var(--error);
  color: white;
  border: none;
}

.btn-danger:hover {
  background: #dc2626;
}

/* Delete Warning Modal */
.delete-warning {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid var(--error);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 20px;
}

.delete-warning p {
  margin: 0 0 12px 0;
  color: var(--text-secondary);
}

.delete-warning ul {
  margin: 0;
  padding-left: 20px;
  color: var(--text-tertiary);
}

.delete-warning li {
  margin-bottom: 4px;
}

.modal-header-danger svg {
  color: var(--error);
}

.modal-header-danger h2 {
  color: var(--error);
}

/* Reader */
.reader-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 40px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.reader-header h2 {
  font-size: 18px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reader-content {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 80px);
}

.reader-text {
  flex: 1;
  padding: 40px;
  overflow-y: auto;
  font-family: 'Merriweather', Georgia, serif;
  font-size: 18px;
  line-height: 1.8;
}

/* PDF Viewer */
.pdf-viewer {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  background: var(--bg-tertiary);
  position: relative;
}

.pdf-page-container {
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  background: white;
  margin-bottom: 20px;
}

#pdf-canvas {
  display: block;
}

.text-layer {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  opacity: 0.3;
  line-height: 1.0;
  pointer-events: auto;
}

.text-layer > span {
  color: transparent;
  position: absolute;
  white-space: pre;
  cursor: text;
  transform-origin: 0% 0%;
}

.text-layer > span::selection {
  background: var(--highlight);
}

.text-layer > span.highlight {
  background: var(--highlight);
  opacity: 1;
  border-radius: 2px;
}

.text-layer > span.active-sentence {
  background: rgba(59, 130, 246, 0.5);
  opacity: 1;
  border-radius: 3px;
}

.pdf-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: var(--text-secondary);
}

.pdf-loading.hidden {
  display: none;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.view-toggle {
  display: flex;
  gap: 4px;
  margin-left: 16px;
  background: var(--bg-tertiary);
  padding: 4px;
  border-radius: 8px;
}

.view-toggle-btn {
  padding: 6px 10px !important;
  border-radius: 6px;
  opacity: 0.6;
  transition: all 0.2s;
}

.view-toggle-btn.active {
  background: var(--primary) !important;
  color: white !important;
  opacity: 1;
}

.view-toggle-btn:hover:not(.active) {
  opacity: 0.9;
  background: var(--bg-secondary);
}

.page-navigation {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  font-size: 14px;
  color: var(--text-secondary);
}

.page-navigation .btn-sm {
  padding: 4px 8px;
}

.pdf-page-wrapper {
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  overflow: hidden;
}

.page-indicator {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  pointer-events: none;
}

.reader-content {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.text-reader {
  flex: 1;
  width: 100%;
  overflow: auto;
  background: var(--bg);
  padding: 40px;
  min-height: 0;
}

.text-content {
  max-width: 800px;
  margin: 0 auto;
  font-size: 18px;
  line-height: 1.9;
  color: var(--text);
}

.text-paragraph {
  margin-bottom: 24px;
  text-align: justify;
}

.text-sentence {
  display: inline;
  padding: 2px 4px;
  margin: 0 2px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.text-sentence:hover {
  background: rgba(99, 102, 241, 0.15);
}

.text-sentence.active {
  background: var(--highlight);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
}

.pdf-viewer {
  flex: 1;
  width: 100%;
  overflow: auto;
  background: var(--bg-tertiary);
  position: relative;
  min-height: 0;
}

#pdf-pages-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  gap: 20px;
}

.pdf-page {
  position: relative;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  overflow: hidden;
  min-height: 200px;
}

.pdf-page canvas {
  display: block;
  max-width: 100%;
}

.pdf-text-layer {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: auto;
}

.pdf-text-layer span {
  position: absolute;
  white-space: pre;
  cursor: text;
  color: transparent;
}

.pdf-text-layer span.highlight-active {
  background: rgba(255, 215, 0, 0.5) !important;
  color: transparent;
  border-radius: 2px;
}

.pdf-page-number {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  pointer-events: none;
}

.sentence {
  display: inline;
  padding: 2px 4px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.sentence:hover {
  background: rgba(59, 130, 246, 0.1);
}

.sentence.active {
  background: var(--highlight);
}

.reader-controls {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 24px 40px;
  flex-shrink: 0;
}

.controls-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  max-width: 800px;
  margin: 0 auto;
}

.voice-selector,
.speed-control {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.voice-selector label,
.speed-control label {
  font-size: 12px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.voice-selector select {
  padding: 10px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
}

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

.speed-slider input[type="range"] {
  width: 120px;
  accent-color: var(--primary);
}

.speed-slider span {
  font-size: 14px;
  color: var(--text-secondary);
  min-width: 40px;
}

.playback-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.control-btn {
  width: 48px;
  height: 48px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.control-btn:hover {
  background: var(--border);
  color: var(--text-primary);
}

.play-btn {
  width: 64px;
  height: 64px;
  background: var(--primary);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.play-btn:hover {
  transform: scale(1.05);
  background: var(--primary-hover);
}

#download-offline-btn {
  padding: 8px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  transition: all 0.2s;
  white-space: nowrap;
}

#download-offline-btn:hover:not(:disabled) {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--primary);
}

#download-offline-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

#download-offline-btn svg {
  flex-shrink: 0;
}

.progress-info {
  font-size: 14px;
  color: var(--text-tertiary);
}

.sentence-info {
  font-size: 13px;
  color: var(--text-tertiary);
  white-space: nowrap;
}

/* Spotify-style Progress Bar */
.spotify-progress-container {
  width: 100%;
  padding: 0 40px 16px;
  max-width: 900px;
  margin: 0 auto;
}

.spotify-progress-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.time-display {
  font-size: 12px;
  font-family: 'Inter', monospace;
  color: var(--text-tertiary);
  min-width: 45px;
  text-align: center;
}

#time-total {
  text-align: center;
}

.progress-slider-container {
  flex: 1;
  position: relative;
  height: 20px;
  display: flex;
  align-items: center;
}

.progress-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: transparent;
  cursor: pointer;
  position: absolute;
  z-index: 2;
  margin: 0;
}

.progress-slider::-webkit-slider-runnable-track {
  height: 4px;
  background: transparent;
  border-radius: 2px;
}

.progress-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
  margin-top: -4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.progress-slider-container:hover .progress-slider::-webkit-slider-thumb {
  opacity: 1;
}

.progress-slider::-moz-range-track {
  height: 4px;
  background: transparent;
  border-radius: 2px;
}

.progress-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.progress-slider-container:hover .progress-slider::-moz-range-thumb {
  opacity: 1;
}

.progress-slider-track {
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  overflow: hidden;
  pointer-events: none;
}

.progress-slider-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  width: 0%;
  transition: width 0.1s linear;
}

.progress-slider-container:hover .progress-slider-fill {
  background: #1db954;
}

.skip-btn {
  position: relative;
}

.skip-btn::after {
  content: '10';
  position: absolute;
  font-size: 8px;
  font-weight: 700;
  color: currentColor;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* Toast */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  padding: 16px 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  animation: slideIn 0.3s ease;
}

.toast.success {
  border-color: var(--success);
}

.toast.error {
  border-color: var(--error);
}

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

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 1024px) {
  .app-preview {
    max-width: 500px;
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .steps-grid {
    flex-direction: column;
  }
  
  .step-arrow {
    transform: rotate(90deg);
  }
}

@media (max-width: 768px) {
  .nav-container {
    padding: 12px 20px;
  }
  
  .hero-container {
    padding: 100px 20px 60px;
  }
  
  .hero-content h1 {
    font-size: 36px;
  }
  
  .hero-subtitle {
    font-size: 16px;
  }
  
  .hero-actions {
    flex-direction: column;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: 24px;
  }
  
  .stat-divider {
    display: none;
  }
  
  .features {
    padding: 60px 20px;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .how-it-works {
    padding: 60px 20px;
  }
  
  .cta-section {
    padding: 60px 20px;
  }
  
  .cta-section h2 {
    font-size: 28px;
  }
  
  .sidebar {
    display: none;
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .page {
    padding: 20px;
  }
  
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .search-box {
    width: 100%;
    min-width: auto;
  }
  
  .controls-panel {
    flex-wrap: wrap;
    gap: 24px;
  }
}

/* Legal Footer */
.legal-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 20px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-tertiary);
}

.legal-footer a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.legal-footer a:hover {
  color: var(--primary);
}

.legal-footer span {
  color: var(--text-tertiary);
}

.legal-modal-content {
  max-width: 700px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.legal-modal-nav {
  display: flex;
  gap: 8px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.legal-tab {
  padding: 10px 20px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.legal-tab:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.legal-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

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

.legal-section-content {
  display: none;
}

.legal-section-content.active {
  display: block;
}

.legal-section-content h2 {
  font-size: 22px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.legal-section-content h3 {
  font-size: 16px;
  margin: 24px 0 12px;
  color: var(--primary-light);
}

.legal-section-content p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 12px;
  font-size: 14px;
}

.legal-section-content ul {
  margin-left: 20px;
  margin-bottom: 12px;
}

.legal-section-content li {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 6px;
  font-size: 14px;
}

.legal-section-content .contact-info {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin: 16px 0;
}

.legal-section-content .contact-info p {
  margin-bottom: 4px;
}

.legal-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.legal-modal-footer p {
  color: var(--text-tertiary);
  font-size: 13px;
  margin: 0;
}

/* ==================== COMMUNITY FORUM ==================== */

.forum-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-tabs {
  display: flex;
  gap: 8px;
  background: var(--bg-tertiary);
  padding: 4px;
  border-radius: var(--radius);
}

.filter-tab {
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: calc(var(--radius) - 2px);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.filter-tab:hover {
  color: var(--text-primary);
}

.filter-tab.active {
  background: var(--primary);
  color: white;
}

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

.filter-controls select {
  padding: 8px 36px 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.filter-controls select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.filter-controls select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.forum-posts {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.forum-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-secondary);
  gap: 16px;
}

.forum-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.forum-empty h3 {
  font-size: 18px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.forum-post-card {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
}

.forum-post-card:hover {
  border-color: var(--primary);
  background: var(--bg-tertiary);
}

.post-vote-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 40px;
}

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

.vote-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.vote-btn.active.upvote {
  color: var(--success);
}

.vote-btn.active.downvote {
  color: var(--error);
}

.vote-score {
  font-weight: 600;
  font-size: 16px;
  color: var(--text-primary);
}

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

.post-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.post-title-row h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  color: var(--text-primary);
}

.post-category {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
}

.post-category.bug {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.post-category.feature {
  background: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
}

.post-category.question {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.post-category.tip {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.post-category.feedback {
  background: rgba(249, 115, 22, 0.15);
  color: #f97316;
}

.post-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.post-status.open {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
}

.post-status.in_progress {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.post-status.solved {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.post-excerpt {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-meta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-tertiary);
}

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

/* Post Detail Page */
.post-detail-content {
  max-width: 800px;
  margin: 0 auto;
}

.post-detail-main {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

.post-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.post-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.post-author {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-size: 14px;
  color: var(--text-secondary);
}

.post-date {
  font-size: 12px;
  color: var(--text-tertiary);
}

.post-body {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-primary);
  white-space: pre-wrap;
}

.post-actions {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.vote-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Comments Section */
.comments-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.comments-section h3 {
  font-size: 18px;
  margin-bottom: 20px;
}

.comment-form {
  margin-bottom: 24px;
}

.comment-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 14px;
  resize: vertical;
  margin-bottom: 12px;
}

.comment-form textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.comment-card {
  padding: 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.comment-card.official {
  border-color: var(--primary);
  background: rgba(79, 70, 229, 0.05);
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.comment-author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.official-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  background: var(--primary);
  color: white;
  font-size: 10px;
  font-weight: 600;
  border-radius: 4px;
  text-transform: uppercase;
}

.comment-date {
  font-size: 12px;
  color: var(--text-tertiary);
}

.comment-body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  white-space: pre-wrap;
}

.comment-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.comment-vote-buttons {
  display: flex;
  align-items: center;
  gap: 4px;
}

.comment-vote-btn {
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.comment-vote-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.comment-vote-btn.active.upvote {
  color: var(--success);
}

.comment-vote-btn.active.downvote {
  color: var(--error);
}

.comment-vote-score {
  font-weight: 500;
  font-size: 13px;
  min-width: 20px;
  text-align: center;
}

.comments-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-tertiary);
}

/* Options Menu (Report/Block) */
.post-options-wrapper,
.comment-options-wrapper {
  position: relative;
  margin-left: auto;
}

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

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

.options-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.options-btn.small {
  width: 24px;
  height: 24px;
}

.options-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 100;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  min-width: 160px;
  padding: 6px 0;
}

.options-menu.show {
  display: block;
}

.options-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  background: none;
  border: none;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.options-menu button:hover {
  background: var(--bg-tertiary);
}

.options-menu button svg {
  color: var(--error);
  flex-shrink: 0;
}

/* Report Modal */
.report-modal-content {
  max-width: 480px;
}

.report-modal-content .form-group {
  margin-bottom: 16px;
}

.report-modal-content .form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.report-modal-content .form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 14px;
}

.report-modal-content .form-input:focus {
  outline: none;
  border-color: var(--primary);
}

/* Modal sizes */
.modal-md {
  max-width: 500px;
}

/* Admin status dropdown */
.status-dropdown {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 13px;
  cursor: pointer;
}

/* Admin delete buttons */
.admin-delete-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--error);
  border-radius: var(--radius);
  background: transparent;
  color: var(--error);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.admin-delete-btn:hover {
  background: var(--error);
  color: white;
}

.comment-delete-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  margin-left: auto;
}

.comment-delete-btn:hover {
  background: rgba(255, 82, 82, 0.1);
  color: var(--error);
}

@media (max-width: 768px) {
  .forum-filters {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-controls {
    flex-wrap: wrap;
  }
  
  .filter-controls .search-box {
    flex: 1;
    min-width: 200px;
  }
  
  .post-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .post-author {
    align-items: flex-start;
  }
}

/* Subscription Section */
.subscription-status {
  margin-bottom: 20px;
}

.subscription-loading {
  color: var(--text-secondary);
  font-style: italic;
}

.pricing-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.pricing-card {
  background: var(--bg-tertiary);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

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

.pricing-card.pricing-featured {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.05));
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--success);
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.pricing-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.pricing-price {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 20px;
}

.pricing-price span {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
}

.pricing-features {
  list-style: none;
  margin: 0 0 20px 0;
  padding: 0;
  text-align: left;
}

.pricing-features li {
  padding: 8px 0;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.pricing-features li::before {
  content: '';
  width: 18px;
  height: 18px;
  background: var(--success);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/contain no-repeat;
  flex-shrink: 0;
}

.subscription-active {
  text-align: center;
  padding: 24px;
}

.subscription-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  margin-bottom: 16px;
}

.subscription-badge.premium {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #1a1a1a;
}

.subscription-badge svg {
  stroke: currentColor;
  fill: currentColor;
}

#subscription-details {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.trial-info {
  padding: 16px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--warning);
}

.trial-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--warning);
  font-weight: 600;
}

.trial-badge svg {
  stroke: currentColor;
}

/* Cookie Consent Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  padding: 20px;
  z-index: 10000;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.3s ease-out;
}

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

.cookie-banner.hidden {
  display: none;
}

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

.cookie-text h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.cookie-text p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1.5;
}

.cookie-link {
  color: var(--primary);
  font-size: 14px;
  text-decoration: underline;
}

.cookie-link:hover {
  color: var(--primary-hover);
}

.cookie-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .cookie-content {
    flex-direction: column;
    text-align: center;
  }
  
  .cookie-actions {
    width: 100%;
    flex-direction: column;
  }
  
  .cookie-actions .btn {
    width: 100%;
  }
}

/* Cookie Preferences Link in Footer */
.cookie-preferences-link {
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 14px;
}

.cookie-preferences-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* Footer Links */
.footer-links {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}

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

.footer-links a:hover,
.footer-links span:hover {
  color: var(--primary);
}

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

@media (max-width: 600px) {
  .footer-container {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-links {
    justify-content: center;
  }
}

