/* Video Compressor Styles */

/* Main Section */
.page {
  --section-padding-top: 2.25rem;
  padding: var(--section-padding-top) 0.75rem;
  min-height: calc(100vh - 160px);
}

.lead {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  max-width: 800px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .lead {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
  }
}

/* ── Highlights grid ── */
.highlights-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

@media (max-width: 768px) {
  .highlights-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-top: 1.5rem;
  }
}

.highlight-card {
  position: relative;
  padding: 1.5rem;
  border-radius: 16px;
  background: rgba(8, 15, 25, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(57, 255, 20, 0.08);
  transition: transform 0.35s ease, border-color 0.35s ease;
  backdrop-filter: blur(18px);
}

@media (max-width: 768px) {
  .highlight-card {
    padding: 1rem;
    border-radius: 12px;
  }
}

.highlight-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: rgba(57, 255, 20, 0.12);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.highlight-card:hover { transform: translateY(-6px); }
.highlight-card:hover::after { opacity: 1; }

.highlight-card__eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.6);
}

.highlight-card__title {
  margin: 0.25rem 0 0.5rem;
  font-size: 1.2rem;
  color: #e0ffef;
}

.highlight-card__text {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.75);
}

/* ── Compatibility notice ── */
.compat-notice[hidden] { display: none; }

.compat-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 1rem 0;
  padding: 0.9rem 1.1rem;
  background: rgba(255, 180, 0, 0.08);
  border: 1px solid rgba(255, 180, 0, 0.3);
  border-radius: 10px;
  color: rgba(255, 220, 120, 0.95);
  font-size: 0.9rem;
  line-height: 1.5;
}

.compat-notice__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 0.1rem;
  fill: rgba(255, 200, 60, 0.9);
}

.compat-notice__text { margin: 0; }

/* ── Main layout ── */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: start;
  margin-top: 24px;
  padding: 20px;
  background: rgba(24, 28, 42, 0.85);
  border-radius: 18px;
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.1);
}

@media (max-width: 1024px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .main-layout {
    padding: 14px 8px;
    gap: 12px;
  }
}

.helper-card {
  padding: 1rem;
  border-radius: 14px;
  background: rgba(5, 12, 24, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px);
  height: fit-content;
}

@media (max-width: 768px) {
  .helper-card { padding: 1rem; border-radius: 12px; }
}

.helper-card__header {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.helper-card__icon { width: 48px; height: 48px; flex-shrink: 0; }

@media (max-width: 768px) {
  .helper-card__icon { width: 36px; height: 36px; }
}

.helper-card__eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

.helper-card__title {
  font-size: 1.1rem;
  color: #e0ffef;
  margin: 0.25rem 0 0;
}

@media (max-width: 768px) {
  .helper-card__title { font-size: 1rem; }
}

.helper-list {
  margin: 1rem 0;
  padding-left: 1.25rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .helper-list { font-size: 0.85rem; padding-left: 1rem; margin: 0.75rem 0; }
}

.helper-list li { margin-bottom: 0.5rem; }

.helper-card__divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: 1rem 0;
}

/* ── Upload area ── */
.upload-controls-group { display: flex; flex-direction: column; gap: 16px; }

.upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 2.5rem 1.5rem;
  border: 2px dashed rgba(57, 255, 20, 0.35);
  border-radius: 14px;
  background: rgba(8, 15, 25, 0.6);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
  text-align: center;
}

@media (max-width: 480px) {
  .upload-area {
    padding: 1.5rem 1rem;
    gap: 0.45rem;
  }
}

.upload-area:hover,
.upload-area.drag-over {
  border-color: rgba(57, 255, 20, 0.8);
  background: rgba(57, 255, 20, 0.04);
}

.upload-icon { width: 56px; height: 56px; }

@media (max-width: 480px) {
  .upload-icon { width: 40px; height: 40px; }
}

.upload-title {
  margin: 0;
  font-size: 1.25rem;
  color: #e0ffef;
}

@media (max-width: 480px) {
  .upload-title { font-size: 1.05rem; }
}

.upload-description {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.65);
}

@media (max-width: 480px) {
  .upload-description { font-size: 0.85rem; }
}

.upload-formats {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(0, 240, 255, 0.7);
  letter-spacing: 0.03em;
}

.upload-filename {
  margin: 0;
  font-size: 0.85rem;
  color: #39ff14;
  min-height: 1.2em;
  word-break: break-all;
}

.upload-area input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: 8px;
  background: rgba(57, 255, 20, 0.12);
  border: 1px solid rgba(57, 255, 20, 0.4);
  color: #39ff14;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
}

.upload-button:hover {
  background: rgba(57, 255, 20, 0.22);
  border-color: rgba(57, 255, 20, 0.7);
}

.button-icon { width: 18px; height: 18px; }

/* ── Processing status ── */
.processing-status[hidden] { display: none; }

.processing-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 2.5rem 1.5rem;
  border-radius: 14px;
  background: rgba(8, 15, 25, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 480px) {
  .processing-status {
    padding: 1.5rem 1rem;
  }
}

.spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(57, 255, 20, 0.2);
  border-top-color: #39ff14;
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.processing-text {
  margin: 0;
  font-size: 1.05rem;
  color: #e0ffef;
  font-weight: 600;
}

.processing-subtext {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
}

.progress-bar-wrap {
  width: 100%;
  max-width: 360px;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #39ff14, #00f0ff);
  border-radius: 99px;
  transition: width 0.25s ease;
}

.progress-label {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(0, 240, 255, 0.85);
  font-variant-numeric: tabular-nums;
}

.cancel-button {
  padding: 0.45rem 1.2rem;
  border-radius: 7px;
  background: rgba(255, 60, 60, 0.1);
  border: 1px solid rgba(255, 60, 60, 0.35);
  color: rgba(255, 100, 100, 0.9);
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.cancel-button:hover {
  background: rgba(255, 60, 60, 0.2);
}

/* ── Workspace panel ── */
.workspace-panel { display: flex; flex-direction: column; gap: 18px; }

@media (min-width: 900px) {
  .workspace-panel {
    display: grid;
    grid-template-columns: 300px 1fr;
    grid-template-areas:
      "controls stats"
      "controls videos";
    align-items: start;
    gap: 16px;
  }
  .controls-area {
    grid-area: controls;
    position: sticky;
    top: 20px;
  }
  .stats-grid    { grid-area: stats; }
  .video-comparison { grid-area: videos; }
}

/* Action buttons */
.download-options { display: flex; gap: 10px; flex-wrap: wrap; }

@media (max-width: 480px) {
  .download-options { flex-direction: column; }
}

.reset-button,
.download-button,
.recompress-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.2rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.reset-button {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.85);
}
.reset-button:hover { background: rgba(255, 255, 255, 0.12); }

@media (max-width: 480px) {
  .reset-button,
  .download-button {
    width: 100%;
    justify-content: center;
  }
}

.download-button {
  background: rgba(57, 255, 20, 0.12);
  border-color: rgba(57, 255, 20, 0.4);
  color: #39ff14;
}
.download-button:hover { background: rgba(57, 255, 20, 0.22); border-color: rgba(57, 255, 20, 0.7); }

.recompress-button {
  background: rgba(0, 240, 255, 0.08);
  border-color: rgba(0, 240, 255, 0.35);
  color: #00f0ff;
  width: 100%;
  justify-content: center;
}
.recompress-button:hover { background: rgba(0, 240, 255, 0.15); }

/* ── Control section ── */
.control-section {
  border-radius: 12px;
  background: rgba(5, 12, 24, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.control-section__header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.control-section__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #e0ffef;
}

.control-section__body { padding: 0.75rem 1rem; display: flex; flex-direction: column; gap: 1rem; }

.control-row { display: flex; flex-direction: column; gap: 0.4rem; }

.control-label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.55);
}

.control-input-wrap { display: flex; align-items: center; gap: 0.5rem; }

.control-select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  cursor: pointer;
  appearance: auto;
}

.control-select option {
  background: #0d1526;
  color: rgba(255, 255, 255, 0.9);
}

.control-select option:disabled {
  color: rgba(255, 255, 255, 0.35);
}

.control-select:focus {
  outline: none;
  border-color: rgba(57, 255, 20, 0.5);
}

.slider-wrap { flex-direction: column; align-items: stretch; }

.control-slider {
  width: 100%;
  accent-color: #39ff14;
  height: 6px;
  cursor: pointer;
}

.slider-value-group { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.25rem; }

.slider-number {
  width: 80px;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  text-align: right;
}

.slider-unit {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
}

.recompress-row { margin-top: 0.5rem; }

/* ── Stats grid ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 900px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: rgba(5, 12, 24, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.stat-card--ratio { border-color: rgba(57, 255, 20, 0.2); }

.stat-card__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.45);
}

.stat-card__value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #e0ffef;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 480px) {
  .stat-card__value { font-size: 1rem; }
  .stat-card { padding: 0.65rem 0.75rem; }
}

.stat-card--ratio .stat-card__value { color: #39ff14; }

/* ── Video comparison ── */
.video-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 600px) {
  .video-comparison { grid-template-columns: 1fr; }
}

.video-panel { display: flex; flex-direction: column; gap: 8px; }

.video-panel__title {
  margin: 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.5);
}

.video-preview {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #000;
  max-height: 360px;
  object-fit: contain;
}

/* ── FAQ section ── */
.faq-section {
  margin-top: 2.5rem;
  padding: 2rem 0;
}

@media (max-width: 768px) {
  .faq-section {
    margin-top: 1.5rem;
    padding: 1rem 0;
  }
}

.faq-section__title {
  margin: 0 0 1.25rem;
  font-size: 1.35rem;
  color: #e0ffef;
  text-align: center;
}

@media (max-width: 480px) {
  .faq-section__title { font-size: 1.1rem; }
}

.faq-list { display: flex; flex-direction: column; gap: 0.75rem; max-width: 760px; margin: 0 auto; }

.faq-item {
  border-radius: 10px;
  background: rgba(8, 15, 25, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.faq-item[open] { border-color: rgba(57, 255, 20, 0.2); }

.faq-item__question {
  padding: 0.85rem 1.1rem;
  font-size: clamp(0.85rem, 2.5vw, 0.95rem);
  font-weight: 600;
  color: #e0ffef;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item__question::-webkit-details-marker { display: none; }

.faq-item__question::after {
  content: "+";
  font-size: 1.2rem;
  color: #39ff14;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.faq-item[open] .faq-item__question::after {
  content: "−";
}

.faq-item__answer {
  margin: 0;
  padding: 0 1.1rem 0.85rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  /* Override global style.css rules designed for aria-expanded FAQ pattern */
  max-height: none;
  overflow: visible;
  transition: none;
}
