/* Base reset and styling */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: #0b0f19;
  color: #f3f4f6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hidden {
  display: none !important;
}

.brand-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  background: #1e1b4b;
  color: #818cf8;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.brief-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 4px 10px;
  border-radius: 999px;
}

/* Header navigation */
.header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

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

.brand-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

.brand-sub {
  font-size: 11px;
  color: #9ca3af;
}

/* Main content container */
.main-container {
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
  padding: 32px 20px;
  flex: 1;
}

.hero-text {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 24px auto;
}

.hero-text h2 {
  font-size: 26px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}

.hero-text p {
  font-size: 13px;
  color: #9ca3af;
}

/* Mode selector tab bar */
.tab-bar {
  display: flex;
  justify-content: center;
  gap: 8px;
  background: #111827;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  max-width: 440px;
  margin: 0 auto 28px auto;
}

.tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: #9ca3af;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn.active {
  background: #4f46e5;
  color: #ffffff;
}

/* Card components */
.card {
  background: rgba(17, 24, 39, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 24px;
  backdrop-filter: blur(8px);
}

.tab-panel {
  max-width: 560px;
  margin: 0 auto;
}

.rec-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}

.btn-mic-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: none;
  background: #4f46e5;
  color: white;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(79, 70, 229, 0.4);
  transition: transform 0.2s ease;
}

.btn-mic-icon:hover {
  transform: scale(1.05);
}

.recording-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ping-dot {
  width: 10px;
  height: 10px;
  background: #ef4444;
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

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

.timer-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px;
  font-weight: 700;
  color: #f87171;
}

#visualizerCanvas {
  width: 100%;
  height: 50px;
  background: #090d16;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.sub-text {
  font-size: 12px;
  color: #9ca3af;
}

.recording-sub {
  font-size: 12px;
  color: #f87171;
}

/* Button styling */
.btn {
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: #4f46e5;
  color: white;
}

.btn-primary:hover {
  background: #4338ca;
}

.btn-secondary {
  background: #1f2937;
  color: #d1d5db;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  background: #374151;
  color: white;
}

.btn-danger {
  background: #dc2626;
  color: white;
}

.btn-row {
  display: flex;
  gap: 12px;
  width: 100%;
  justify-content: center;
}

.audio-preview {
  width: 100%;
  max-width: 380px;
  height: 40px;
  margin: 8px 0;
}

/* File upload dropzone */
.ceiling-notice {
  font-size: 11px;
  text-align: center;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.1);
  padding: 6px 12px;
  border-radius: 6px;
  margin-bottom: 16px;
}

.dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.dropzone:hover {
  border-color: #6366f1;
}

.link-text {
  color: #818cf8;
  text-decoration: underline;
}

.format-list {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: #6b7280;
  margin-top: 12px;
}

.file-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.file-info h4 {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
}

.file-info p {
  font-size: 12px;
  color: #9ca3af;
}

/* Canvas Word Cloud Container */
.canvas-box {
  position: relative;
  min-height: 380px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #080c14;
  border-radius: 14px;
  overflow: hidden;
}

#cloudCanvas {
  width: 100%;
  max-width: 900px;
  height: 380px;
}

.btn-png {
  position: absolute;
  top: 16px;
  right: 16px;
}

/* Session Header & Views */
.session-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.session-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

.view-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.view-tabs {
  display: flex;
  gap: 6px;
  background: #111827;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.vtab-btn {
  background: transparent;
  border: none;
  color: #9ca3af;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
}

.vtab-btn.active {
  background: #374151;
  color: white;
}

/* Exclude Word Toolbar */
.exclude-toolbar {
  margin-bottom: 16px;
}

.exclude-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.exclude-label {
  font-size: 12px;
  font-weight: 600;
  color: #d1d5db;
}

.exclude-form {
  display: flex;
  gap: 8px;
}

.exclude-form input {
  background: #0b0f19;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 6px;
  outline: none;
}

.pills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

/* Table */
.table-box {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.table th {
  padding: 12px;
  color: #9ca3af;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 600;
}

.table td {
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-family: 'JetBrains Mono', monospace;
}

/* Transcript Box */
.transcript-box {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.transcript-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  pb: 12px;
}

.transcript-header h3 {
  font-size: 15px;
  font-weight: 600;
  color: white;
}

.transcript-actions {
  display: flex;
  gap: 8px;
}

.transcript-actions input {
  background: #0b0f19;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 6px;
  outline: none;
}

.summary-box {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: #c7d2fe;
  padding: 12px;
  border-radius: 8px;
  font-size: 12px;
}

.transcript-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.6;
  color: #d1d5db;
  background: #080c14;
  padding: 16px;
  border-radius: 8px;
  max-height: 300px;
  overflow-y: auto;
}

/* Alert boxes */
.alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 16px;
}

.alert-danger {
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.3);
  color: #fca5a5;
}

/* Loading Spinner */
.loading-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 36px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(99, 102, 241, 0.2);
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

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

.loading-sub {
  font-size: 12px;
  color: #a5b4fc;
  margin-top: 6px;
}

/* Footer */
.footer {
  text-align: center;
  padding: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #6b7280;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
  .hero-text h2 { font-size: 20px; }
  .session-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .exclude-row { flex-direction: column; align-items: flex-start; }
  .transcript-header { flex-direction: column; align-items: flex-start; gap: 10px; }
}
