/* Terminal-style theme inspired by kyon.dev */
:root {
  --bg-color: #0a0a0a;
  --text-color: #e0e0e0;
  --accent-color: #ffffff;
  --header-bg: linear-gradient(180deg, #1a1a1a 0%, #0a0a0a 100%);
  --border-color: #333;
  --link-color: #aaa;
  --link-hover: #fff;
}

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

body {
  background: var(--bg-color);
  color: var(--text-color);
  font-family: "JetBrains Mono", monospace;
  font-weight: 500;
  line-height: 1.2;
  min-height: 100vh;
  font-size: 14px;
}

/* Starfield background */
.stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.star {
  position: absolute;
  background: white;
  border-radius: 50%;
  animation: twinkle 3s infinite ease-in-out;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* Header with starry background */
.terminal-header {
  background: var(--header-bg);
  position: relative;
  padding: 2rem 0 1rem;
  overflow: hidden;
}

.stars {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(2px 2px at 20px 30px, #fff, transparent),
    radial-gradient(2px 2px at 40px 70px, #fff, transparent),
    radial-gradient(1px 1px at 90px 40px, #fff, transparent),
    radial-gradient(1px 1px at 130px 80px, #fff, transparent),
    radial-gradient(2px 2px at 160px 30px, #fff, transparent);
  background-repeat: repeat;
  background-size: 200px 100px;
  animation: sparkle 3s linear infinite;
}

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

.header-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px solid var(--accent-color);
  object-fit: cover;
}

.header-text h1 {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  letter-spacing: 2px;
}

.tagline {
  font-size: 1.2rem;
  opacity: 0.8;
}

/* Main content */
.terminal-main {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.section {
  margin-bottom: 3rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.section-content {
  margin-left: 0;
  line-height: 1.8;
}

/* File tree styling */
.file-tree {
  font-family: "JetBrains Mono", monospace;
  margin: 1rem 0;
}

.tree-item {
  padding: 0.2rem 0;
  margin-left: 1rem;
}

.tree-item a {
  color: var(--link-color);
  text-decoration: underline;
  transition: color 0.2s ease;
}

.tree-item a:hover {
  color: var(--link-hover);
}

.tree-branch {
  color: #666;
}

/* Links */
a {
  color: var(--link-color) !important;
  text-decoration: underline;
}

a:hover {
  color: var(--link-hover) !important;
}

a:visited {
  color: #888 !important;
}

/* Responsive */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    text-align: center;
  }
  
  .header-text h1 {
    font-size: 2rem;
  }
  
  .avatar {
    width: 80px;
    height: 80px;
  }
  
  .terminal-main {
    padding: 2rem 1rem;
  }
}

/* Terminal cursor animation */
.cursor::after {
  content: '█';
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* Container and layout */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px;
  position: relative;
}

/* Page header */
.page-header {
  margin-bottom: 40px;
}

.breadcrumb {
  font-size: 12px;
  color: #666;
  margin-bottom: 10px;
}

.breadcrumb a {
  color: #aaa;
  text-decoration: none;
}

.breadcrumb a:hover {
  color: #fff;
}

.current {
  color: #fff;
}

.page-title {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 4px;
  margin-bottom: 10px;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.page-subtitle {
  font-size: 14px;
  color: #aaa;
  letter-spacing: 1px;
}

/* Content sections */
.content-section {
  margin-bottom: 40px;
  background: #111;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 20px;
}

.section-header {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 20px;
  color: #fff;
  text-transform: uppercase;
  border-bottom: 1px solid #333;
  padding-bottom: 10px;
}

/* Long-form content pages (foundation, docs) - larger, more readable text */
.terminal-content {
  font-size: 15px;
  line-height: 1.7;
}

.terminal-content p {
  margin-bottom: 16px;
}

.terminal-content li {
  margin-bottom: 8px;
}

/* Enhanced blockquotes - solid background */
.terminal-content blockquote {
  background: #1a1a1a;
  border-left: 3px solid #666;
  padding: 16px 20px;
  margin: 20px 0;
  border-radius: 0 4px 4px 0;
  font-style: italic;
  color: #ccc;
}

/* Special callout styling - solid background */
.callout {
  background: #1a1a1a;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 20px;
  margin: 24px 0;
}

/* Highlighted sections like "Rational dose:" - solid background */
.terminal-content h3 {
  background: #222;
  border-left: 3px solid #888;
  padding: 12px 16px;
  margin: 20px 0 16px 0;
  border-radius: 0 4px 4px 0;
  font-size: 1.1em;
  color: #fff;
}

/* Proper nested list indentation */
.terminal-content ul {
  margin: 16px 0;
  padding-left: 0;
}

.terminal-content ul li {
  margin-bottom: 8px;
  padding-left: 20px;
  position: relative;
}

.terminal-content ul li:before {
  content: "•";
  color: #666;
  position: absolute;
  left: 0;
}

.terminal-content ul ul {
  margin: 8px 0;
  padding-left: 20px;
}

.terminal-content ul ul li:before {
  content: "◦";
  color: #555;
}

/* Terminal table */
.terminal-table table {
  width: 100%;
  border-collapse: collapse;
  font-family: "JetBrains Mono", monospace;
}

.terminal-table th,
.terminal-table td {
  padding: 8px 12px;
  text-align: left;
  border: 1px solid #333;
}

.terminal-table th {
  background: #222;
  font-weight: 700;
  color: #fff;
}

.terminal-table td {
  background: #111;
}

.rest-day td {
  color: #888;
  font-style: italic;
}

.assessment-day td {
  color: #ff6b6b;
  font-weight: 600;
}

/* Workout log */
.workout-log {
  background: #0a0a0a;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 15px;
}

.log-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 12px;
}

.prompt {
  color: #aaa;
}

.log-input {
  background: #222;
  border: 1px solid #333;
  border-radius: 3px;
  padding: 4px 8px;
  color: #e0e0e0;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  width: 120px;
}

/* Exercise list */
.exercise-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.exercise {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #222;
}

.exercise:last-child {
  border-bottom: none;
}

.exercise-name {
  flex: 1;
  font-size: 13px;
  color: #e0e0e0;
}

.optional .exercise-name {
  color: #aaa;
  font-style: italic;
}

.superset .exercise-name {
  color: #ffcc00;
  margin-left: 20px;
}

.exercise-note {
  font-size: 11px;
  color: #666;
  margin-left: 20px;
  margin-top: 2px;
}

.log-fields {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.log-fields input {
  background: #222;
  border: 1px solid #333;
  border-radius: 3px;
  padding: 4px 6px;
  color: #e0e0e0;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  width: 65px;
  text-align: center;
  -moz-appearance: textfield; /* Firefox */
}

/* Hide Chrome/Safari number input spinners */
.log-fields input::-webkit-outer-spin-button,
.log-fields input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.note {
  font-size: 10px;
  color: #888;
  font-style: italic;
}

/* Notes section */
.notes-section {
  margin-top: 20px;
}

.notes-label {
  font-size: 12px;
  color: #aaa;
  display: block;
  margin-bottom: 5px;
}

.notes-input {
  width: 100%;
  background: #222;
  border: 1px solid #333;
  border-radius: 3px;
  padding: 8px;
  color: #e0e0e0;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  resize: vertical;
  min-height: 60px;
}

/* Workout variations */
.workout-variation {
  margin-bottom: 30px;
  padding: 15px;
  background: rgba(34, 34, 34, 0.3);
  border-radius: 6px;
  border-left: 3px solid #666;
}

.variation-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Philosophy notes */
.philosophy-note {
  background: rgba(34, 34, 34, 0.5);
  border-radius: 6px;
  padding: 20px;
  margin: 20px 0;
}

.philosophy-note blockquote {
  font-style: italic;
  color: #ccc;
  border-left: 3px solid #666;
  padding-left: 15px;
  margin-bottom: 15px;
}

.alternating-pattern {
  margin-top: 15px;
}

.alternating-pattern ol {
  margin: 10px 0 10px 20px;
}

.alternating-pattern li {
  margin: 5px 0;
  color: #e0e0e0;
}

.pattern-note {
  font-size: 12px;
  color: #aaa;
  font-style: italic;
  margin-top: 10px;
}

/* Guidelines */
.guidelines {
  background: rgba(34, 34, 34, 0.3);
  border-radius: 6px;
  padding: 20px;
}

.guideline-list {
  list-style: none;
  margin-bottom: 20px;
}

.guideline-list li {
  padding: 5px 0;
  color: #e0e0e0;
}

.guideline-list li::before {
  content: "• ";
  color: #666;
  margin-right: 10px;
}

.mentzer-quote {
  text-align: center;
  margin-top: 20px;
}

.mentzer-quote blockquote {
  font-style: italic;
  color: #fff;
  font-size: 14px;
  letter-spacing: 1px;
}

/* Recovery log */
.recovery-log {
  background: rgba(34, 34, 34, 0.3);
  border-radius: 6px;
  padding: 20px;
}

.recovery-fields {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field-group label {
  font-size: 12px;
  color: #aaa;
}

.recovery-input {
  background: #222;
  border: 1px solid #333;
  border-radius: 3px;
  padding: 6px 10px;
  color: #e0e0e0;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  width: 150px;
}

.recovery-note {
  font-size: 12px;
  color: #888;
  font-style: italic;
}

/* Actions */
.actions {
  display: flex;
  gap: 15px;
  margin-top: 40px;
  justify-content: center;
}

.action-button {
  background: #222;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 10px 20px;
  color: #e0e0e0;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s ease;
}

.action-button:hover {
  background: #333;
  border-color: #666;
  color: #fff;
}

/* Command Palette */
.command-palette {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10001;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 100px;
}

.command-palette.hidden {
  display: none;
}

.palette-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.palette-container {
  position: relative;
  background: #0a0a0a;
  border: 2px solid #333;
  border-radius: 8px;
  width: 90%;
  max-width: 600px;
  max-height: 70vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
}

.palette-header {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #333;
  background: #111;
}

.palette-prompt {
  color: #aaa;
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  margin-right: 10px;
}

.palette-input {
  flex: 1;
  background: none;
  border: none;
  color: #e0e0e0;
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  outline: none;
}

.palette-close {
  background: none;
  border: none;
  color: #666;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
}

.palette-close:hover {
  color: #e0e0e0;
}

.palette-results {
  max-height: 400px;
  overflow-y: auto;
  padding: 10px 0;
}

.result-section {
  margin-bottom: 20px;
}

.section-title {
  font-size: 12px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0 20px 10px;
  border-bottom: 1px solid #222;
  margin-bottom: 10px;
}

.result-item {
  display: flex;
  align-items: center;
  padding: 8px 20px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.result-item:hover {
  background: #222;
}

.result-icon {
  margin-right: 12px;
  font-size: 16px;
}

.result-text {
  flex: 1;
  font-size: 14px;
  color: #e0e0e0;
}

.result-shortcut {
  font-size: 12px;
  color: #666;
  font-family: "JetBrains Mono", monospace;
}

/* Search Overlay */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(2px);
}

.search-overlay.hidden {
  display: none;
}

.search-container {
  padding: 20px;
  border-bottom: 1px solid #333;
}

.search-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "JetBrains Mono", monospace;
}

.search-prompt {
  color: #ffcc00;
  font-size: 18px;
  font-weight: bold;
}

.search-input {
  flex: 1;
  background: none;
  border: none;
  color: #e0e0e0;
  font-family: "JetBrains Mono", monospace;
  font-size: 16px;
  outline: none;
}

.search-help {
  font-size: 12px;
  color: #666;
}

.search-results {
  padding: 20px;
  color: #aaa;
}

/* Interface Demo Styles */
.interface-demo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.demo-section {
  background: rgba(34, 34, 34, 0.3);
  border-radius: 8px;
  padding: 20px;
}

.demo-title {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.demo-description {
  margin-bottom: 20px;
  font-size: 13px;
  line-height: 1.6;
}

.demo-description kbd {
  background: #333;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: #fff;
}

.demo-preview {
  margin-bottom: 20px;
}

.terminal-window {
  background: #0a0a0a;
  border: 1px solid #333;
  border-radius: 6px;
  overflow: hidden;
}

.terminal-header-bar {
  background: #222;
  padding: 8px 15px;
  border-bottom: 1px solid #333;
  font-size: 12px;
  color: #aaa;
}

.terminal-body {
  padding: 15px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
}

.command-line, .search-line {
  margin-bottom: 10px;
}

.prompt, .search-prompt {
  color: #aaa;
  margin-right: 8px;
}

.command, .search-query {
  color: #e0e0e0;
}

.cursor {
  color: #ffcc00;
  animation: blink 1s infinite;
}

.command-suggestions {
  margin-top: 10px;
}

.suggestion {
  padding: 4px 0;
  color: #aaa;
  font-size: 11px;
}

.suggestion.active {
  color: #e0e0e0;
  background: #222;
  padding: 4px 8px;
  border-radius: 3px;
}

.search-status {
  margin-top: 5px;
}

.match-info {
  color: #ffcc00;
  font-size: 11px;
}

.demo-button {
  background: #222;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 10px 15px;
  color: #e0e0e0;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.demo-button:hover {
  background: #333;
  border-color: #666;
}

/* Keybind Grid */
.keybind-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.keybind-category {
  background: rgba(34, 34, 34, 0.3);
  border-radius: 8px;
  padding: 20px;
}

.category-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid #333;
  padding-bottom: 10px;
}

.keybind-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.keybind-item, .command-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 13px;
}

.keybind-item kbd {
  background: #333;
  padding: 4px 8px;
  border-radius: 3px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: #fff;
  min-width: 40px;
  text-align: center;
}

.command-item code {
  background: #333;
  padding: 4px 8px;
  border-radius: 3px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: #ffcc00;
}

/* Site Map */
.site-map {
  background: rgba(34, 34, 34, 0.3);
  border-radius: 8px;
  padding: 20px;
}

.nested-item {
  margin-left: 20px;
}

.folder-name {
  color: #e0e0e0;
  font-weight: 600;
}

.folder-name.premium {
  color: #ffcc00;
}

.folder-desc {
  font-size: 11px;
  color: #666;
  margin-left: 10px;
  font-style: italic;
}

.tree-link {
  color: #aaa;
  text-decoration: none;
  transition: color 0.2s ease;
}

.tree-link:hover {
  color: #fff;
}

.tree-link.premium {
  color: #ffcc00;
  cursor: not-allowed;
}

.tree-link.current {
  color: #fff;
  font-weight: 600;
}

/* Feature Roadmap */
.feature-roadmap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.feature-item {
  display: flex;
  gap: 15px;
  padding: 20px;
  background: rgba(34, 34, 34, 0.3);
  border-radius: 8px;
  border-left: 3px solid #666;
}

.feature-item.planned {
  border-left-color: #ffcc00;
}

.feature-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.feature-content h4 {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}

.feature-content p {
  font-size: 12px;
  color: #aaa;
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 20px 15px;
  }
  
  .page-title {
    font-size: 2rem;
    letter-spacing: 2px;
  }
  
  .recovery-fields {
    flex-direction: column;
    gap: 15px;
  }
  
  .actions {
    flex-direction: column;
    align-items: center;
  }
  
  .exercise {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .log-fields {
    justify-content: flex-start;
  }
  
  .interface-demo {
    grid-template-columns: 1fr;
  }
  
  .keybind-grid {
    grid-template-columns: 1fr;
  }
  
  .feature-roadmap {
    grid-template-columns: 1fr;
  }
  
  .palette-container {
    width: 95%;
    margin: 20px;
  }
}

/* Premium Content & Paywall */
.premium-content {
  background: rgba(255, 204, 0, 0.1);
  border: 1px solid rgba(255, 204, 0, 0.3);
}

.paywall-notice {
  text-align: center;
  padding: 40px 20px;
  background: rgba(34, 34, 34, 0.5);
  border-radius: 8px;
  border: 2px dashed rgba(255, 204, 0, 0.3);
}

.lock-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.paywall-notice h3 {
  font-size: 1.5rem;
  color: #ffcc00;
  margin-bottom: 15px;
  font-weight: 700;
  letter-spacing: 2px;
}

.paywall-notice p {
  margin-bottom: 15px;
  color: #ccc;
}

.paywall-notice ul {
  text-align: left;
  max-width: 400px;
  margin: 20px auto;
  color: #aaa;
}

.paywall-notice li {
  margin: 8px 0;
  padding-left: 10px;
}

.premium-button {
  background: linear-gradient(135deg, #ffcc00, #ff9900);
  border: none;
  border-radius: 6px;
  padding: 15px 30px;
  color: #000;
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.premium-button:hover {
  background: linear-gradient(135deg, #ff9900, #ffcc00);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 204, 0, 0.3);
}

.coming-soon {
  text-align: center;
  padding: 40px 20px;
  color: #aaa;
  font-style: italic;
}

.coming-soon p {
  margin-bottom: 15px;
}

/* File tree enhancements */
.folder-desc {
  font-size: 11px;
  color: #666;
  margin-left: 10px;
  font-style: italic;
}

.premium-link {
  color: #ffcc00 !important;
  text-decoration: none;
  position: relative;
}

.premium-link:hover {
  color: #fff !important;
}

.premium-link::after {
  content: " 🔒";
  font-size: 10px;
  margin-left: 5px;
}