/* === HMM Brand Variables === */
:root {
  --primary: #00b0f0;
  --primary-dark: #008ec0;
  --primary-glow: rgba(0, 176, 240, 0.2);
  --bg: #06111f;
  --bg-card: #0d1e33;
  --bg-card-hover: #122542;
  --border: rgba(0, 176, 240, 0.15);
  --border-strong: rgba(0, 176, 240, 0.35);
  --orange: #f57c20;
  --orange-light: #ff9a45;
  --text: #e8f4fb;
  --text-muted: #7aadcc;
  --text-dim: #4a7a99;
  --success: #22c55e;
  --error: #ef4444;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(0, 176, 240, 0.08);
}

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

html { scroll-behavior: smooth; }

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

/* === Header === */
header {
  background: rgba(6, 17, 31, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-img {
  height: 36px;
  width: auto;
  display: block;
}

.logo-divider {
  width: 1px;
  height: 22px;
  background: var(--border-strong);
}

.logo-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.3px;
}

/* === Main Layout === */
main {
  flex: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 24px 64px;
  width: 100%;
}

/* === Hero === */
.hero {
  text-align: center;
  margin-bottom: 48px;
}

.hero h1 {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 14px;
  color: var(--text);
}

.accent {
  color: var(--primary);
}

.hero-sub {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
}

/* === Top Disclaimer === */
.top-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 20px;
  background: rgba(245, 124, 32, 0.08);
  border: 2px solid var(--orange);
  border-radius: var(--radius);
  margin-bottom: 32px;
  color: var(--text);
}

.top-disclaimer-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2.5px solid var(--orange);
  color: var(--orange);
  font-weight: 900;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.top-disclaimer strong {
  display: block;
  font-size: 15px;
  color: var(--orange-light);
  margin-bottom: 6px;
}

.top-disclaimer p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* === Cards === */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow), var(--shadow-glow);
  margin-bottom: 24px;
  transition: border-color 0.2s;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.card-header h2 {
  font-size: 18px;
  font-weight: 600;
  flex: 1;
}

.step-badge {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary-glow);
  border: 1.5px solid var(--primary);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.accent-badge {
  background: rgba(245, 124, 32, 0.15);
  border-color: var(--orange);
  color: var(--orange);
}

/* === Drop Zone === */
.drop-zone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(0, 176, 240, 0.03);
  position: relative;
}

.drop-zone:hover,
.drop-zone:focus,
.drop-zone.drag-over {
  border-color: var(--primary);
  background: var(--primary-glow);
  outline: none;
}

.drop-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  color: var(--primary);
  opacity: 0.7;
}

.drop-icon svg { width: 100%; height: 100%; }

.drop-text {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}

.drop-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.drop-formats {
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}

/* === File Selected === */
.file-selected {
  margin-top: 16px;
  background: rgba(0, 176, 240, 0.07);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.file-icon {
  width: 28px;
  height: 28px;
  color: var(--primary);
  flex-shrink: 0;
}

.file-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 400px;
}

.file-size {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.remove-btn {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-dim);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.15s;
  flex-shrink: 0;
}

.remove-btn:hover {
  color: var(--error);
  background: rgba(239, 68, 68, 0.1);
}

.remove-btn svg { width: 16px; height: 16px; }

/* === Buttons === */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 24px;
  margin-top: 20px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.2px;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(0, 176, 240, 0.35);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.btn-icon { width: 18px; height: 18px; }

.btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  margin: 0 auto;
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-glow);
}

.btn-secondary svg { width: 16px; height: 16px; }

/* === Progress === */
.progress-section {
  margin-bottom: 24px;
}

.status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse 1.5s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.status-text {
  font-size: 14px;
  color: var(--text-muted);
}

.progress-track {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--orange));
  border-radius: 2px;
  width: 0%;
  transition: width 0.4s ease;
  animation: progress-shimmer 2s linear infinite;
  background-size: 200% 100%;
}

@keyframes progress-shimmer {
  0% { background-position: 200% center; }
  100% { background-position: -200% center; }
}

.progress-fill.uploading { width: 20%; }
.progress-fill.transcribing { width: 55%; }
.progress-fill.generating { width: 80%; }
.progress-fill.done { width: 100%; animation: none; }

/* === Results === */
.result-card .card-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
  margin-bottom: 0;
}

.result-content {
  padding: 20px 0 0;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 320px;
  overflow-y: auto;
}

.report-content {
  font-size: 15px;
  color: var(--text);
  max-height: 600px;
}

.result-content::-webkit-scrollbar { width: 4px; }
.result-content::-webkit-scrollbar-track { background: transparent; }
.result-content::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 2px; }

.report-card {
  border-color: rgba(245, 124, 32, 0.2);
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(245, 124, 32, 0.04) 100%);
}

/* === Copy Button === */
.copy-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}

.copy-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-glow);
}

.copy-btn.copied {
  border-color: var(--success);
  color: var(--success);
  background: rgba(34, 197, 94, 0.1);
}

.copy-btn svg { width: 14px; height: 14px; }

.action-buttons {
  display: flex;
  gap: 8px;
}

/* === Error Banner === */
.error-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 24px;
  color: #fca5a5;
  font-size: 14px;
}

.error-banner svg:first-child { width: 18px; height: 18px; flex-shrink: 0; }

.error-banner span { flex: 1; }

#closeError {
  background: none;
  border: none;
  cursor: pointer;
  color: #fca5a5;
  display: flex;
  padding: 2px;
}

#closeError svg { width: 16px; height: 16px; }

/* === Footer === */
footer {
  text-align: center;
  padding: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 13px;
}

/* === Utility === */
.hidden { display: none !important; }

/* === Responsive === */
@media (max-width: 600px) {
  main { padding: 32px 16px 48px; }
  .card { padding: 20px; }
  .drop-zone { padding: 32px 16px; }
  .hero h1 { font-size: 26px; }
  .action-buttons { flex-direction: column; }
}

/* === Disclaimer === */
.disclaimer-block {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 20px;
  padding: 14px 16px;
  background: rgba(245, 124, 32, 0.1);
  border: 1.5px solid var(--orange);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--orange-light);
  line-height: 1.5;
}

.disclaimer-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--orange);
  color: var(--orange);
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* === Cursor blink for streaming === */
.streaming-cursor::after {
  content: '▋';
  color: var(--primary);
  animation: blink 0.8s step-end infinite;
}

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