/* ============================================
   RateFlow - Professional Voice Assessment
   Modern Corporate Light Theme
   ============================================ */

/* CSS Variables */
:root {
  /* Primary Colors */
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-200: #bfdbfe;
  
  /* Neutral Colors */
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-elevated: #ffffff;
  --bg-subtle: #f1f5f9;
  
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  /* Semantic Colors */
  --success: #10b981;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --warning-border: #fcd34d;
  
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  
  --info: #06b6d4;
  --info-bg: #ecfeff;
  --info-border: #a5f3fc;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  /* Spacing */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

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

body {
  font-family: var(--font-sans);
  background: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Background Pattern */
.bg-pattern {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: 
    radial-gradient(ellipse 80% 50% at 50% -20%, var(--primary-100) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 100% 0%, var(--primary-50) 0%, transparent 40%),
    var(--bg-main);
}

.bg-pattern::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%232563eb' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

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

@media (max-width: 640px) {
  .container { padding: 16px; }
}

/* ============================================
   Header & Navigation
   ============================================ */

.header {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

@media (max-width: 640px) {
  .header-inner {
    flex-direction: column;
    gap: 12px;
    padding: 12px 16px;
  }
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.5px;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.brand:hover .brand-icon {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.brand-tagline {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Navigation */
.nav {
  display: flex;
  gap: 4px;
  background: var(--bg-subtle);
  padding: 4px;
  border-radius: var(--radius-full);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.nav-link.active {
  color: var(--primary);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
  padding: 48px 0 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero { padding: 32px 0 24px; }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--primary-50);
  border: 1px solid var(--primary-200);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.hero-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1px;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.hero-title-highlight {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 520px;
  line-height: 1.7;
}

/* Hero Card */
.hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-lg);
}

.hero-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-card-title svg {
  color: var(--primary);
}

.hero-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.hero-step:hover {
  background: var(--primary-50);
  transform: translateX(4px);
}

.hero-step-number {
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.hero-step-text {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ============================================
   Cards
   ============================================ */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-200);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title-icon {
  width: 32px;
  height: 32px;
  background: var(--primary-50);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

/* ============================================
   Upload Section
   ============================================ */

.upload-section {
  display: grid;
  gap: 24px;
}

.upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

@media (max-width: 768px) {
  .upload-grid { grid-template-columns: 1fr; }
}

/* Upload Zone */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
  background: var(--bg-subtle);
}

.upload-zone:hover,
.upload-zone.dragover,
.upload-zone.active {
  border-color: var(--primary);
  background: var(--primary-50);
}

.upload-zone.dragover {
  transform: scale(1.02);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.upload-zone input[type="file"] {
  display: none;
}

.upload-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: var(--bg-card);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}

.upload-zone:hover .upload-icon {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.upload-icon svg {
  width: 24px;
  height: 24px;
  color: var(--primary);
}

.upload-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.upload-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.upload-formats {
  font-size: 12px;
  color: var(--text-muted);
}

/* Record Section */
.record-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 0;
}

.record-btn {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 3px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}

.record-btn:hover {
  border-color: var(--primary);
  transform: scale(1.05);
}

.record-btn.recording {
  border-color: var(--danger);
  background: var(--danger-bg);
  animation: pulse-record 1.2s ease-in-out infinite;
}

@keyframes pulse-record {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 0 16px rgba(239, 68, 68, 0); }
}

.record-btn-inner {
  width: 24px;
  height: 24px;
  background: var(--danger);
  border-radius: 50%;
  transition: all var(--transition-fast);
}

.record-btn.recording .record-btn-inner {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-sm);
}

.timer-display {
  margin-top: 16px;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.timer-display.visible {
  opacity: 1;
}

.timer-display.recording {
  color: var(--danger);
}

.record-hint {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

/* Audio Preview */
.audio-preview {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: var(--shadow-md);
}

.audio-preview.visible {
  display: block;
  animation: slideUp var(--transition-base) ease-out;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.audio-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.audio-preview-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.audio-preview-filename {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.audio-preview audio {
  width: 100%;
  height: 40px;
  border-radius: var(--radius-md);
}

/* Error Message */
.error-message {
  display: none;
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  color: var(--danger);
  font-size: 14px;
  font-weight: 500;
}

.error-message.visible {
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideUp var(--transition-fast) ease-out;
}

.error-message svg {
  flex-shrink: 0;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover:not(:disabled) {
  background: var(--bg-subtle);
  border-color: var(--text-muted);
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-color: transparent;
  color: white;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
  background: var(--bg-subtle);
}

.btn-danger {
  color: var(--danger);
  border-color: var(--danger-border);
  background: var(--danger-bg);
}

.btn-danger:hover:not(:disabled) {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}

.btn-sm {
  padding: 8px 12px;
  font-size: 13px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
  border-radius: var(--radius-lg);
}

.actions {
  display: flex;
  justify-content: center;
  padding: 8px 0;
}

/* ============================================
   Loading State
   ============================================ */

.loading-overlay {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  text-align: center;
}

.loading-overlay.visible {
  display: block;
  animation: slideUp var(--transition-base) ease-out;
}

.loader-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loader-text {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

.loader-progress {
  margin-top: 16px;
  height: 4px;
  background: var(--bg-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.loader-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: var(--radius-full);
  animation: loading-bar 2s ease-in-out infinite;
}

@keyframes loading-bar {
  0% { width: 0%; margin-left: 0; }
  50% { width: 60%; margin-left: 20%; }
  100% { width: 0%; margin-left: 100%; }
}

/* ============================================
   Results
   ============================================ */

.result-card {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-lg);
}

.result-card.visible {
  display: block;
  animation: slideUp var(--transition-slow) ease-out;
}

/* Score Header */
.score-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.score-group {
  display: flex;
  flex-direction: column;
}

.score-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.score-number {
  font-size: clamp(42px, 8vw, 64px);
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  letter-spacing: -2px;
}

.score-max {
  font-size: 0.35em;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0;
}

/* Recommendation Badge */
.recommendation-badge {
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-highly-recommended {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success-border);
}

.badge-recommended {
  background: var(--primary-50);
  color: var(--primary);
  border: 1px solid var(--primary-200);
}

.badge-neutral {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid var(--warning-border);
}

.badge-not-recommended {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}

/* Criteria Section */
.criteria-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.criteria-item {
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: all var(--transition-fast);
}

.criteria-item:hover {
  background: var(--primary-50);
}

.criteria-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.criteria-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.criteria-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
}

.criteria-bar {
  height: 8px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.criteria-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Summary Box */
.summary-box {
  background: var(--primary-50);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 16px 20px;
  margin-bottom: 24px;
}

.summary-text {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Details Grid */
.details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 640px) {
  .details-grid { grid-template-columns: 1fr; }
}

.detail-box {
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
}

.detail-box.strengths {
  border-left: 3px solid var(--success);
}

.detail-box.weaknesses {
  border-left: 3px solid var(--warning);
}

.detail-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.detail-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-list li {
  font-size: 14px;
  color: var(--text-secondary);
  padding-left: 16px;
  position: relative;
}

.detail-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
}

.strengths .detail-list li::before {
  background: var(--success);
}

.weaknesses .detail-list li::before {
  background: var(--warning);
}

/* ============================================
   Dashboard
   ============================================ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  transition: all var(--transition-base);
}

.stat-card:hover {
  border-color: var(--primary-200);
  box-shadow: var(--shadow-md);
}

.stat-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

/* Table */
.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  gap: 16px;
  flex-wrap: wrap;
}

.table-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 14px 20px;
  text-align: left;
}

th {
  background: var(--bg-subtle);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

tbody tr {
  transition: background var(--transition-fast);
}

tbody tr:hover {
  background: var(--bg-subtle);
}

td {
  font-size: 14px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

/* Input */
.input {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text-primary);
  min-width: 240px;
  transition: all var(--transition-fast);
}

.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.input::placeholder {
  color: var(--text-muted);
}

/* ============================================
   API Docs
   ============================================ */

.endpoint-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  margin-bottom: 16px;
  overflow: hidden;
  transition: all var(--transition-base);
}

.endpoint-card:hover {
  border-color: var(--primary-200);
  box-shadow: var(--shadow-md);
}

.endpoint-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
}

.method-badge {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.method-get {
  background: var(--success-bg);
  color: var(--success);
}

.method-post {
  background: var(--primary-50);
  color: var(--primary);
}

.method-delete {
  background: var(--danger-bg);
  color: var(--danger);
}

.endpoint-url {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.endpoint-body {
  padding: 20px;
}

.endpoint-description {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* Code Block */
.code-block-wrapper {
  position: relative;
}

.code-block {
  background: var(--text-primary);
  color: #e2e8f0;
  border-radius: var(--radius-md);
  padding: 16px 60px 16px 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.copy-btn {
  position: absolute;
  right: 8px;
  top: 8px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

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

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 640px) {
  .hero-grid { grid-template-columns: 1fr; }
  .upload-grid { grid-template-columns: 1fr; }
  .details-grid { grid-template-columns: 1fr; }
  
  .score-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .table-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .input { min-width: 100%; }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .stat-card { padding: 16px; }
  .stat-value { font-size: 24px; }
}
