/* Gold Cauldron video share — brand styles
   Palette from goldcauldron.com: gold #f59e0b (primary), platinum slate grays,
   black background. Single committed dark theme. */

:root {
  --bg: #030304;
  --panel: rgba(15, 23, 42, 0.42);
  --panel-solid: #0b1220;
  --panel-dark: #000000;
  --text: #ffffff;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --border: #334155;
  --border-strong: #475569;
  --gold: #f59e0b;
  --gold-bright: #fbbf24;
  --gold-deep: #d97706;
  --accent: var(--gold);
  --accent-text: #000000;
  --danger: #f87171;
  --danger-bg: rgba(69, 15, 15, 0.5);
  --danger-border: #7f1d1d;
  --ok: #4ade80;
  --ok-bg: rgba(9, 38, 20, 0.5);
  --ok-border: #14532d;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 8px 32px rgba(0, 0, 0, 0.45);
  --glow: 0 4px 24px rgba(245, 158, 11, 0.22);
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 55% at 50% -10%, rgba(245, 158, 11, 0.16), transparent 60%),
    radial-gradient(ellipse 60% 40% at 85% 110%, rgba(245, 158, 11, 0.07), transparent 60%),
    linear-gradient(160deg, #030304 0%, #0c1322 55%, #030304 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: -apple-system, "SF Pro Text", Inter, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

::selection {
  background: rgba(245, 158, 11, 0.35);
}

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

.container.wide {
  max-width: 1000px;
}

main {
  flex: 1;
  width: 100%;
  padding: 40px 0 64px;
}

/* Header */

.site-header {
  padding: 24px 0 8px;
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.01em;
}

.brand img {
  width: 30px;
  height: 30px;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(255, 255, 255, 0.35));
}

.brand .gold {
  color: var(--gold);
}

/* Hero */

.hero {
  text-align: center;
  padding: 44px 0 36px;
}

.hero h1 {
  font-size: clamp(32px, 6vw, 50px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0 0 14px;
}

.hero h1 .gold {
  display: block;
  background: linear-gradient(90deg, var(--gold-bright), var(--gold-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: 2px;
}

.hero p {
  color: var(--soft);
  font-size: 17px;
  margin: 0;
}

.gold-divider {
  width: 120px;
  height: 2px;
  margin: 22px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* Cards */

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.3s ease;
}

.card:hover {
  border-color: rgba(245, 158, 11, 0.5);
}

.card + .card {
  margin-top: 20px;
}

.card h2 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}

/* Drop zone */

.dropzone {
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 64px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease,
    box-shadow 0.2s ease, transform 0.15s ease;
  outline: none;
}

.dropzone:hover {
  border-color: rgba(245, 158, 11, 0.6);
  box-shadow: var(--glow);
}

.dropzone:focus-visible {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.35);
}

.dropzone.dragover {
  border-color: var(--gold);
  background: rgba(245, 158, 11, 0.08);
  box-shadow: var(--glow);
  transform: scale(1.01);
}

.dropzone .dz-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  border-radius: 14px;
  background: var(--gold);
  color: var(--accent-text);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.35);
}

.dropzone .dz-icon svg {
  width: 22px;
  height: 22px;
}

.dropzone .dz-title {
  font-size: 17px;
  font-weight: 650;
  margin: 0 0 4px;
}

.dropzone .dz-sub {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.6);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease,
    color 0.2s ease, opacity 0.2s ease, transform 0.06s ease,
    box-shadow 0.2s ease;
  white-space: nowrap;
}

.btn:hover {
  border-color: rgba(245, 158, 11, 0.6);
  color: var(--gold-bright);
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.35);
}

.btn.primary {
  background: var(--gold);
  color: var(--accent-text);
  border-color: var(--gold);
  box-shadow: 0 2px 14px rgba(245, 158, 11, 0.3);
}

.btn.primary:hover {
  background: var(--gold-deep);
  border-color: var(--gold-deep);
  color: var(--accent-text);
}

.btn.danger {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #ffffff;
}

.btn.danger:hover {
  background: #991b1b;
  border-color: #991b1b;
  color: #ffffff;
}

.btn.small {
  padding: 5px 12px;
  font-size: 13px;
  border-radius: 8px;
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Progress */

.progress-wrap {
  margin-top: 4px;
}

.progress-name {
  font-weight: 650;
  font-size: 14px;
  margin: 0 0 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-track {
  height: 8px;
  background: rgba(51, 65, 85, 0.6);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-bright), var(--gold-deep));
  border-radius: 999px;
  transition: width 0.15s ease;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.progress-stats {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
}

/* Link rows / success card */

.link-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.link-box {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.5);
  padding: 9px 12px;
  font-size: 14px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--gold-bright);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hint {
  color: var(--muted);
  font-size: 13px;
  margin: 14px 0 0;
}

.hint a {
  color: inherit;
}

.hint strong {
  color: var(--soft);
}

.hint.warn {
  color: var(--danger);
}

/* Notices */

.notice {
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  margin-top: 14px;
}

.notice.error {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger);
}

.notice.ok {
  background: var(--ok-bg);
  border: 1px solid var(--ok-border);
  color: var(--ok);
}

/* Uploads list */

.uploads-section {
  margin-top: 44px;
}

.uploads-section h2 {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 12px;
}

.upload-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.3s ease;
}

.upload-item:hover {
  border-color: rgba(245, 158, 11, 0.5);
}

.upload-item + .upload-item {
  margin-top: 10px;
}

.upload-item .info {
  flex: 1;
  min-width: 0;
}

.upload-item .name {
  font-weight: 650;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-item .date {
  color: var(--muted);
  font-size: 13px;
}

.upload-item .actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* Watch page */

.video-panel {
  background: #000;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow), 0 0 60px rgba(245, 158, 11, 0.08);
  line-height: 0;
}

.video-panel + .card {
  margin-top: 24px;
}

.video-panel video {
  width: 100%;
  max-height: 78vh;
  display: block;
  background: #000;
}

.watch-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 20px 0 4px;
  overflow-wrap: anywhere;
}

.meta-line {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 18px;
  font-variant-numeric: tabular-nums;
}

.watch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

/* Contact card (watch page) */

.contact-card .contact-line {
  color: var(--soft);
  font-size: 15px;
  margin: 0 0 14px;
}

.contact-phone {
  color: var(--gold-bright);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.contact-phone:hover {
  text-decoration: underline;
}

.contact-cta {
  margin: 0 0 6px;
}

.contact-or {
  color: var(--muted);
  font-size: 13px;
  margin: 12px 0 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.contact-or::before,
.contact-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Login card (index page) */

.login-note {
  color: var(--muted);
  font-size: 13px;
  margin: 14px 0 0;
}

.header-account {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.header-account .email {
  color: var(--soft);
}

.linklike {
  background: none;
  border: none;
  padding: 0;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
}

.linklike:hover {
  color: var(--gold-bright);
}

/* Editor */

.editor-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 16px 0 12px;
  color: var(--soft);
  font-size: 14px;
}

.toolbar-spacer { flex: 1; }

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  user-select: none;
}

.toggle input { accent-color: var(--gold); }

.duration-info {
  font-variant-numeric: tabular-nums;
  color: var(--gold-bright);
  font-weight: 650;
}

.timeline-wrap { margin-bottom: 20px; }

.timeline {
  position: relative;
  height: 52px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: crosshair;
  touch-action: none;
  overflow: hidden;
}

.playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: var(--gold-bright);
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.8);
  pointer-events: none;
  z-index: 3;
}

.cut-region {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(185, 28, 28, 0.45);
  border-left: 1px solid #ef4444;
  border-right: 1px solid #ef4444;
  cursor: pointer;
  z-index: 2;
}

.cut-region.selected {
  background: rgba(185, 28, 28, 0.65);
  box-shadow: 0 0 0 1px #ef4444 inset;
}

.cut-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 10px;
  cursor: ew-resize;
  z-index: 4;
}

.cut-handle.l { left: -5px; }
.cut-handle.r { right: -5px; }

.cut-x {
  position: absolute;
  top: 2px;
  right: 3px;
  z-index: 5;
  background: #b91c1c;
  color: #fff;
  border: none;
  border-radius: 6px;
  width: 20px;
  height: 20px;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}

.transcript-card h2 .hint-inline {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.transcript {
  line-height: 2.1;
  font-size: 16px;
  user-select: none;
  max-height: 320px;
  overflow-y: auto;
}

.word {
  cursor: pointer;
  border-radius: 4px;
  padding: 2px 1px;
  transition: background-color 0.1s ease;
}

.word:hover { background: rgba(245, 158, 11, 0.25); }

.word.selecting { background: rgba(245, 158, 11, 0.4); }

.word.struck {
  text-decoration: line-through;
  text-decoration-color: #ef4444;
  text-decoration-thickness: 2px;
  color: var(--muted);
  background: rgba(185, 28, 28, 0.18);
}

.editor-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

/* Spinner */

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

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

.center-card {
  text-align: center;
  padding: 48px 24px;
}

.center-card h2 {
  margin-bottom: 6px;
}

.center-card p {
  color: var(--muted);
  margin: 0;
}

/* Forms */

.form-field {
  margin-bottom: 14px;
}

.form-field label {
  display: block;
  font-size: 13px;
  font-weight: 650;
  color: var(--soft);
  margin-bottom: 6px;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.5);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--muted);
}

.form-field textarea {
  resize: vertical;
  min-height: 90px;
}

.form-field input:focus-visible,
.form-field textarea:focus-visible {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
}

/* Footer */

.site-footer {
  padding: 28px 0;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid rgba(51, 65, 85, 0.5);
}

.site-footer .gold {
  color: var(--gold);
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--gold-bright);
}

/* Utility */

.hidden {
  display: none !important;
}

@media (max-width: 560px) {
  .upload-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .link-row {
    flex-wrap: wrap;
  }

  .link-box {
    flex-basis: 100%;
  }

  .dropzone {
    padding: 44px 16px;
  }
}
