/* Sorajima Downloader - Landing Parity Styles */

/* Sorajima Downloader - Landing Parity Styles */

.header-subbrand-text {
  font-family: var(--font-brand, 'Unbounded', sans-serif);
  font-weight: 500;
  font-size: 13.5px;
  color: var(--fg-secondary);
  letter-spacing: -0.02em;
  line-height: 1;
  user-select: none;
  opacity: 0.75;
}

.header-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background-color: var(--bg-badge);
  border: 1px solid var(--border-dotted);
  padding: 6px 14px;
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-secondary);
}
.status-dot-active {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--status-good);
  box-shadow: 0 0 8px var(--status-good);
  animation: pulse-dot 2.5s infinite ease-in-out;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

.btn-header-logout {
  padding: 7px 16px;
  font-size: 12.5px;
}
.btn-header-logout:hover {
  border-color: var(--status-bad);
  color: var(--status-bad);
}

/* Page Layout */
.downloader-page-wrap {
  min-height: calc(100vh - 120px);
  padding-top: 130px;
  padding-bottom: 70px;
  position: relative;
  z-index: 2;
}

.downloader-container {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Hero Section */
.hero-content {
  text-align: center;
  margin-bottom: 36px;
}
.hero-ticker-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}
.hero-ticker-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--bg-badge);
  border: 1px solid var(--border-dotted);
  padding: 6px 16px;
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--fg-secondary);
}
.ticker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent);
  box-shadow: 0 0 6px var(--accent);
}

.downloader-title {
  font-family: var(--font-main);
  font-size: clamp(30px, 5vw, 56px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--fg-primary);
  margin-bottom: 16px;
}
.downloader-subtitle {
  font-family: var(--font-mono);
  font-size: clamp(13.5px, 1.5vw, 15px);
  color: var(--fg-secondary);
  max-width: 680px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

/* Services Bar */
.services-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
}
.service-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--bg-badge);
  border: 1px solid var(--border-dotted);
  padding: 4px 12px;
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-tertiary);
  transition: all 0.2s ease;
}
.service-badge:hover {
  color: var(--fg-secondary);
  border-color: rgba(255, 255, 255, 0.25);
}
.service-badge .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}
.service-badge .dot.yt { background: #ff4d4d; }
.service-badge .dot.tt { background: #25f4ee; }
.service-badge .dot.ig { background: #e1306c; }
.service-badge .dot.x  { background: #ffffff; }
.service-badge .dot.sc { background: #ff5500; }
.service-badge .dot.vk { background: #0077ff; }
.service-badge .dot.rd { background: #ff4500; }
.service-badge .dot.rt { background: #00b9ff; }

/* Main Downloader Card */
.downloader-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-dotted);
  border-radius: 24px;
  box-shadow: var(--glow-card);
  padding: 30px;
  margin-top: 10px;
  transition: border-color 0.3s ease;
}
.downloader-card:focus-within {
  border-color: var(--border-accent);
}

.url-input-container {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-dotted);
  border-radius: 9999px;
  padding: 6px 8px 6px 20px;
  transition: all 0.25s ease;
}
.url-input-container:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 24px var(--glow-color);
}
.input-search-icon {
  color: var(--fg-tertiary);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.main-url-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg-primary);
  font-family: var(--font-mono);
  font-size: 14.5px;
  padding: 10px 0;
}
.main-url-input::placeholder {
  color: var(--fg-tertiary);
}
.btn-paste-pill {
  padding: 8px 16px;
  font-size: 12px;
  flex-shrink: 0;
}
.btn-input-clear {
  background: transparent;
  border: none;
  color: var(--fg-tertiary);
  font-size: 16px;
  cursor: pointer;
  padding: 6px;
  line-height: 1;
}
.btn-input-clear:hover {
  color: var(--fg-primary);
}

/* Mode Switchers */
.mode-switchers {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.btn-mode-pill {
  flex: 1;
  padding: 10px 16px;
  font-size: 13px;
}
.btn-mode-pill.active {
  background-color: var(--accent);
  color: var(--accent-contrast);
  border-color: var(--accent);
  font-weight: 700;
  box-shadow: 0 4px 18px var(--glow-color);
}

/* Options Accordion */
.options-toggle-row {
  margin-top: 18px;
}
.btn-options-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: var(--fg-tertiary);
  font-family: var(--font-mono);
  font-size: 12.5px;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.2s ease;
}
.btn-options-toggle:hover {
  color: var(--fg-secondary);
}
.chevron-icon {
  font-size: 9px;
  transition: transform 0.2s ease;
}
.chevron-icon.open {
  transform: rotate(180deg);
}

.options-content-panel {
  display: none;
  margin-top: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--border-dotted);
}
.options-content-panel.open {
  display: block;
}
.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.option-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.option-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fg-tertiary);
  font-weight: 600;
}
.option-select-field {
  background: var(--bg-surface);
  border: 1px solid var(--border-dotted);
  border-radius: 12px;
  color: var(--fg-primary);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 10px 14px;
  outline: none;
  cursor: pointer;
}
.option-select-field:focus {
  border-color: var(--accent);
}
.checkbox-item {
  grid-column: 1 / -1;
}
.checkbox-label-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--fg-secondary);
  cursor: pointer;
}
.checkbox-label-wrap input {
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
}

/* Submit Action Button */
.btn-download-action {
  width: 100%;
  margin-top: 24px;
  padding: 14px 28px;
  font-size: 14.5px;
}
.btn-download-action:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Loading & Status Box */
.status-indicator-box {
  margin-top: 24px;
  padding: 22px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-dotted);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.status-spinner {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(250, 160, 160, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin-loader 0.8s linear infinite;
}
@keyframes spin-loader {
  to { transform: rotate(360deg); }
}
.status-indicator-msg {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--accent);
  font-weight: 500;
}

/* Error Box */
.error-notification-box {
  margin-top: 24px;
  padding: 18px 22px;
  background-color: var(--status-bad-bg);
  border: 1px solid var(--status-bad);
  border-radius: 18px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.error-box-icon {
  font-size: 18px;
}
.error-box-title {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--status-bad);
  margin-bottom: 4px;
}
.error-box-desc {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--fg-secondary);
  line-height: 1.45;
}

/* Results Display */
.results-display-area {
  margin-top: 28px;
}
.result-content-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-dotted);
  border-radius: 20px;
  box-shadow: var(--glow-card);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.result-top-info {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.result-media-thumbnail {
  width: 130px;
  height: 84px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--bg-surface);
  border: 1px solid var(--border-dotted);
  flex-shrink: 0;
}
.result-details-text {
  flex: 1;
}
.result-media-title {
  font-family: var(--font-main);
  font-size: 17px;
  font-weight: 500;
  color: var(--fg-primary);
  margin-bottom: 8px;
  line-height: 1.35;
  word-break: break-word;
}
.result-meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.meta-tag-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  background-color: var(--bg-badge);
  border: 1px solid var(--border-dotted);
  color: var(--fg-secondary);
  padding: 3px 9px;
  border-radius: 9999px;
}
.result-button-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.btn-final-download {
  flex: 1;
  padding: 13px 24px;
  font-size: 14px;
  text-decoration: none;
}
.btn-copy-direct-url {
  padding: 13px 20px;
  font-size: 13px;
}

/* Audio Player */
.audio-player-box {
  margin-top: 4px;
}
.audio-player-box audio {
  width: 100%;
}

/* Multi-Item Picker Grid */
.picker-grid-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
}
.picker-single-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-dotted);
  border-radius: 16px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.picker-single-thumb {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  background: var(--bg-card);
}
.picker-download-btn {
  padding: 8px 12px;
  font-size: 12px;
  width: 100%;
}

/* History */
.history-block {
  margin-top: 48px;
  border-top: 1px solid var(--border-dotted);
  padding-top: 32px;
}
.history-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.history-heading {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--fg-tertiary);
  text-transform: uppercase;
}
.btn-wipe-history {
  background: transparent;
  border: none;
  color: var(--fg-tertiary);
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
}
.btn-wipe-history:hover {
  color: var(--status-bad);
}
.history-items-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.history-entry-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-dotted);
  border-radius: 12px;
  padding: 10px 16px;
}
.history-item-link {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--fg-secondary);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 500px;
}
.history-item-link:hover {
  color: var(--accent);
}
.history-timestamp {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-tertiary);
}

/* Auth Modal Overlay */
.auth-popup-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(24px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.auth-popup-card {
  max-width: 420px;
  width: 100%;
  background-color: var(--bg-card);
  border: 1px solid var(--border-dotted);
  border-radius: 24px;
  box-shadow: var(--shadow-popup);
  padding: 40px 32px;
  text-align: center;
}
.auth-logo-svg {
  width: 44px;
  height: 34px;
  margin-bottom: 8px;
}
.auth-brand-name {
  font-family: var(--font-brand);
  font-size: 20px;
  font-weight: 700;
  color: var(--fg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}
.auth-subbrand-text {
  font-family: var(--font-brand, 'Unbounded', sans-serif);
  font-size: 15px;
  font-weight: 500;
  color: var(--fg-secondary);
  letter-spacing: -0.02em;
  opacity: 0.75;
}

.auth-form-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.auth-input-container {
  position: relative;
  display: flex;
  align-items: center;
}
.auth-password-field {
  width: 100%;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-dotted);
  border-radius: 9999px;
  color: var(--fg-primary);
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 13px 48px 13px 20px;
  outline: none;
  transition: all 0.2s ease;
}
.auth-password-field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--glow-color);
}
.btn-password-visibility {
  position: absolute;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--fg-tertiary);
  cursor: pointer;
  padding: 4px;
}
.btn-password-visibility:hover {
  color: var(--fg-primary);
}

.auth-error-notice {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--status-bad);
  background-color: var(--status-bad-bg);
  border: 1px solid var(--status-bad);
  border-radius: 9999px;
  padding: 8px 16px;
}
.btn-auth-enter {
  width: 100%;
  padding: 14px;
  font-size: 14px;
}

.shake-animation {
  animation: shake-box 0.4s ease;
}
@keyframes shake-box {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.hidden-element {
  display: none !important;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .site-header {
    padding: 16px 20px;
  }
  .downloader-page-wrap {
    padding-top: 96px;
  }
  .downloader-card {
    padding: 20px 16px;
  }
  .url-input-container {
    padding: 4px 6px 4px 14px;
  }
  .mode-switchers {
    flex-direction: column;
  }
  .result-top-info {
    flex-direction: column;
  }
  .result-media-thumbnail {
    width: 100%;
    height: 180px;
  }
}
