/* SoundSubtitle Modern Design System */
:root {
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --primary: #7c3aed;
  --primary-hover: #6d28d9;
  --primary-light: #f5f3ff;
  --primary-border: #ddd6fe;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --border: #e2e8f0;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Pretendard", "Apple SD Gothic Neo", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--primary); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--primary-hover); }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* Global Suite Bar */
.suite-bar {
  background: #090d16;
  color: #94a3b8;
  font-size: 0.8rem;
  border-bottom: 1px solid #1e293b;
  width: 100%;
}
.suite-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 6px 16px;
  gap: 12px;
}
.suite-title {
  color: #64748b;
  font-weight: 500;
  white-space: nowrap;
}
.suite-links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.suite-link {
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid transparent;
  transition: all 0.15s ease;
  text-decoration: none;
}
.suite-link:hover {
  color: #ffffff;
  background: #1e293b;
  border-color: #334155;
}
.suite-link.active {
  color: #c084fc;
  background: rgba(168, 85, 247, 0.2);
  border-color: rgba(192, 132, 252, 0.4);
  font-weight: 600;
}

@media (max-width: 768px) {
  .suite-bar-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 8px 12px;
    gap: 6px;
    height: auto;
  }
  .suite-title {
    font-size: 11px;
  }
  .suite-links {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    width: 100%;
    padding-bottom: 4px;
    gap: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .suite-links::-webkit-scrollbar {
    display: none;
  }
  .suite-link {
    font-size: 12px;
    padding: 4px 8px;
    flex-shrink: 0;
  }
}

/* Header */
.site-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}
.brand-icon {
  width: 34px;
  height: 34px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-text { font-weight: 700; }
.brand-sub { color: var(--primary); font-weight: 600; margin-left: 4px; }

.header-right { display: flex; align-items: center; gap: 12px; }
.lang-select {
  padding: 6px 12px;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--text-primary);
  cursor: pointer;
  font-weight: 500;
}

/* Hero */
.hero { text-align: center; padding: 48px 0 28px; }
.hero-badge {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 14px;
  border-radius: 9999px;
  margin-bottom: 14px;
  border: 1px solid var(--primary-border);
}
.hero h1 {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 12px;
  letter-spacing: -0.03em;
}
.hero p.lead {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto;
}

/* Workbench Card */
.workbench {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 32px;
  margin-bottom: 48px;
}

/* Dropzone */
.dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--bg-subtle);
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.dropzone-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 12px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}
.dropzone h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 6px; }
.dropzone p { font-size: 0.9rem; color: var(--text-muted); }

/* Control Bar */
.control-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  align-items: center;
  background: var(--bg-subtle);
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
.control-group { display: flex; flex-direction: column; gap: 6px; }
.control-group label { font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); }
.select-input {
  padding: 8px 12px;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--text-primary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
}
.btn-sm { padding: 5px 12px; font-size: 0.82rem; }
.btn-primary { background: var(--primary); color: #ffffff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-success { background: var(--success); color: #ffffff; }
.btn-success:hover { background: #059669; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-secondary); }
.btn-outline:hover { background: var(--bg-subtle); }

/* Player Section */
.player-section {
  margin-top: 28px;
  border-top: 1px solid var(--border);
  padding-top: 24px;
}
.video-container {
  position: relative;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.live-subtitle-overlay {
  position: absolute;
  bottom: 50px;
  left: 5%;
  right: 5%;
  text-align: center;
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8), 0 0 2px #000;
  background: rgba(0, 0, 0, 0.4);
  padding: 6px 16px;
  border-radius: 4px;
  pointer-events: none;
  transition: all 0.15s ease;
}

.extraction-status-box {
  margin-top: 14px;
  padding: 12px 16px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.live-indicator {
  width: 10px;
  height: 10px;
  background: #10b981;
  border-radius: 50%;
  display: inline-block;
}
.pulse {
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Cues Section & Table */
.cues-section {
  margin-top: 32px;
  border-top: 1px solid var(--border);
  padding-top: 24px;
}
.queue-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}
.queue-table th {
  background: var(--bg-subtle);
  padding: 10px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: left;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}
.queue-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  vertical-align: middle;
}
.cue-edit-input {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: var(--font-sans);
}
.cue-edit-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2);
}

/* Modern High-End Footer */
.site-footer {
  margin-top: auto;
  background: #ffffff;
  border-top: 1px solid var(--border);
  padding: 56px 0 max(48px, env(safe-area-inset-bottom, 32px));
  font-size: 0.9rem;
  color: var(--text-secondary);
  width: 100%;
}
.footer-top-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-col-brand .footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.footer-brand-title .brand-accent {
  color: var(--primary);
}
.footer-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 440px;
  margin-bottom: 14px;
}
.footer-security-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.footer-col-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}
.footer-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links-list a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.15s;
}
.footer-links-list a:hover {
  color: var(--primary);
}
.footer-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.84rem;
  color: var(--text-muted);
}
.footer-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.status-dot-green {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}
@media (max-width: 860px) {
  .footer-top-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-bottom-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Modern Language Select Box */
.lang-select-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 10px;
  padding: 2px 10px 2px 8px;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.lang-select-wrapper:hover, .lang-select-wrapper:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}
.lang-icon {
  font-size: 1rem;
  margin-right: 6px;
  opacity: 0.85;
}
.lang-select {
  background: transparent;
  color: #f1f5f9;
  border: none;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  padding: 6px 4px;
}
.lang-select option {
  background: #0f172a;
  color: #f8fafc;
  padding: 8px;
}

/* AdSense Slot Protection */
.ad-placement-slot {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 100px;
  overflow: visible !important;
  clear: both !important;
}

.ad-placement-slot ins.adsbygoogle, .ad-placement-slot iframe {
  display: block !important;
  max-width: 100% !important;
  overflow: visible !important;
  margin: 0 auto !important;
}

body {
  padding-bottom: max(32px, env(safe-area-inset-bottom, 24px));
}

