/**
 * Components CSS — All UI components
 * Aesthetic: Dark editorial · premium adult platform
 */

/* ═══════════════════════════════════════════════
   HEADER
═══════════════════════════════════════════════ */

.header {
  position: relative;
  padding: var(--sp-3xl) var(--sp-xl) var(--sp-2xl);
  text-align: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
}

/* Radial glow behind the logo */
.header::before {
  content: '';
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 480px;
  height: 280px;
  background: radial-gradient(ellipse at center, rgba(192,24,74,0.22) 0%, transparent 70%);
  pointer-events: none;
}

/* Thin accent bar at the very top */
.header::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--accent) 40%, var(--accent-bright) 60%, transparent 100%);
}

.header-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-md);
  animation: revealUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.logo {
  font-family: var(--font-display);
  font-size: var(--fs-4xl);
  font-weight: var(--fw-black);
  font-style: italic;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  letter-spacing: -0.03em;
  margin-bottom: 0;
  line-height: 1;
}

.logo i {
  font-size: 0.75em;
  color: var(--accent-bright);
  filter: drop-shadow(0 0 10px var(--accent-glow));
}

.tagline {
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-light);
  color: var(--text-muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0;
}

/* ═══════════════════════════════════════════════
   SECTION TITLES
═══════════════════════════════════════════════ */

.section-title {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  font-style: italic;
  color: var(--text-primary);
  margin-bottom: var(--sp-sm);
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin-bottom: var(--sp-xl);
  letter-spacing: 0.01em;
}

/* ═══════════════════════════════════════════════
   DOWNLOAD SECTION
═══════════════════════════════════════════════ */

.download-section {
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
  padding: var(--sp-2xl) var(--sp-2xl);
  position: relative;
  overflow: hidden;
  animation: revealUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

/* Subtle corner accent */
.download-section::before {
  content: '';
  position: absolute;
  bottom: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(192,24,74,0.14) 0%, transparent 70%);
  pointer-events: none;
}

/* ═══════════════════════════════════════════════
   FORM
═══════════════════════════════════════════════ */

.download-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.form-wrapper {
  display: flex;
  gap: var(--sp-sm);
  align-items: stretch;
}

.link-input {
  flex: 1;
  padding: var(--sp-lg) var(--sp-lg);
  background: var(--surface-2);
  border: 1.5px solid var(--border-mid);
  border-radius: var(--r-lg);
  font-size: var(--fs-base);
  font-family: var(--font-body);
  color: var(--text-primary);
  transition: border-color var(--t-base), box-shadow var(--t-base), background var(--t-base);
}

.link-input:focus {
  outline: none;
  background: var(--surface-3);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle), 0 0 20px rgba(192,24,74,0.1);
}

.link-input::placeholder {
  color: var(--text-muted);
  font-weight: var(--fw-light);
}

.download-btn {
  padding: var(--sp-lg) var(--sp-xl);
  background: var(--accent);
  color: var(--text-on-accent);
  border: none;
  border-radius: var(--r-lg);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  white-space: nowrap;
  min-width: 140px;
  justify-content: center;
  transition: background var(--t-base), transform var(--t-fast), box-shadow var(--t-base);
  position: relative;
  overflow: hidden;
}

/* Shimmer on hover */
.download-btn::after {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 60%; height: 100%;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.15) 50%, transparent 60%);
  transition: left 0.5s ease;
}

.download-btn:hover:not(:disabled)::after { left: 140%; }

.download-btn:hover:not(:disabled) {
  background: var(--accent-bright);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(192,24,74,0.45);
}

.download-btn:active:not(:disabled) { transform: translateY(0); }

.download-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.download-btn i { font-size: var(--fs-base); }

/* ═══════════════════════════════════════════════
   MESSAGE / FEEDBACK
═══════════════════════════════════════════════ */

.message {
  min-height: 0;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  padding: var(--sp-md) var(--sp-lg);
  border-radius: var(--r-md);
  display: none;
  animation: revealDown 0.3s ease;
  border-left: 3px solid transparent;
}

.message:not(:empty) { display: block; }

.message-success {
  color: var(--success);
  background: rgba(29,184,122,0.08);
  border-left-color: var(--success);
}

.message-error {
  color: #ff6b6b;
  background: rgba(232,64,64,0.08);
  border-left-color: var(--error);
}

.message-info {
  color: var(--info);
  background: rgba(78,168,232,0.08);
  border-left-color: var(--info);
}

/* ═══════════════════════════════════════════════
   HOW-TO / MANUAL SECTION
═══════════════════════════════════════════════ */

.manual-section {
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
  padding: var(--sp-2xl);
  animation: revealUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.manual-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--sp-xl);
  margin-top: var(--sp-lg);
}

.step {
  display: flex;
  gap: var(--sp-md);
  align-items: flex-start;
  animation: revealUp 0.7s ease 0.35s both;
}

.step-number {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: var(--surface-3);
  border: 1.5px solid var(--border-accent);
  color: var(--accent-bright);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: var(--fw-black);
  font-style: italic;
  box-shadow: inset 0 0 12px rgba(192,24,74,0.1);
  transition: box-shadow var(--t-base), background var(--t-base);
}

.step:hover .step-number {
  background: var(--accent-subtle);
  box-shadow: 0 0 16px var(--accent-glow);
}

.step-content h3 {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  margin-bottom: var(--sp-xs);
  letter-spacing: 0;
}

.step-content p {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════
   RESULTS SECTION
═══════════════════════════════════════════════ */

.results-section {
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
  padding: var(--sp-2xl);
  animation: revealUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

/* Thin accent bar at the top of results panel */
.results-section::before {
  content: '';
  display: block;
  height: 2px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-bright) 50%, transparent 100%);
  border-radius: var(--r-pill);
  margin-bottom: var(--sp-xl);
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2xl);
}

/* ─── Single Result Card ───────────────────────── */

.result-item {
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color var(--t-base), box-shadow var(--t-base), transform var(--t-slow);
}

.result-item:hover {
  border-color: var(--border-accent);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 1px var(--border-accent);
  transform: translateY(-3px);
}

/* Media container */
.result-media {
  width: 100%;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 260px;
  max-height: 680px;
  position: relative;
}

.result-media img,
.result-media video {
  width: 100%;
  height: 100%;
  max-height: 680px;
  object-fit: contain;
  display: block;
}

/* Fade-in on media load */
.result-media img { animation: fadeMedia 0.6s ease both; }

/* Info bar */
.result-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-md);
  padding: var(--sp-md) var(--sp-lg);
  background: var(--surface-3);
  border-top: 1px solid var(--border-subtle);
}

.result-type {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  font-size: var(--fs-xs);
  color: var(--text-muted);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.result-type i { color: var(--accent-bright); font-size: var(--fs-sm); }

.result-download {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: var(--sp-sm) var(--sp-lg);
  background: transparent;
  color: var(--accent-bright);
  border: 1.5px solid var(--accent);
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--t-base), color var(--t-base), box-shadow var(--t-base), transform var(--t-fast);
  white-space: nowrap;
}

.result-download:hover {
  background: var(--accent);
  color: var(--text-on-accent);
  box-shadow: 0 0 16px var(--accent-glow);
  transform: translateY(-1px);
}

.result-download:active { transform: translateY(0); }

.result-download.downloading {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}

/* Download Progress */
.download-progress {
  display: none;
  padding: 0 var(--sp-lg) var(--sp-md);
  background: var(--surface-3);
}

.download-progress.active { display: block; }

.progress-bar-container {
  width: 100%;
  height: 3px;
  background: var(--surface-4);
  border-radius: var(--r-pill);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-bright));
  border-radius: var(--r-pill);
  width: 0%;
  transition: width 0.2s ease;
}

.progress-text {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-top: 6px;
  text-align: right;
  letter-spacing: 0.04em;
}

/* ═══════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════ */

.footer {
  text-align: center;
  padding: var(--sp-xl) var(--sp-lg);
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
}

.footer p { margin: 0; }

/* ═══════════════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════════════ */

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

@keyframes revealDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeMedia {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}
