/* Global Variables */
:root {
  /* ===== BACKGROUNDS ===== */
  --bg-dark: #0E1117;
  --bg-light: #161B22;
  --bg-tertiary: #1F242C;
  --bg-code: #0D1117;

  /* ===== BORDERS ===== */
  --border-subtle: #1F242C;
  --border-default: #30363D;
  --border-emphasis: #3EA8FF;

  /* ===== TEXT ===== */
  --text-light: #E6EDF3;
  --text-secondary: #6A7380;
  --text-tertiary: #484F58;
  --text-code: #CDE7FF;

  /* ===== BRAND COLORS ===== */
  --accent: #3EA8FF;
  --color-primary: #3EA8FF;
  --color-secondary: #2ED3C6;
  --link-color: #3EA8FF;
  --link-hover: #5BB8FF;

  /* ===== SEMANTIC COLORS ===== */
  --color-success: #10B981;
  --color-success-bg: rgba(16, 185, 129, 0.1);
  --color-success-border: rgba(16, 185, 129, 0.3);

  --color-warning: #F59E0B;
  --color-warning-bg: rgba(245, 158, 11, 0.1);
  --color-warning-border: rgba(245, 158, 11, 0.3);

  --color-error: #EF4444;
  --color-error-bg: rgba(239, 68, 68, 0.1);
  --color-error-border: rgba(239, 68, 68, 0.3);

  --color-info: #3EA8FF;
  --color-info-bg: rgba(62, 168, 255, 0.1);
  --color-info-border: rgba(62, 168, 255, 0.3);

  /* ===== TRANSPARENCIES ===== */
  --primary-alpha-10: rgba(62, 168, 255, 0.1);
  --primary-alpha-20: rgba(62, 168, 255, 0.2);
  --primary-alpha-30: rgba(62, 168, 255, 0.3);
  --secondary-alpha-10: rgba(46, 211, 198, 0.1);
  --secondary-alpha-20: rgba(46, 211, 198, 0.2);

  /* ===== GRADIENTS ===== */
  --gradient-primary: linear-gradient(135deg, #3EA8FF 0%, #2ED3C6 100%);
  --gradient-accent: linear-gradient(135deg,
      rgba(62, 168, 255, 0.28) 0%,
      rgba(46, 211, 198, 0.28) 100%);

  /* ===== SHADOWS ===== */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.5);
  --shadow-primary: 0 8px 16px rgba(62, 168, 255, 0.3);
  --shadow-secondary: 0 8px 16px rgba(46, 211, 198, 0.3);
}

/* Light theme variables */
[data-theme="light"] {
  --bg-dark: #FFFFFF;
  --bg-light: #F6F8FA;
  --bg-tertiary: #EAEEF2;
  --bg-code: #F6F8FA;

  --border-subtle: #D0D7DE;
  --border-default: #D0D7DE;
  --border-emphasis: #3EA8FF;

  --text-light: #1F2328;
  --text-secondary: #656D76;
  --text-tertiary: #8C959F;
  --text-code: #0550AE;

  --accent: #3EA8FF;
  --color-primary: #3EA8FF;
  --color-secondary: #2ED3C6;
  --link-color: #0288d1;
  --link-hover: #0277bd;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* Theme toggle button */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 1.2em;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 188, 212, 0.3);
  transition: all 0.3s ease;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 188, 212, 0.4);
}

* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  background-color: var(--bg-dark);
  color: var(--text-light);
  /* Smooth transitions for theme changes */
  transition: background-color 0.3s ease, color 0.3s ease;
}

header {
  background-color: var(--bg-light);
  color: var(--text-light);
  padding: 30px 40px;
  border-bottom: 1px solid #444;
  text-align: center;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

[data-theme="light"] header {
  border-bottom-color: #ddd;
}

header h1 {
  margin: 0;
  color: var(--accent);
  font-size: 2em;
}

.store-links {
  margin-top: 20px;
  text-align: center;
}

.store-links img {
  height: 45px;
  margin-right: 16px;
}

.topnav {
  background: var(--bg-light);
  padding: 12px 40px;
  border-bottom: 1px solid #333;
  text-align: center;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

[data-theme="light"] .topnav {
  border-bottom-color: #ddd;
}

.topnav a {
  color: var(--link-color);
  text-decoration: none;
  margin: 0 16px;
  font-weight: bold;
  /* Smooth hover transitions */
  transition: color 0.2s ease, text-shadow 0.2s ease;
  padding: 8px 12px;
  border-radius: 6px;
}

.topnav a:hover {
  text-decoration: underline;
  color: var(--link-hover);
  /* Subtle glow effect */
  text-shadow: 0 0 8px rgba(129, 212, 250, 0.3);
}

.container {
  display: flex;
  flex-direction: row;
  min-height: 100vh;
}

aside {
  width: 250px;
  background: var(--bg-light);
  border-right: 1px solid #333;
  padding: 20px;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

[data-theme="light"] aside {
  border-right-color: #ddd;
}

aside h2 {
  color: var(--accent);
  font-size: 1.2em;
  margin-bottom: 12px;
}

aside a {
  display: block;
  color: var(--text-light);
  margin: 8px 0;
  text-decoration: none;
  /* Smooth transitions for sidebar links */
  transition: color 0.2s ease, padding-left 0.2s ease, background-color 0.2s ease;
  padding: 6px 12px;
  border-radius: 4px;
}

aside a:hover {
  text-decoration: underline;
  color: var(--link-hover);
  /* Slide effect and background highlight */
  padding-left: 20px;
  background-color: rgba(79, 195, 247, 0.1);
}

main {
  flex: 1;
  padding: 40px;
  max-width: 900px;
  margin: 0 auto;
}

main h2 {
  color: var(--accent);
  border-bottom: 2px solid #444;
  padding-bottom: 8px;
  margin-top: 40px;
  transition: border-color 0.3s ease;
}

[data-theme="light"] main h2 {
  border-bottom-color: #ddd;
}

.card {
  background: var(--bg-light);
  border-radius: 14px;
  padding: 28px;
  border: 1px solid rgba(0, 188, 212, 0.25);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  transition: transform 0.3s ease, box-shadow 0.3s ease,
    border-color 0.3s ease, background-color 0.3s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.4);
  border-color: rgba(0, 188, 212, 0.45);
}

[data-theme="light"] .card {
  background: var(--bg-light);
  border: 1px solid rgba(0, 188, 212, 0.3);
  box-shadow: 0 14px 32px rgba(0, 188, 212, 0.14);
}

.card--accent {
  background: linear-gradient(135deg,
      rgba(0, 188, 212, 0.28),
      rgba(0, 188, 212, 0.08));
  border-color: rgba(0, 188, 212, 0.55);
  color: var(--text-light);
}

[data-theme="light"] .card--accent {
  background: linear-gradient(135deg,
      rgba(0, 188, 212, 0.2),
      rgba(0, 188, 212, 0.05));
}

.card--centered {
  text-align: center;
}

.card--compact {
  padding: 20px;
}

.card--border-accent {
  border-left: 5px solid var(--accent);
}

.card .card-title {
  margin-top: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.card--accent .card-title {
  color: var(--text-light);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.card-lede {
  font-size: 1.15em;
  font-weight: 500;
  margin-bottom: 0;
}

.card--accent .card-lede {
  color: var(--text-light);
  opacity: 0.95;
}

.badge-row {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.pill-group {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}

.card-subtitle {
  margin-top: 0;
}

.card-highlight {
  color: var(--accent);
  font-weight: 700;
}

.note {
  background: rgba(0, 188, 212, 0.12);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 16px;
  margin-top: 20px;
}

[data-theme="light"] .note {
  background: rgba(0, 188, 212, 0.1);
}

.code-block {
  background: var(--bg-dark);
  border: 1px solid rgba(0, 188, 212, 0.25);
  border-radius: 10px;
  padding: 16px;
  margin: 12px 0;
  overflow-x: auto;
}

[data-theme="light"] .code-block {
  background: #f0f8fa;
  border-color: rgba(0, 188, 212, 0.3);
}

.code-block code {
  display: block;
  color: var(--text-light);
  font-family: 'Courier New', Courier, monospace;
  line-height: 1.6;
  white-space: pre-line;
}

[data-theme="light"] .code-block code {
  color: #0f2a30;
}

.card code {
  color: var(--accent);
  font-family: 'Courier New', Courier, monospace;
  font-weight: 600;
}

.badge {
  display: inline-block;
  background: rgba(0, 188, 212, 0.18);
  color: var(--accent);
  border: 1px solid rgba(0, 188, 212, 0.4);
  font-size: 0.7em;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

[data-theme="light"] .badge {
  background: rgba(0, 188, 212, 0.15);
  color: #006d7a;
  border-color: rgba(0, 188, 212, 0.35);
}

.badge--small {
  font-size: 0.65em;
  padding: 2px 8px;
}

.feature-badge {
  display: inline-block;
  background: rgba(0, 188, 212, 0.18);
  color: var(--text-light);
  border: 1px solid rgba(0, 188, 212, 0.35);
  padding: 8px 16px;
  border-radius: 22px;
  font-weight: 600;
  transition: transform 0.2s ease, background-color 0.3s ease,
    border-color 0.3s ease;
}

.feature-badge:hover {
  transform: scale(1.05);
  background: rgba(0, 188, 212, 0.3);
  border-color: rgba(0, 188, 212, 0.5);
}

.feature-card {
  background: rgba(0, 188, 212, 0.12);
  border: 1px solid rgba(0, 188, 212, 0.35);
  border-radius: 12px;
  padding: 24px;
  transition: transform 0.2s ease, background-color 0.3s ease,
    border-color 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  background: rgba(0, 188, 212, 0.2);
  border-color: rgba(0, 188, 212, 0.5);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .feature-card {
  background: rgba(0, 188, 212, 0.1);
  border-color: rgba(0, 188, 212, 0.3);
}

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

.pill {
  display: inline-block;
  background: rgba(0, 188, 212, 0.18);
  color: var(--text-light);
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid rgba(0, 188, 212, 0.4);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

[data-theme="light"] .pill {
  color: #005562;
  background: rgba(0, 188, 212, 0.15);
  border-color: rgba(0, 188, 212, 0.35);
}

.button {
  display: inline-block;
  background: var(--accent);
  color: #0a1f24;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.3s ease,
    background-color 0.3s ease, color 0.3s ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 188, 212, 0.35);
  background: var(--link-hover);
  color: #ffffff;
}

[data-theme="dark"] .button {
  color: #0a1f24;
}

[data-theme="light"] .button {
  color: #0a1f24;
}

.screenshot {
  margin: 20px 0;
  border: 1px solid #333;
  background: #1c1c1c;
  padding: 8px;
  border-radius: 6px;
  /* Smooth hover effects for screenshots */
  transition: transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    background-color 0.3s ease;
}

/* Warm Accent Utilities */
.text-warm {
  color: var(--color-warning);
}

.bg-warm {
  background-color: var(--color-warning-bg);
}

.border-warm {
  border-color: var(--color-warning-border);
}

.badge--warm {
  background-color: var(--color-warning-bg);
  color: var(--color-warning);
  border: 1px solid var(--color-warning-border);
}

/* Pro Tip Card */
.card--tip {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%);
  border-left: 4px solid var(--color-warning);
}

.card--tip .card-title {
  color: var(--color-warning);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card--tip .card-title::before {
  content: "💡";
}

[data-theme="light"] .screenshot {
  background: #f9f9f9;
  border-color: #ddd;
}

.screenshot:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 188, 212, 0.2);
  border-color: var(--accent);
}

.screenshot img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  display: block;
  margin: 0 auto;
}

footer {
  text-align: center;
  padding: 20px;
  font-size: 0.9em;
  color: #888;
  border-top: 1px solid #333;
  background-color: var(--bg-light);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

[data-theme="light"] footer {
  border-top-color: #ddd;
  color: #666;
}

a {
  color: var(--link-color);
  text-decoration: none;
  /* Smooth transitions for all links */
  transition: color 0.2s ease;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }

  aside {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #333;
    transition: border-color 0.3s ease;
  }

  [data-theme="light"] aside {
    border-bottom-color: #ddd;
  }

  main {
    padding: 20px;
  }
}