/* Interview Prep Question Spinner - Main Stylesheet */

:root {
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-success: #16a34a;
  --color-success-dark: #15803d;
  --color-danger: #dc2626;
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-text: #1e293b;
  --color-text-muted: #64748b;
  --color-border: #e2e8f0;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --transition: 150ms ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.125rem;
}

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

.main-nav {
  display: flex;
  gap: 1.5rem;
}

.main-nav a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition);
}

.main-nav a:hover {
  color: var(--color-primary);
}

/* Hero */
.hero-section {
  background: linear-gradient(135deg, var(--color-primary) 0%, #7c3aed 100%);
  color: white;
  padding: 4rem 0;
  text-align: center;
}

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

.lead {
  font-size: 1.25rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* Sections */
section {
  padding: 3rem 0;
}

.spinner-section {
  background: var(--color-surface);
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--color-text);
}

.section-desc {
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

/* Spinner Controls */
.spinner-controls {
  margin-bottom: 2rem;
}

.label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.select {
  width: 100%;
  max-width: 300px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
  transition: border-color var(--transition);
}

.select:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* Spinner Container */
.spinner-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.wheel-wrapper {
  position: relative;
  width: 300px;
  height: 300px;
}

#question-wheel {
  border-radius: 50%;
  box-shadow: var(--shadow-lg);
}

.wheel-pointer {
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

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

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

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

.btn-primary:hover:not(:disabled) {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
}

.btn-success {
  background: var(--color-success);
  color: white;
}

.btn-success:hover:not(:disabled) {
  background: var(--color-success-dark);
}

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

.btn-outline:hover:not(:disabled) {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn-sm {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
}

/* Question Display */
.question-display {
  background: var(--color-bg);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  margin-top: 2rem;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.question-placeholder {
  color: var(--color-text-muted);
  font-style: italic;
}

.question-category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--color-primary);
  color: white;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.question-text {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.5;
}

/* Practice Section */
.practice-section {
  background: var(--color-surface);
}

.practice-grid {
  display: grid;
  gap: 2rem;
}

.practice-card {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.practice-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-primary);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.progress-bar {
  height: 12px;
  background: var(--color-border);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), #7c3aed);
  border-radius: 999px;
  transition: width 0.5s ease;
}

.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* Custom Section */
.custom-form {
  margin-bottom: 2rem;
}

.input-group {
  display: flex;
  gap: 0.75rem;
}

.input {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  transition: border-color var(--transition);
}

.input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.custom-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.custom-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.custom-item-text {
  flex: 1;
}

.empty-state {
  text-align: center;
  color: var(--color-text-muted);
  padding: 2rem;
}

/* Guide Section */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.guide-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: transform var(--transition), box-shadow var(--transition);
}

.guide-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.guide-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.guide-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.guide-card p {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

.assumptions-box {
  background: #fef3c7;
  border: 1px solid #fbbf24;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.assumptions-box h4 {
  color: #92400e;
  margin-bottom: 0.75rem;
}

.assumptions-box ul {
  color: #78350f;
  padding-left: 1.25rem;
}

.assumptions-box li {
  margin-bottom: 0.5rem;
}

/* Footer */
.site-footer {
  background: var(--color-text);
  color: white;
  padding: 2rem 0;
  margin-top: auto;
}

.footer-content {
  text-align: center;
}

.footer-brand {
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.footer-nav a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.875rem;
}

.footer-nav a:hover {
  color: white;
}

.footer-note {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
}

.footer-note a {
  color: rgba(255,255,255,0.7);
}

/* Animations */
@keyframes spin-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.spinning {
  animation: spin-pulse 0.5s ease-in-out;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-section {
    padding: 3rem 0;
  }
  
  .hero-section h1 {
    font-size: 1.875rem;
  }
  
  .lead {
    font-size: 1.125rem;
  }
  
  .wheel-wrapper {
    width: 260px;
    height: 260px;
  }
  
  #question-wheel {
    width: 260px;
    height: 260px;
  }
  
  .practice-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }
  
  .stat-number {
    font-size: 1.5rem;
  }
  
  .input-group {
    flex-direction: column;
  }
  
  .action-buttons {
    flex-direction: column;
  }
  
  .action-buttons .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
  
  section {
    padding: 2rem 0;
  }
  
  .wheel-wrapper {
    width: 220px;
    height: 220px;
  }
  
  #question-wheel {
    width: 220px;
    height: 220px;
  }
  
  .question-display {
    padding: 1.5rem;
  }
  
  .question-text {
    font-size: 1.125rem;
  }
}

/* Print styles */
@media print {
  .site-header,
  .site-footer,
  .spinner-container,
  .custom-section,
  .action-buttons {
    display: none;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .question-display {
    border: 2px solid #ccc;
  }
}

/* Focus styles for accessibility */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
