/* ── AMBIENT ── */
.ambient {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0; overflow: hidden;
}
.ambient::before {
  content: '';
  position: absolute; top: -30%; left: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(255,0,127,0.07) 0%, transparent 70%);
  border-radius: 50%;
  animation: drift1 18s ease-in-out infinite alternate;
}
.ambient::after {
  content: '';
  position: absolute; bottom: -20%; right: -10%;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(0,238,252,0.05) 0%, transparent 70%);
  border-radius: 50%;
  animation: drift2 22s ease-in-out infinite alternate;
}
@keyframes drift1 { from { transform: translate(0,0); } to { transform: translate(80px,60px); } }
@keyframes drift2 { from { transform: translate(0,0); } to { transform: translate(-60px,-80px); } }

/* ── LAYOUT ── */
.transcripts-main {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  padding: 120px 2rem 5rem;
}

/* ── HERO ── */
.transcripts-hero {
  margin-bottom: 2rem;
  animation: slideUp 0.6s cubic-bezier(0.16,1,0.3,1) 0.1s both;
}

.transcripts-hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 900;
  font-size: clamp(2.2rem, 6vw, 4rem);
  text-transform: uppercase;
  letter-spacing: -0.03em;
  line-height: 0.95;
  color: var(--on-surface);
  margin-bottom: 0.5rem;
}

.transcripts-hero h1 .gradient-text {
  display: block;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 30px rgba(255,0,127,0.3));
}

.transcripts-hero p {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--on-surface-variant);
}

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

/* ── HOW TO CARD ── */
.how-to-card {
  background: rgba(0,238,252,0.04);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0,238,252,0.15);
  border-radius: 1rem;
  padding: 1.5rem 2rem;
  margin-bottom: 1.25rem;
  animation: slideUp 0.6s cubic-bezier(0.16,1,0.3,1) 0.15s both;
}

.how-to-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--secondary);
  margin: 0 0 1rem;
}
.how-to-title .material-symbols-outlined { font-size: 1rem; }

.how-to-steps {
  padding-left: 1.25rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.how-to-steps li {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--on-surface-variant);
}

.how-to-steps li strong {
  color: var(--on-surface);
  font-weight: 700;
}

/* ── TOOL CARD ── */
.tool-card {
  background: rgba(37,37,44,0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,0,127,0.15);
  border-radius: 1rem;
  padding: 2rem;
  margin-bottom: 1.5rem;
  animation: slideUp 0.6s cubic-bezier(0.16,1,0.3,1) 0.2s both;
}

/* ── INPUT GROUPS ── */
.input-group {
  margin-bottom: 1.25rem;
}

.input-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--secondary);
  margin-bottom: 0.6rem;
}
.input-label .material-symbols-outlined { font-size: 0.9rem; }

.input-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.input-row--col {
  flex-direction: column;
}

.video-url-input,
.manual-transcript-input {
  flex: 1;
  width: 100%;
  background: rgba(14,14,19,0.7);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 0.6rem;
  color: var(--on-surface);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  padding: 0.7rem 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.manual-transcript-input {
  min-height: 130px;
  resize: vertical;
  line-height: 1.6;
}

.video-url-input:focus,
.manual-transcript-input:focus {
  border-color: rgba(255,0,127,0.4);
  box-shadow: 0 0 0 3px rgba(255,0,127,0.08);
}

.video-url-input::placeholder,
.manual-transcript-input::placeholder {
  color: var(--on-surface-variant);
}

/* ── GENERATE BUTTON ── */
.generate-button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-container));
  color: var(--on-primary);
  border: none;
  cursor: pointer;
  padding: 0.7rem 1.4rem;
  border-radius: 9999px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  box-shadow: 0 0 20px rgba(255,0,127,0.25);
  transition: transform 0.15s, box-shadow 0.2s;
  flex-shrink: 0;
}
.generate-button .material-symbols-outlined { font-size: 0.95rem; }
.generate-button:hover { transform: scale(1.03); box-shadow: 0 0 30px rgba(255,0,127,0.45); }
.generate-button:active { transform: scale(0.97); }


/* ── NOTE ── */
.tool-note {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.72rem;
  color: var(--on-surface-variant);
  margin-top: 1.25rem;
  padding: 0.6rem 0.85rem;
  background: rgba(0,238,252,0.04);
  border: 1px solid rgba(0,238,252,0.1);
  border-radius: 0.5rem;
}
.tool-note .material-symbols-outlined { font-size: 0.9rem; color: var(--secondary); flex-shrink: 0; }

/* ── LOADING ── */
.loading-indicator {
  display: none;
  text-align: center;
  padding: 2.5rem 1rem 1rem;
}

.spinner {
  width: 36px; height: 36px;
  border: 2px solid rgba(255,255,255,0.08);
  border-top: 2px solid var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
  box-shadow: 0 0 16px rgba(255,0,127,0.2);
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

#loading-message {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.82rem;
  color: var(--on-surface-variant);
  max-width: 400px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ── RESULT CARD ── */
.result-card {
  position: relative;
  background: rgba(37,37,44,0.4);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0,238,252,0.15);
  border-radius: 1rem;
  padding: 2rem 2rem 1.5rem;
  margin-bottom: 1.25rem;
  animation: slideUp 0.4s cubic-bezier(0.16,1,0.3,1) both;
}

/* ── BLOG CONTENT ── */
.blog-content {
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1.8;
  color: var(--on-surface);
}

#blog-container,
#blog-container * {
  color: rgba(248,245,253,0.9) !important;
  font-family: 'Space Grotesk', sans-serif !important;
  line-height: 1.8;
}

#blog-container h1 {
  font-size: 1.6rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  background: linear-gradient(90deg, var(--primary), var(--secondary)) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  color: transparent !important;
}

#blog-container h2,
#blog-container h3 {
  font-weight: 700 !important;
  color: var(--on-surface) !important;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

#blog-container p { margin-bottom: 1rem; }

#blog-container ul,
#blog-container ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

#blog-container li { margin-bottom: 0.4rem; }

/* ── COPY BUTTON ── */
.copy-button {
  display: none;
  position: absolute;
  top: 14px; right: 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0.5rem;
  cursor: pointer;
  padding: 6px 8px;
  outline: none;
  transition: background 0.2s, border-color 0.2s;
}
.copy-button:hover { background: rgba(255,0,127,0.12); border-color: rgba(255,0,127,0.3); }
.copy-button svg {
  width: 16px; height: 16px;
  display: block;
  color: rgba(248,245,253,0.6) !important;
  stroke: rgba(248,245,253,0.6) !important;
}

/* ── WORD COUNT ── */
.word-count {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--on-surface-variant);
  text-align: right;
  margin-top: 1rem;
  letter-spacing: 0.05em;
}

/* ── VIDEO EMBED ── */
.video-embed {
  display: none;
  margin-top: 1.75rem;
  border-radius: 0.75rem;
  overflow: hidden;
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.video-embed iframe {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

/* ── SEO PREVIEW ── */
.seo-card {
  background: rgba(0,238,252,0.03);
  border: 1px solid rgba(0,238,252,0.12);
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}

.seo-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--secondary);
  margin: 0 0 0.75rem;
}

.seo-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #8ab4f8;
  margin-bottom: 0.3rem;
}

.seo-url {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.78rem;
  color: #34a853;
  margin-bottom: 0.4rem;
}

.seo-description {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--on-surface-variant);
}

/* ── SHARE & EXPORT ── */
.share-export-container { margin-bottom: 3rem; }

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.share-button,
.export-button {
  flex: 1;
  min-width: 100px;
  padding: 0.65rem 1rem;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: opacity 0.2s, transform 0.1s, box-shadow 0.2s;
}

.share-button.twitter  { background: #1d9bf0; color: #fff; }
.share-button.facebook { background: #1877f2; color: #fff; }
.share-button.linkedin { background: #0a66c2; color: #fff; }
.export-button {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--on-surface);
}

.share-button:hover,
.export-button:hover {
  opacity: 0.88;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.share-button:active,
.export-button:active { transform: scale(0.97); }

/* ── TOOLTIP ── */
.tooltip { position: relative; }
.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(14,14,19,0.95);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--on-surface);
  padding: 4px 10px;
  border-radius: 0.4rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  pointer-events: none;
}
.tooltip:hover::after { opacity: 1; visibility: visible; }

/* ── ERROR MESSAGE ── */
.error-message {
  background: rgba(255,50,50,0.06);
  border: 1px solid rgba(255,80,80,0.2);
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  margin-top: 1rem;
  color: #ff8080;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  line-height: 1.6;
}
.error-message h2 {
  font-size: 1rem;
  font-weight: 800;
  color: #ff8080;
  margin: 0 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.error-message p  { margin-bottom: 0.75rem; }
.error-message ol,
.error-message ul { padding-left: 1.25rem; margin-bottom: 0; }
.error-message li { margin-bottom: 0.4rem; }

/* ── MOBILE ── */
@media (max-width: 640px) {
  .transcripts-main { padding: 100px 1rem 3rem; }
  .tool-card { padding: 1.25rem; }
  .input-row { flex-direction: column; }
  .generate-button { width: 100%; justify-content: center; }
  .button-row { flex-direction: column; }
  .share-button, .export-button { width: 100%; }
}
