/* =============================================
   XMRVideos RED — Component Styles
   ============================================= */

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── HEADER ─── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #1e1e1e;
}

.header-inner {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo img {
  height: 30px;
  width: auto;
  display: block;
}

.header-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--white-muted);
  text-transform: uppercase;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  animation: pulse-red 2s ease infinite;
}

.nav {
  position: absolute;
  top: 16px;
  right: 16px;
}

.nav-menu {
  display: flex;
  gap: 16px;
  align-items: center;
}

.nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;

  background: #ef4444; /* red */
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);

  display: inline-block;
  margin-right: 6px;
}

.nav-item {
  cursor: pointer;
  font-size: 13px;
  opacity: 0.85;
}

a.nav-item {
  text-decoration: none;
  color: inherit;
}

.nav-item:hover {
  opacity: 1;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.nav-hamburger span {
  width: 18px;
  height: 2px;
  background: currentColor;
}

@media (max-width: 640px) {

  .nav-hamburger {
    display: flex;
  }

  .nav-dot {
    display: none;
  }

  .nav-menu {
    position: absolute;
    top: 40px;
    right: 0;

    flex-direction: column;
    gap: 10px;

    background: rgba(0,0,0,0.85);
    padding: 12px;
    border-radius: 10px;

    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
  }

  #nav-toggle:checked ~ .header .nav .nav-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
}

/* ─── MAIN LAYOUT ─── */
.main {
  flex: 1;
  overflow-y: auto;
}

.main::-webkit-scrollbar { width: 6px; }
.main::-webkit-scrollbar-track { background: var(--black-2); }
.main::-webkit-scrollbar-thumb { background: var(--red-dark); border-radius: 0; }
.main::-webkit-scrollbar-thumb:hover { background: var(--red); }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ─── HERO ─── */
.hero {
  background: 
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(204,0,0,0.12) 0%, transparent 70%),
    var(--black);
  border-bottom: 1px solid #181818;
  padding: 5rem 1.5rem 4rem;
}

.hero-inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.hero-eyebrow {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--red);
  margin-bottom: 1.25rem;
  text-transform: uppercase;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 6rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  color: var(--white);
}

.hero-title img {
  display: inline-block;
  vertical-align: middle;
  width: 100%;
  max-width: 880px; /* match your original PNG width */
  height: auto;
}

.hero-logo {
  display: inline-block;
  width: clamp(220px, 50%, 880px); /* scales like the text did */
}

.text-red {
  color: var(--red);
}

.hero-sub {
  font-size: 1rem;
  color: var(--white-muted);
  margin-bottom: 2.5rem;
  letter-spacing: 0.02em;
}

/* ─── SOURCE SELECTOR ─── */
.source-selector {
  margin-bottom: 2rem;
}

.source-label {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--white-muted);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.source-options {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Hide the actual radio inputs */
.src-radio {
  display: none;
}

/* The clickable label cards */
.src-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.4rem;
  background: var(--black-2);
  border: 1px solid #2a2a2a;
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, opacity 0.2s;
  opacity: 0.45;
  min-width: 110px;
}

.src-btn:hover {
  border-color: #444;
  opacity: 0.75;
}

.src-logo {
  height: 28px;
  width: auto;
  display: block;
  /* Strip background colors from logos with backgrounds */
  mix-blend-mode: screen;
}

/* Active state — whichever radio is :checked */
#src-xv:checked ~ .source-options .src-btn,
#src-xn:checked ~ .source-options .src-btn,
#src-ph:checked ~ .source-options .src-btn {
  /* reset all first via sibling order below */
}

/* Per-button active highlighting */
#src-xv:checked + .src-btn,
#src-xn:checked + .src-btn,
#src-ph:checked + .src-btn {
  border-color: var(--red);
  background: rgba(204, 0, 0, 0.1);
  box-shadow: var(--glow-red);
  opacity: 1;
}

/* ─── SEARCH ─── */
.search-form {
  width: 100%;
}

.search-wrap {
  display: flex;
  align-items: center;
  background: var(--black-3);
  border: 1px solid #2e2e2e;
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s;
}

.search-wrap:focus-within {
  border-color: var(--red);
  box-shadow: var(--glow-red);
}

.search-icon {
  padding: 0 1rem;
  color: var(--white-muted);
  flex-shrink: 0;
  display: flex;
}

.search-input {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: transparent;
  border: none;
  outline: none;
  color: var(--white);
  font-size: 1rem;
  padding: 1rem 12px 1rem 0;
}

.search-input::placeholder {
  color: #555;
}

.search-btn {
  flex: 0 0 auto;
  white-space: nowrap;
  background: var(--red);
  color: #fff;
  border: none;
  padding: 0 1.75rem;
  height: 100%;
  min-height: 54px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.15s;
}

.search-btn:hover:not(:disabled) {
  background: var(--red-bright);
}

.search-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.label-short {
  display: none;
}

@media (max-width: 480px) {
  .label-full {
    display: none;
  }

  .label-short {
    display: inline;
  }
}

/* ─── RESULTS ─── */
.results {
  padding: 2.5rem 0 4rem;
  min-height: 300px;
}

.results-header {
  margin-bottom: 1.5rem;
}

.results-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white-dim);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.results-query {
  color: var(--white-muted);
  font-weight: 400;
  text-transform: none;
}

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding: 4rem 0;
  color: var(--white-muted);
}

.error-banner {
  background: rgba(204,0,0,0.1);
  border: 1px solid rgba(204,0,0,0.4);
  color: #ff6b6b;
  padding: 0.875rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.empty-state {
  text-align: center;
  padding: 4rem 0;
  color: var(--white-muted);
}

/* ─── VIDEO GRID ─── */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.video-card {
  background: var(--black-2);
  border: var(--border);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
}

.video-card:hover {
  border-color: var(--red);
  transform: translateY(-2px);
}

.video-thumb {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--black-3);
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.video-card:hover .video-thumb img {
  transform: scale(1.04);
}

.video-duration {
  position: absolute;
  bottom: 6px;
  right: 8px;
  background: rgba(0,0,0,0.85);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 2px;
}

.video-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.video-card:hover .video-overlay {
  background: rgba(0,0,0,0.5);
}

.play-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.2s, transform 0.2s;
  padding-left: 3px;
}

.video-card:hover .play-btn {
  opacity: 1;
  transform: scale(1);
}

.video-info {
  padding: 0.75rem 0.875rem;
}

.video-title {
  font-size: 0.85rem;
  line-height: 1.35;
  color: var(--white-dim);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.5rem;
  line-clamp: 2; /* Standard property for compatibility */
}

.video-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.price-tag {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 0.04em;
}

.buy-link {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--white-muted);
  text-transform: uppercase;
  transition: color 0.15s;
}

.video-card:hover .buy-link {
  color: var(--white);
}

/* ─── LANDING INFO ─── */
.landing-info {
  padding: 3rem 0;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  background: #1a1a1a;
  border: 1px solid #1a1a1a;
  border-radius: var(--radius);
  overflow: hidden;
}

.info-card {
  background: var(--black-2);
  padding: 2rem;
}

.info-icon {
  color: var(--red);
  margin-bottom: 1rem;
}

.info-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  color: var(--white);
}

.info-card p {
  font-size: 0.875rem;
  color: var(--white-muted);
  line-height: 1.6;
}

/* ─── MODAL ─── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--black-2);
  border: 1px solid #2a2a2a;
  border-radius: var(--radius);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 1.5rem 1.25rem;
  border-bottom: 1px solid #222;
}

.modal-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--red);
  background: rgba(204,0,0,0.12);
  border: 1px solid rgba(204,0,0,0.3);
  padding: 2px 8px;
  margin-bottom: 0.4rem;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--white);
  text-transform: uppercase;
}

.modal-close {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: var(--white-muted);
  padding: 0.25rem;
  display: flex;
  transition: color 0.15s;
}

.modal-close:hover {
  color: var(--white);
}

.modal-body {
  padding: 1.5rem;
}

/* ─── STEPS ─── */
.step {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.step-number {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 900;
  color: #1e1e1e;
  line-height: 1;
  margin-bottom: -0.5rem;
}

.step h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--white);
}

.step-desc {
  font-size: 0.875rem;
  color: var(--white-muted);
  line-height: 1.6;
}

.turnstile-wrap {
  margin: 0.5rem 0;
}

/* ─── BUTTONS ─── */
.btn-primary {
  background: var(--red);
  color: #fff;
  border: none;
  padding: 0.875rem 2rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: var(--radius);
  transition: background 0.15s, transform 0.1s;
  width: 100%;
  justify-content: center;
  margin-top: 0.5rem;
}

.btn-primary:hover:not(:disabled) {
  background: var(--red-bright);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-download {
  background: var(--red);
  color: #fff;
  padding: 1rem 2rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  border-radius: var(--radius);
  transition: background 0.15s, transform 0.1s;
  margin-top: 0.5rem;
}

.btn-download:hover {
  background: var(--red-bright);
  transform: translateY(-1px);
}

/* ─── INVOICE FIELDS ─── */
.invoice-amount {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  background: rgba(204,0,0,0.08);
  border: 1px solid rgba(204,0,0,0.25);
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
}

.amount-value {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--red-bright);
  letter-spacing: -0.01em;
}

.amount-label {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--red);
}

.invoice-field-label {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--white-muted);
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.invoice-field {
  background: var(--black-3);
  border: var(--border);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  border-radius: var(--radius);
  transition: border-color 0.15s;
}

.invoice-field:hover {
  border-color: #444;
}

.invoice-field-value {
  flex: 1;
  font-family: 'Courier New', monospace;
  font-size: 0.75rem;
  color: var(--white-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-btn {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: var(--white-muted);
  display: flex;
  padding: 2px;
  transition: color 0.15s;
}

.copy-btn:hover {
  color: var(--white);
}

.cdn-input {
  width: 100%;
  background: var(--black-3);
  border: var(--border);
  color: var(--white);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.2s;
}

.cdn-input:focus {
  border-color: var(--red);
}

.cdn-input::placeholder {
  color: #444;
}

.invoice-timer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--black-3);
  border: var(--border);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
}

.invoice-status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.875rem;
  color: var(--white-dim);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  flex-shrink: 0;
}

.status-dot.pulsing {
  animation: pulse-red 1.5s ease infinite;
}

.invoice-timer {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--white-muted);
}

/* ─── PAID / DOWNLOAD ─── */
.paid-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: #4dff91;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.download-meta {
  font-size: 0.8rem;
  color: var(--white-muted);
}

/* ─── ERRORS ─── */
.error-msg {
  background: rgba(204,0,0,0.1);
  border: 1px solid rgba(204,0,0,0.35);
  color: #ff6b6b;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  border-radius: var(--radius);
}

/* ─── UTILITY BAR ─── */
.util-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
  max-width: 100%;
  margin-top: 0.75rem;
}

.util-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(6px);
  white-space: nowrap;
  flex-shrink: 1;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white-muted);
  cursor: default;
  transition: color 0.15s, background 0.15s;
}

.util-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white-dim);
}

.util-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--red);
  opacity: 0.7;
  flex-shrink: 0;
}

/* ─── FOOTER ─── */
.footer {
  border-top: 1px solid #161616;
  padding: 2rem 0;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-logo {
  height: 24px;
  width: auto;
  opacity: 0.6;
}

.footer-text {
  font-size: 0.8rem;
  color: var(--white-muted);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 640px) {
  .hero {
    padding: 3rem 1.5rem 2.5rem;
  }

  .video-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .modal {
    max-width: 100%;
  }
}

@media (max-width: 400px) {
  .video-grid {
    grid-template-columns: 1fr;
  }
}

.progress-bar-track {
  width: 100%;
  height: 3px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
  margin: 12px 0 8px;
}

.progress-bar-fill {
  height: 100%;
  width: 40%;
  background: #ef4444;
  border-radius: 999px;
  box-shadow: 0 0 8px #ef4444, 0 0 16px #ef444466;
  animation: indeterminate 2.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes indeterminate {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

.step-hint {
  font-size: 0.8rem;
  color: #9ca3af;
  margin: 0;
}