/* =============================================
   YouTube to MP3 — Tool-specific Styles
   ============================================= */

/* ── Result Card ── */
.yt-result-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-top: 24px;
  box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .yt-result-card {
  background: #1e1e30;
  border-color: rgba(255, 255, 255, 0.06);
}

.yt-result-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
[data-theme="dark"] .yt-result-title {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}
.yt-result-title i {
  font-size: 1.4rem;
  color: #ff0033;
}
.yt-result-title h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  word-break: break-word;
}
[data-theme="dark"] .yt-result-title h3 {
  color: #eef0f6;
}

/* ── Download Grid ── */
.yt-download-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.yt-download-option {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  transition: all 0.25s;
}
[data-theme="dark"] .yt-download-option {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
}
.yt-download-option:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.1);
}

/* Format Icons */
.yt-format-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  font-size: 1.2rem;
}
.yt-format-icon.mp3 {
  background: rgba(0, 184, 148, 0.12);
  color: #00b894;
}
.yt-format-icon.mp4 {
  background: rgba(108, 92, 231, 0.12);
  color: #6c5ce7;
}

.yt-format-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.yt-format-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 14px;
}
[data-theme="dark"] .yt-format-name {
  color: #eef0f6;
}

/* Download Buttons */
.yt-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}
.yt-download-btn.mp3-btn {
  background: linear-gradient(135deg, #00b894, #00a381);
  color: #fff;
}
.yt-download-btn.mp3-btn:hover {
  opacity: 0.88;
}
.yt-download-btn.mp4-btn {
  background: linear-gradient(135deg, #6c5ce7, #5a4bd1);
  color: #fff;
}
.yt-download-btn.mp4-btn:hover {
  opacity: 0.88;
}

/* ── Loading Overlay ── */
.yt-loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 26, 0.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.yt-loading-card {
  background: #1e1e30;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 40px 36px;
  text-align: center;
  max-width: 360px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.yt-loading-spinner {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  position: relative;
  display: grid;
  place-items: center;
}
.yt-spinner-ring {
  position: absolute;
  inset: 0;
  border: 3px solid rgba(255, 0, 51, 0.15);
  border-top-color: #ff0033;
  border-radius: 50%;
  animation: ytSpin 0.8s linear infinite;
}
@keyframes ytSpin {
  to {
    transform: rotate(360deg);
  }
}
.yt-spinner-icon {
  font-size: 1.6rem;
  color: #ff0033;
}
.yt-loading-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #eef0f6;
  margin-bottom: 8px;
}
.yt-loading-text {
  font-size: 0.85rem;
  color: #8a8da2;
  line-height: 1.5;
}
.yt-loading-bar {
  margin-top: 20px;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
}
.yt-loading-bar-fill {
  height: 100%;
  width: 30%;
  background: linear-gradient(90deg, #ff0033, #ff4466);
  border-radius: 4px;
  animation: ytLoadBar 1.5s ease-in-out infinite;
}
@keyframes ytLoadBar {
  0% {
    width: 10%;
    margin-left: 0;
  }
  50% {
    width: 50%;
    margin-left: 25%;
  }
  100% {
    width: 10%;
    margin-left: 90%;
  }
}

/* ── Responsive ── */
@media (max-width: 500px) {
  .yt-download-grid {
    grid-template-columns: 1fr;
  }
  .yt-result-card {
    padding: 20px;
  }
}
