@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg-primary: #121212;
  --text-primary: #f9fafb;
  --accent-color: #3b82f6;
  --glass-bg: #1e1e1e;
  --glass-border: #333333;
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --highlight-code-bg: #facc15;
  --highlight-code-text: #111827;
  --highlight-strong-bg: #93c5fd;
  --highlight-strong-text: #172554;
  --checkbox-accent: #3b82f6;
  --hover-bg: #2a2a2a;
}

[data-theme="light"] {
  --bg-primary: #ffffff;
  --text-primary: #111827;
  --accent-color: #2563eb;
  --glass-bg: #f3f4f6;
  --glass-border: #e5e7eb;
  --highlight-code-bg: #fde047;
  --highlight-code-text: #111827;
  --highlight-strong-bg: #bfdbfe;
  --highlight-strong-text: #1e3a8a;
  --checkbox-accent: #2563eb;
  --hover-bg: #e5e7eb;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 16px;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.app-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.header {
  text-align: center;
  margin-bottom: 3rem;
}

.header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.header p {
  font-size: 1.1rem;
}

.theme-toggle {
  background: transparent;
  border: none;
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
  opacity: 0.7;
}

.theme-toggle:hover {
  transform: rotate(15deg) scale(1.15);
  opacity: 1;
}

.glass-panel {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 2.5rem;
}

.tabs-container {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: var(--bg-primary);
  padding: 0.5rem;
  border-radius: 50px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); /* A slightly stronger shadow helps it float over content */
}

/* Light mode specific tweak for the floating dock shadow */
[data-theme="light"] .tabs-container {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-primary);
  padding: 0.6rem 1.2rem;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0.7;
}

.tab-btn:hover {
  background: var(--hover-bg);
  opacity: 1;
}

.tab-btn.active {
  background: var(--accent-color);
  color: #ffffff;
  opacity: 1;
}

.category-section {
  margin-bottom: 3rem;
}

.phase-panel {
  margin-bottom: 3rem;
}

.phase-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 1.5rem;
  text-align: center;
  border-bottom: 2px solid var(--glass-border);
  padding-bottom: 0.5rem;
}

.category-title {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 0.5rem;
  font-weight: 600;
}

.project-overview-card {
  background: var(--bg-primary);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.tech-stack-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tech-pill {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--accent-color);
  padding: 0.2rem 0.8rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
}

.star-story {
  color: var(--text-primary);
  line-height: 1.7;
}

.star-story strong {
  background: transparent;
  color: var(--text-primary);
  padding: 0;
}

.accordion-item {
  margin-bottom: 0.75rem;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-primary);
  border: 1px solid var(--glass-border);
}

.accordion-header {
  padding: 1.2rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--text-primary);
  user-select: none;
  background: var(--glass-bg);
  transition: background 0.2s ease;
}

.accordion-header:hover {
  background: var(--hover-bg);
}

.accordion-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-right: 0.8rem;
  z-index: 2; /* Ensure clicks register */
}

.progress-checkbox {
  width: 1.25rem;
  height: 1.25rem;
  cursor: pointer;
  accent-color: var(--checkbox-accent);
  transition: transform 0.2s;
}

.progress-checkbox:hover {
  transform: scale(1.1);
}

.question-text {
  flex: 1;
  padding-right: 1rem;
  line-height: 1.5;
  transition: opacity 0.3s ease;
}

.accordion-item.completed .question-text {
  opacity: 0.6;
}

.accordion-header .icon {
  font-size: 1.5rem;
  color: var(--accent-color);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.accordion-item.open .icon {
  transform: rotate(45deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  background: var(--bg-primary);
}

.accordion-item.open .accordion-content {
  max-height: 2500px; /* Arbitrary large value to allow content expansion */
  padding: 1.2rem;
  border-top: 1px solid var(--glass-border);
}

.accordion-content p {
  color: var(--text-primary);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* Highlighter styling for keywords */
.inline-code {
  background: var(--highlight-code-bg);
  color: var(--highlight-code-text);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.9em;
  font-weight: 600;
}

strong, .keyword-highlight {
  background: var(--highlight-strong-bg);
  color: var(--highlight-strong-text);
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  font-weight: 600;
}

.progress-container {
  max-width: 500px;
  margin: 2rem auto 0;
}

.progress-text {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  opacity: 0.9;
}

.progress-bar-bg {
  width: 100%;
  height: 8px;
  background-color: var(--glass-border);
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background-color: var(--accent-color);
  border-radius: 10px;
  transition: width 0.4s ease;
}

.reset-btn {
  background: transparent;
  border: none;
  color: var(--text-primary);
  padding: 0;
  margin-left: 0.5rem;
  font-size: 0.75rem;
  cursor: pointer;
  opacity: 0.5;
  transition: all 0.3s ease;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  position: relative;
}

.reset-btn::after {
  content: '';
  position: absolute;
  width: 0;
  height: 1px;
  bottom: -2px;
  left: 0;
  background-color: #ef4444;
  transition: width 0.3s ease;
}

.reset-btn:hover {
  opacity: 1;
  color: #ef4444;
}

.reset-btn:hover::after {
  width: 100%;
}

/* Mobile Media Queries */
@media (max-width: 768px) {
  .app-container {
    padding: 1rem;
  }
  
  .header {
    margin-bottom: 2rem;
  }

  .header h1 {
    font-size: 2rem;
  }

  .glass-panel {
    padding: 1rem;
  }

  .tabs-container {
    gap: 0.5rem;
  }

  .tab-btn {
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
    flex: 1 1 45%;
  }

  .accordion-header {
    font-size: 1.05rem;
    padding: 1rem;
  }

  .accordion-content {
    padding: 1rem;
  }

  .accordion-content p {
    font-size: 1rem;
  }
}

