:root {
  --mint-green: #40E0D0;
  --mint-green-light: #7FFFD4;
  --mint-green-dark: #20B2AA;
  --mint-green-alpha: rgba(64, 224, 208, 0.1);
  --mint-bright: #7FFFD4;
}

/* Initial bright mint state */
body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--mint-bright), var(--mint-green));
    height: 100vh;
    margin: 0;
    padding: 0;
    transition: all 0.8s ease-in-out;
}

/* Active state (after form submission) */
body.active {
  background: #212529;
  padding: 24px;
  padding-top: calc(24px + 50px);
}

html {
    overflow-x: hidden;
    overflow-y: scroll;
}
body {

}

/* Initial centered layout */
.app-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100%;
  padding: 20px;
  transition: all 0.8s ease-in-out;
}

/* Active layout (after form submission) */
body.active .app-container {
  justify-content: flex-start;
  align-items: stretch;
  min-height: auto;
  padding: 0;
}

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.desc { white-space: pre-wrap; }
.chip { 
  display:inline-block; 
  padding:.15rem .5rem; 
  border:1px solid var(--mint-green); 
  border-radius:50rem; 
  font-size:.8rem; 
  margin-right:.35rem;
  background-color: var(--mint-green-alpha);
  color: var(--mint-green-light);
}
textarea { min-height: 200px !important; }

.table td, .table th { vertical-align: middle; }

/* Mint green accents */
.btn-primary, .btn-dark {
  background-color: var(--mint-green-dark);
  border-color: var(--mint-green-dark);
}
.btn-primary:hover, .btn-dark:hover {
  background-color: var(--mint-green);
  border-color: var(--mint-green);
}
.btn-outline-secondary {
  color: var(--mint-green);
  border-color: var(--mint-green);
}
.btn-outline-secondary:hover {
  background-color: var(--mint-green);
  border-color: var(--mint-green);
  color: #000;
}

/* Card headers with mint accent */
.card-header {
  background-color: var(--mint-green-alpha) !important;
  border-bottom: 1px solid var(--mint-green-dark);
}

/* Table header styling */
.table-light {
  background-color: var(--mint-green-alpha) !important;
}

/* Structured transcript timestamp badge */
.timestamp-link {
  text-decoration: none;
}
.badge-timestamp {
  display: inline-block;
  border-radius: 9999px;
  padding: 2px 10px;
  background: var(--mint-green);
  color: #0b1f1d; /* dark text for contrast on mint */
  border: 1px solid var(--mint-green-dark);
  transition: transform .08s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
.badge-timestamp .badge-content {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  letter-spacing: .02em;
}
.badge-timestamp .play-icon {
  color: #0b1f1d; /* dark play icon on mint */
}
.badge-timestamp .time-text { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.badge-timestamp:hover,
.badge-timestamp:focus-visible {
  text-decoration: none;
  background: var(--mint-green-light);
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
  color: #0a1413;
}
.badge-timestamp:active { transform: translateY(1px); }

/* Extra small text utility for disclaimers and fine print */
.xsmall, .text-xsmall {
  font-size: 0.75rem; /* smaller than Bootstrap .small (which is ~0.875rem) */
  line-height: 1.25rem;
}

/* Disclaimer specific styling */
.disclaimer-text {
  font-size: 0.72rem;
  line-height: 1.15rem;
  opacity: 0.85;
}

/* Initial state - hide transcript sections */
.transcript-section {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-in-out;
  display: none;
}

/* Active state - show transcript sections */
body.active .transcript-section {
  opacity: 1;
  transform: translateY(0);
  display: block;
}

/* Initial input card styling */
.input-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: none;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border-radius: 20px;
  width: 100%;
  transform: translateY(0);
  transition: all 0.8s ease-in-out;
}

/* Active input card styling */
body.active .input-card {
  background: #212529;
  backdrop-filter: none;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  border-radius: 0.375rem;
  max-width: none;
  transform: translateY(-20px);
}

/* When overlay is visible, prevent scrollbars and layout shifts */
body.overlay-active {
  overflow: hidden !important;
  background: #212529 !important; /* prevent any white flash */
  transition: none !important; /* freeze transitions during overlay show */
}

/* Big app-like button */
.btn-app {
  font-size: 1.25rem;
  padding: 15px 40px;
  border-radius: 50px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 10px 30px rgba(64, 224, 208, 0.3);
  transition: all 0.3s ease;
}

.btn-app:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(64, 224, 208, 0.4);
}

/* Animated loader overlay */
.loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #212529;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  will-change: opacity, visibility;
  transform: translateZ(0);
  overflow-y: hidden;
}

.loader-overlay.show {
  opacity: 1;
  visibility: visible;
}

.loader-content {
  text-align: center;
  color: var(--mint-green-light);
}

.loader-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: spin 2s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Ad Widget Styles */
.ad-widget {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--mint-green-alpha);
  padding: 8px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  font-size: 0.9rem;
  opacity: 0;
  transform: translateY(-100%);
  transition: all 0.5s ease-in-out;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.ad-widget.show {
  opacity: 1;
  transform: translateY(0);
}

body.active .ad-widget {
  background: rgba(33, 37, 41, 0.95);
  color: var(--mint-green-light);
  border-bottom-color: var(--mint-green-dark);
}

.ad-content {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 1;
}

.ad-text {
  color: #555;
  font-weight: 400;
}

body.active .ad-text {
  color: var(--mint-green-light);
}

.ad-link {
  color: var(--mint-green-dark);
  text-decoration: none;
  font-weight: 500;
  padding: 4px 12px;
  border: 1px solid var(--mint-green);
  border-radius: 15px;
  background: var(--mint-green-alpha);
  transition: all 0.3s ease;
  font-size: 0.85rem;
}

.ad-link:hover {
  background: var(--mint-green);
  color: #000;
  transform: translateY(-1px);
}

.ad-info {
  margin-left: 15px;
}

.ad-info i {
  color: var(--mint-green-dark);
  cursor: pointer;
  font-size: 1.6rem;
  opacity: 0.7;
  transition: all 0.3s ease;
}

.ad-info i:hover {
  opacity: 1;
  color: var(--mint-green);
  transform: scale(1.1);
}

body.active .ad-info i {
  color: var(--mint-green-light);
}

body.active .ad-info i:hover {
  color: var(--mint-green);
}

/* Adjust body padding for ad widget */
body {
  padding-top: 50px;
}

body.ad-active {
  padding-top: 50px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* Hide the "What is this?" helper button after submission */
body.active .input-card .text-center.mt-3 {
  display: none !important;
}

/* Larger video input text */
.input-card #videoInput {
  font-size: 1.5rem; /* slightly larger for better readability */
}
.input-card .input-group-text {
  font-size: 1.2rem; /* keep label in proportion */
}

/* Hero logo next to title */
.hero-title .hero-logo {
    height: 65px;
    width: auto;
    vertical-align: middle;
    margin-right: 10px;
}
@media (max-width: 576px) {
  .hero-title .hero-logo {
    height: 28px;
  }
}

/* Helper button new style */
.btn-help {
  --pc-mint: var(--mint-green);
  --pc-mint-dark: var(--mint-green-dark);
  --pc-bg: rgba(255,255,255,0.9);
  --pc-fg: #0b3b36;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem .9rem;
  font-weight: 600;
  font-size: .95rem;
  border-radius: 999px; /* pill */
  border: 1px solid var(--pc-mint);
  color: var(--pc-fg);
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,255,255,0.8));
  box-shadow: 0 6px 20px rgba(64,224,208,0.25);
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn-help:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(64,224,208,0.35);
  border-color: var(--pc-mint-dark);
}
.btn-help:active { transform: translateY(0); }

/* Dark theme variant after submission */
body.active .btn-help {
  --pc-bg: rgba(33,37,41,0.9);
  --pc-fg: var(--mint-green-light);
  background: linear-gradient(180deg, rgba(33,37,41,0.98), rgba(33,37,41,0.9));
  color: var(--pc-fg);
  border-color: var(--mint-green);
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}
body.active .btn-help:hover {
  box-shadow: 0 10px 24px rgba(0,0,0,0.45);
}

/* Tooltip for ad info */
.ad-tooltip .tooltip-inner {
  max-width: 320px;
  text-align: left;
  padding: 12px 14px;
}


/* About modal visual improvements */
.about-header { border-bottom: 0; }
.about-title-icon { color: var(--mint-green-dark); font-size: 1.25rem; }

.about-hero { margin-top: .25rem; margin-bottom: .25rem; }
.about-hero-icon { font-size: 2.5rem; color: #FF0000; line-height: 1; margin-bottom: .25rem; }
.kid-bold { font-weight: 600; font-size: 1.1rem; }

.about-tiles .about-tile {
  display: flex; gap: .75rem; align-items: flex-start;
  background: var(--mint-green-alpha);
  border: 1px solid var(--mint-green);
  border-radius: 12px; padding: 12px 14px;
}
.about-tile-icon { color: var(--mint-green-dark); font-size: 1.4rem; line-height: 1; }

.about-steps .about-step {
  display: flex; flex-direction: column; gap: .6rem; align-items: center; text-align: center;
  background: rgba(0,0,0,0.03);
  border: 1px dashed var(--mint-green);
  border-radius: 12px; padding: 16px 14px;
}
body.active .about-steps .about-step { background: rgba(255,255,255,0.03); }
.about-step-icon {
    color: var(--mint-green);
    font-size: 2.9rem;
    line-height: 1;
    margin-top: 0;
    padding: 8px 0 12px;
}
.about-step-title { font-weight: 600; }
.about-step-text { color: #6c757d; font-size: .95rem; }

/* Make all three step cards equal height on larger screens */
@media (min-width: 768px) {
  .about-steps .col-12.col-md-4 {
    display: flex;
  }
  .about-steps .about-step {
    flex: 1;
    min-height: 120px; /* fixed baseline so all three match visually */
  }
}

/* Ensure all step sublines use equal space so cards align on all sizes */
.about-steps .about-step-text { min-height: 48px; display: block; }
@media (min-width: 768px) {
  .about-steps .about-step-text { min-height: 48px; }
}

.about-tips { margin: 0; padding-left: 0; display: grid; gap: .45rem; list-style: none; }
.about-tips .tip-row { line-height: 1.35; }
.tip-badge {
  display: inline-block; margin-right: .4rem; font-size: .8rem; font-weight: 600;
  padding: .15rem .45rem; border-radius: 999px;
  color: var(--mint-green-dark); background: var(--mint-green-alpha);
  border: 1px solid var(--mint-green);
}

/* Make modal content a bit larger for readability */
#aboutModal .modal-body { font-size: 1rem; }
#aboutModal .lead { font-size: 1.1rem; }
