/* WhisperTyping Docs - Premium Modern Style */

:root {
  /* Primary brand colors - WhisperTyping palette (saturated) */
  --color-coral: #E94E3D;
  --color-magenta: #C4198A;

  /* Gradients */
  --gradient-hero: linear-gradient(135deg, var(--color-coral) 0%, var(--color-magenta) 100%);
  --gradient-accent: linear-gradient(135deg, var(--color-coral) 0%, var(--color-magenta) 100%);

  /* Text colors */
  --color-text: #1a1a2e;
  --color-text-light: #555566;
  --color-text-muted: #888899;

  /* Backgrounds */
  --color-bg: #ffffff;
  --color-bg-alt: #f8f7fa;
  --color-bg-card: #ffffff;

  /* Borders */
  --color-border: #e8e6ee;
  --color-border-light: #f0eef4;

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;

  /* Layout */
  --max-width: 1000px;
  --content-width: 800px;
  --spacing: 1.5rem;
  --radius: 5px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(186, 51, 146, 0.06);
  --shadow-md: 0 4px 20px rgba(186, 51, 146, 0.08);
  --shadow-lg: 0 8px 40px rgba(186, 51, 146, 0.12);
  --shadow-card: 0 2px 12px rgba(186, 51, 146, 0.05);
  --shadow-card-hover: 0 8px 30px rgba(186, 51, 146, 0.12);
}

/* Load Inter font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* Load Font Awesome */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   Header - Dark gradient like homepage
   ======================================== */
.header {
  background: var(--gradient-hero);
  padding: 1rem var(--spacing);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  max-width: calc(var(--max-width) - var(--spacing) * 2);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  color: white;
  font-size: 1.2rem;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 0.2s;
}

.logo:hover {
  opacity: 0.9;
}

.logo-img {
  height: 34px;
  width: auto;
}

.logo-text {
  font-weight: 700;
  font-size: 1.1rem;
}

.logo-docs {
  opacity: 0.85;
  font-weight: 500;
  font-size: 1.1rem;
}

.nav {
  display: flex;
  gap: 2rem;
}

.nav a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav a:hover {
  color: rgba(255, 255, 255, 1);
}

/* ========================================
   Hero Section - Purple gradient background
   ======================================== */
.hero-section {
  background: var(--gradient-hero);
  padding: 4rem var(--spacing) 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(139, 58, 158, 0.3) 0%, transparent 70%);
  pointer-events: none;
}

.hero-section h1 {
  font-size: 3.5rem;
  font-weight: 800;
  color: white;
  margin-bottom: 1rem;
  position: relative;
  letter-spacing: -0.02em;
}

.hero-section p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

/* Simple hero for non-homepage */
.hero {
  text-align: center;
  padding: 3rem 0;
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: 2.75rem;
  font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.hero p {
  color: var(--color-text-light);
  font-size: 1.15rem;
}

/* ========================================
   Main Content
   ======================================== */
main {
  flex: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing) var(--spacing);
  width: 100%;
}

/* For full-width hero pages */
main.full-width {
  max-width: none;
  padding: 0;
}

main.full-width .content-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem var(--spacing);
}

/* ========================================
   Cards Grid - Modern rounded cards
   ======================================== */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
}

@media (max-width: 900px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .cards {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-card);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(186, 51, 146, 0.2);
}

.card h3 {
  color: var(--color-magenta);
  margin-bottom: 0.75rem;
  font-size: 1.15rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.card h3 svg {
  color: var(--color-magenta);
}

.card h3 i {
  color: var(--color-magenta);
  font-size: 1rem;
}

.card:hover h3,
.card:hover p {
  text-decoration: none;
}

.card p {
  color: var(--color-text-light);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ========================================
   Page Header with Breadcrumb
   ======================================== */
.page-header {
  margin-top: 1.5rem;
  margin-bottom: 2.5rem;
}

.page-header h1 {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.25rem;
  letter-spacing: -0.01em;
}

.page-header .breadcrumb {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.page-header .breadcrumb a {
  color: var(--color-magenta);
  text-decoration: none;
  font-weight: 500;
}

.page-header .breadcrumb a:hover {
  text-decoration: underline;
}

/* ========================================
   Content Styling
   ======================================== */
.content {
  max-width: var(--content-width);
}

.content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.content h2:first-child {
  margin-top: 0;
}

.content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
  color: var(--color-text);
}

.content h4 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
  color: var(--color-text);
}

.content p {
  margin-bottom: 1rem;
  color: var(--color-text);
}

.content ul, .content ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.content li {
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.content a {
  color: var(--color-magenta);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.content a:hover {
  text-decoration: underline;
}

.content strong {
  font-weight: 600;
  color: var(--color-text);
}

.content code {
  background: var(--color-bg-alt);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius);
  font-size: 0.875em;
  font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
  color: var(--color-magenta);
}

.content pre {
  background: var(--color-bg-alt);
  padding: 1.25rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--color-border);
}

.content pre code {
  background: none;
  padding: 0;
  color: var(--color-text);
}

.content blockquote {
  border-left: 4px solid var(--color-magenta);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--color-bg-alt);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--color-text-light);
}

.content blockquote p:last-child {
  margin-bottom: 0;
}

/* ========================================
   Intro Section
   ======================================== */
.intro {
  font-size: 1.1rem;
  color: var(--color-text-light);
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--color-border);
}

.intro p {
  color: var(--color-text-light);
}

/* ========================================
   Feature Boxes / Tips
   ======================================== */
.tip, .feature-box {
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--color-border-light);
}

.tip h4, .feature-box h4 {
  color: var(--color-magenta);
  margin: 0 0 0.5rem 0;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tip h4 i, .feature-box h4 i {
  font-size: 0.9rem;
}

.tip p, .feature-box p {
  margin-bottom: 0;
  color: var(--color-text-light);
}

/* ========================================
   Tables - Modern styled
   ======================================== */
.table-container {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th {
  background: var(--color-bg-alt);
  font-weight: 600;
  text-align: left;
  padding: 0.875rem 1rem;
  color: var(--color-text);
  border-bottom: 2px solid var(--color-border);
}

td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--color-border-light);
  color: var(--color-text);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: rgba(186, 51, 146, 0.02);
}

/* ========================================
   Mode Cards - For AI Modes section
   ======================================== */
.mode-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  transition: all 0.2s ease;
}

.mode-card:hover {
  border-color: rgba(186, 51, 146, 0.2);
  box-shadow: var(--shadow-sm);
}

.mode-card h4 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1rem 0;
  font-size: 1.15rem;
  color: var(--color-magenta);
}

.mode-card .trigger {
  background: var(--gradient-accent);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 600;
}

.mode-card p {
  margin-bottom: 0.75rem;
}

.mode-card .example {
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  border-left: 3px solid var(--color-magenta);
}

.mode-card .example strong {
  color: var(--color-magenta);
}

/* ========================================
   Settings Section
   ======================================== */
.settings-group {
  margin-bottom: 2rem;
}

.settings-group h4 {
  color: var(--color-magenta);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-border);
}

.settings-group .setting-intro {
  color: var(--color-text-light);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.setting-item {
  display: flex;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border-light);
}

.setting-item:last-child {
  border-bottom: none;
}

.setting-name {
  font-weight: 600;
  min-width: 200px;
  color: var(--color-text);
}

.setting-desc {
  color: var(--color-text-light);
}

/* ========================================
   Changelog - Premium styled
   ======================================== */
.changelog-entry {
  margin-bottom: 2rem;
  padding: 1.75rem;
  background: var(--color-bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  transition: all 0.2s ease;
}

.changelog-entry:hover {
  border-color: rgba(186, 51, 146, 0.15);
  box-shadow: var(--shadow-md);
}

.changelog-entry h3 {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.changelog-entry .version {
  background: var(--gradient-accent);
  color: white;
  padding: 0.4rem 1rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 8px rgba(186, 51, 146, 0.25);
}

.changelog-entry .date {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.changelog-entry ul {
  margin: 0.75rem 0 0 0;
  padding-left: 1.25rem;
}

.changelog-entry li {
  margin-bottom: 0.4rem;
  color: var(--color-text);
}

.changelog-entry p {
  margin-bottom: 0.5rem;
}

.changelog-entry p strong {
  color: var(--color-magenta);
}

/* ========================================
   Contact Box
   ======================================== */
.contact-box {
  background: linear-gradient(135deg, rgba(227, 117, 104, 0.04) 0%, rgba(186, 51, 146, 0.04) 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem;
  margin: 2.5rem 0;
  text-align: center;
}

.contact-box h3 {
  margin-bottom: 0.75rem;
  color: var(--color-magenta);
  font-weight: 600;
}

.contact-box p {
  margin-bottom: 0;
  color: var(--color-text-light);
}

.contact-box a {
  color: var(--color-magenta);
  text-decoration: none;
  font-weight: 600;
}

.contact-box a:hover {
  text-decoration: underline;
}

/* ========================================
   Sitemap
   ======================================== */
.sitemap-section {
  margin-bottom: 2.5rem;
}

.sitemap-section h2 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--color-magenta);
  font-size: 1.25rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-border);
}

.sitemap-section h2 i {
  font-size: 1rem;
}

.sitemap-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sitemap-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--color-border-light);
}

.sitemap-list li:last-child {
  border-bottom: none;
}

.sitemap-list a {
  color: var(--color-magenta);
  text-decoration: none;
  font-weight: 500;
}

.sitemap-list a:hover {
  text-decoration: underline;
}

/* ========================================
   Callout Boxes
   ======================================== */
.callout {
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  margin: 1.5rem 0;
}

.callout.info {
  background: rgba(186, 51, 146, 0.05);
  border-left: 4px solid var(--color-magenta);
}

.callout.tip {
  background: rgba(186, 51, 146, 0.05);
  border-left: 4px solid var(--color-magenta);
}

.callout.warning {
  background: rgba(227, 117, 104, 0.05);
  border-left: 4px solid var(--color-coral);
}

.callout p {
  margin: 0;
}

/* ========================================
   Keyboard Shortcuts
   ======================================== */
kbd {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.2rem 0.5rem;
  font-size: 0.85em;
  font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
  box-shadow: 0 2px 0 var(--color-border);
  color: var(--color-text);
}

/* ========================================
   Pills / Badges
   ======================================== */
.pill {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 600;
}

.pill.yes {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
}

.pill.no {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.pill.new {
  background: var(--gradient-accent);
  color: white;
}

/* ========================================
   Footer
   ======================================== */
.footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  padding: 2rem var(--spacing);
  margin-top: auto;
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-left a,
.footer-right a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.footer-left a:hover,
.footer-right a:hover {
  color: var(--color-magenta);
}

.footer-right {
  display: flex;
  gap: 1.5rem;
}

/* ========================================
   Subpage Links
   ======================================== */
.subpage-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.subpage-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
  transition: all 0.2s ease;
}

.subpage-link:hover {
  border-color: var(--color-magenta);
  color: var(--color-magenta);
  box-shadow: var(--shadow-sm);
}

.subpage-link svg {
  width: 18px;
  height: 18px;
}

/* ========================================
   Section Divider
   ======================================== */
.section-divider {
  height: 1px;
  background: var(--color-border);
  margin: 2.5rem 0;
}

/* Never have two dividers in a row */
.section-divider + .section-divider {
  display: none;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 1rem;
  }

  .nav {
    gap: 1.25rem;
  }

  .hero-section {
    padding: 3rem var(--spacing) 4rem;
  }

  .hero-section h1 {
    font-size: 2.5rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .page-header h1 {
    font-size: 1.75rem;
  }

  .content h2 {
    font-size: 1.35rem;
  }

  .setting-item {
    flex-direction: column;
    gap: 0.25rem;
  }

  .setting-name {
    min-width: auto;
  }

  .footer-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .footer-right {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  :root {
    --spacing: 1rem;
  }

  .hero-section h1 {
    font-size: 2rem;
  }

  .hero-section p {
    font-size: 1.1rem;
  }

  .changelog-entry {
    padding: 1.25rem;
  }

  .mode-card {
    padding: 1.25rem;
  }
}
