/* CSS Variables for Theme */
:root {
  --font-size: 16px;
  --background: #ffffff;
  --foreground: #0a0a0a;
  --card: #ffffff;
  --card-foreground: #0a0a0a;
  --primary: #030213;
  --primary-foreground: #ffffff;
  --secondary: #f1f5f9;
  --secondary-foreground: #030213;
  --muted: #ececf0;
  --muted-foreground: #717182;
  --accent: #e9ebef;
  --accent-foreground: #030213;
  --border: rgba(0, 0, 0, 0.1);
  --radius: 0.625rem;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: var(--font-size);
  line-height: 1.6;
  color: var(--foreground);
  background-color: var(--background);
}

/* Layout */
.main-content {
  max-width: 1024px;
  margin: 0 auto;
  padding: 2rem;
  min-height: 100vh;
}

/* View Toggle */
.view-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.2s ease;
}

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

.btn-primary:hover {
  background-color: rgba(3, 2, 19, 0.9);
}

.btn-outline {
  background-color: transparent;
  color: var(--foreground);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background-color: var(--accent);
}

/* Book Header */
.book-header {
  text-align: center;
  padding: 4rem 2rem;
}

.book-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--primary);
}

.book-subtitle {
  font-size: 1.25rem;
  color: var(--muted-foreground);
  margin-bottom: 0.5rem;
}

.book-subtitle-2 {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  margin-bottom: 2rem;
}

.book-author {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--foreground);
}

/* Separator */
.separator {
  height: 1px;
  background-color: var(--border);
  margin: 2rem 0;
}

/* Table of Contents */
.table-of-contents {
  margin: 2rem 0;
}

.table-of-contents h2 {
  text-align: center;
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 2rem;
}

.toc-content {
  max-width: 600px;
  margin: 0 auto;
}

.toc-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.toc-item:hover {
  background-color: var(--accent);
  padding-left: 1rem;
  padding-right: 1rem;
  margin-left: -1rem;
  margin-right: -1rem;
  border-radius: var(--radius);
}

.toc-item .chapter-number {
  font-weight: 600;
  min-width: 120px;
  color: var(--primary);
}

.toc-item .chapter-title {
  flex: 1;
  font-weight: 500;
}

.toc-item .go-to-chapter {
  color: var(--primary);
  font-size: 0.875rem;
  text-decoration: underline;
}

/* Chapters */
.chapter {
  margin: 4rem 0;
  scroll-margin-top: 2rem;
}

.chapter-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border);
}

.chapter-header .chapter-number {
  font-size: 1rem;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.chapter-header .chapter-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
}

.chapter-content {
  line-height: 1.7;
}

/* Introduction Specific Styles */
.intro-section {
  max-width: 800px;
  margin: 0 auto;
}

.welcome-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.welcome-card h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--primary);
}

.what-youll-learn h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--primary);
}

.learning-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.learning-item {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.learning-item h4 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.learning-item p {
  color: var(--muted-foreground);
}

/* Note/Alert Styles */
.author-note,
.business-structure-note {
  background-color: var(--secondary);
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 2rem 0;
}

.note-header {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--primary);
}

.note-content p {
  margin-bottom: 0.75rem;
}

.note-content ul {
  margin: 0.75rem 0;
  padding-left: 1.5rem;
}

.note-content li {
  margin-bottom: 0.25rem;
}

.note-content a {
  color: var(--primary);
  text-decoration: underline;
  font-weight: 600;
}

/* Guide Structure */
.guide-structure h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--primary);
}

.structure-phases {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.phase {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.phase h4 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.phase p {
  color: var(--muted-foreground);
}

/* Ready to Start */
.ready-to-start {
  background-color: var(--accent);
  border-radius: var(--radius);
  padding: 2rem;
  margin-top: 2rem;
  text-align: center;
}

.ready-to-start h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--primary);
}

/* About Author */
.about-author {
  margin: 4rem 0;
}

.about-author h2 {
  text-align: center;
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 2rem;
  color: var(--primary);
}

.author-content {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.125rem;
  line-height: 1.7;
}

.author-content p {
  margin-bottom: 1.5rem;
}

.author-content strong {
  color: var(--primary);
}

/* Footer */
.book-footer {
  background-color: var(--muted);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  margin-top: 4rem;
}

.footer-content p {
  margin-bottom: 0.5rem;
}

.footer-content a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

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

.copyright {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-top: 1rem;
}

/* Print Content (Hidden by default) */
.print-content {
  min-height: 100vh;
  background-color: white;
}

.print-header {
  background-color: #f3f4f6;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.print-header h1 {
  font-size: 1.25rem;
  font-weight: 600;
}

.print-controls {
  display: flex;
  gap: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .main-content {
    padding: 1rem;
  }
  
  .book-title {
    font-size: 2rem;
  }
  
  .chapter-header .chapter-title {
    font-size: 2rem;
  }
  
  .learning-grid {
    grid-template-columns: 1fr;
  }
  
  .view-toggle {
    top: 0.5rem;
    right: 0.5rem;
  }
  
  .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
  }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Loading and transition styles */
.fade-in {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}