/* The Admin Lab — Professional Styling */

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

:root {
  --primary: #d97706;
  --primary-dark: #b45309;
  --secondary: #059669;
  --accent: #8b5cf6;
  --danger: #dc2626;
  --warning: #f59e0b;
  --bg-light: #fef6f1;
  --bg-white: #fffbf8;
  --text-dark: #3f2817;
  --text-gray: #78716a;
  --border: #e8dcc8;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 1.125rem;
  line-height: 1.8;
  letter-spacing: 0.4px;
  color: var(--text-dark);
  background: linear-gradient(135deg, var(--bg-light) 0%, #faf5f0 100%);
  min-height: 100vh;
}

/* Header & Navigation */
header {
  background: linear-gradient(135deg, #d97706 0%, #b45309 50%, #92400e 100%);
  color: white;
  padding: 2rem 0;
  box-shadow: var(--shadow-lg);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  text-decoration: none;
  color: white;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo:hover {
  opacity: 0.9;
}

nav a {
  color: white;
  text-decoration: none;
  margin-left: 2rem;
  font-size: 0.95rem;
  transition: opacity 0.2s;
}

nav a:hover {
  opacity: 0.8;
}

/* Main Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

main {
  margin: 2rem auto;
}

/* Hero Section (Landing Page) */
.hero {
  background: linear-gradient(135deg, #d97706 0%, #c2410c 40%, #92400e 100%);
  color: white;
  padding: 4rem 2rem;
  text-align: center;
  border-radius: 12px;
  margin-bottom: 3rem;
  box-shadow: var(--shadow-lg);
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  opacity: 0.95;
}

.hero .cta-button {
  display: inline-block;
  background: white;
  color: var(--primary);
  padding: 0.75rem 2rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
}

.hero .cta-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Card Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.card {
  background: linear-gradient(135deg, var(--bg-white) 0%, #fef3e8 100%);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  border-left: 5px solid var(--primary);
  border-top: 2px solid rgba(217, 119, 6, 0.1);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 30px rgba(217, 119, 6, 0.15);
  border-left-color: #92400e;
}

.card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
  color: #b45309;
  font-weight: 700;
}

.card p {
  color: var(--text-gray);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.card a {
  display: inline-block;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.card a:hover {
  color: var(--primary-dark);
}

/* Lesson Content */
.lesson-content {
  background: var(--bg-white);
  border-radius: 10px;
  padding: 3.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
  max-width: 900px;
}

.lesson-content h1 {
  font-size: 2.2rem;
  margin-bottom: 0.75rem;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: -0.5px;
}

.lesson-meta {
  font-size: 0.95rem;
  color: var(--text-gray);
  margin-bottom: 2.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.lesson-content h2 {
  font-size: 1.75rem;
  margin: 2.5rem 0 1.25rem 0;
  color: var(--text-dark);
  padding-top: 1.25rem;
  border-top: 2px solid var(--bg-light);
  font-weight: 700;
}

.lesson-content h3 {
  font-size: 1.35rem;
  margin: 1.75rem 0 0.875rem 0;
  color: var(--text-dark);
  font-weight: 600;
}

.lesson-content p {
  margin-bottom: 1.25rem;
  line-height: 1.85;
  color: var(--text-dark);
}

.lesson-content ul,
.lesson-content ol {
  margin-left: 2.25rem;
  margin-bottom: 1.25rem;
}

.lesson-content li {
  margin-bottom: 0.75rem;
  line-height: 1.75;
}

.lesson-content strong {
  color: var(--text-dark);
  font-weight: 600;
}

.lesson-content em {
  font-style: italic;
  color: var(--text-gray);
}

/* Callout Boxes */
.callout {
  background: var(--bg-light);
  border-left: 4px solid var(--primary);
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-radius: 4px;
}

.callout.warning {
  border-left-color: var(--warning);
  background: #fffbeb;
}

.callout.success {
  border-left-color: var(--secondary);
  background: #ecfdf5;
}

.callout.danger {
  border-left-color: var(--danger);
  background: #fef2f2;
}

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

/* Navigation Buttons */
.lesson-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border);
}

.lesson-nav a {
  flex: 1;
  padding: 1rem;
  border-radius: 6px;
  text-decoration: none;
  text-align: center;
  font-weight: 600;
  transition: all 0.2s;
  background: var(--bg-light);
  color: var(--primary);
}

.lesson-nav a:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

.lesson-nav a.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Progress Bar */
.progress-section {
  background: var(--bg-white);
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 1rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
  transition: width 0.3s ease;
}

/* Footer */
footer {
  background: var(--text-dark);
  color: white;
  padding: 2rem;
  text-align: center;
  margin-top: 4rem;
}

footer a {
  color: var(--primary);
  text-decoration: none;
}

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

/* Code Blocks */
code {
  background: var(--bg-light);
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
}

pre {
  background: var(--text-dark);
  color: #e5e7eb;
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1rem 0;
}

pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

table th {
  background: var(--bg-light);
  padding: 0.75rem;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid var(--border);
}

table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
}

table tr:hover {
  background: var(--bg-light);
}

/* Responsive */
@media (max-width: 768px) {
  header .container {
    flex-direction: column;
    gap: 1rem;
  }

  nav {
    width: 100%;
  }

  nav a {
    margin-left: 1rem;
  }

  .hero {
    padding: 2rem;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .lesson-content {
    padding: 1.5rem;
  }

  .lesson-nav {
    flex-direction: column;
  }

  .grid {
    grid-template-columns: 1fr;
  }
}

/* Text-to-Speech Button */
.tts-button {
  display: inline-block;
  margin: 1.5rem 0;
  padding: 0.85rem 1.75rem;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-lg);
}

.tts-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(5, 150, 105, 0.3);
  background: linear-gradient(135deg, #047857 0%, #065f46 100%);
}

.tts-button.playing {
  animation: pulse 1.5s infinite;
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.tts-button:active {
  transform: translateY(0);
}

/* Print Styles */
@media print {
  header,
  footer,
  .lesson-nav,
  .tts-button {
    display: none;
  }

  .lesson-content {
    box-shadow: none;
    padding: 0;
  }
}
