/* ═══════════════════════════════════════════════
   ItSave — TikTok Tools Styles
   ═══════════════════════════════════════════════ */

/* ── TikTok form accent ── */
.tiktok-form-card.form-card::before {
  background: linear-gradient(90deg, #25f4ee, #fe2c55, #000) !important;
}

.tool-page-header .fa-tiktok {
  background: linear-gradient(45deg, #25f4ee, #fe2c55);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Loading Overlay ── */
.tt-loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tt-loading-card {
  background: var(--card-bg, #fff);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  max-width: 360px;
  width: 90%;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
}

.tt-loading-spinner {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
}

.tt-spinner-ring {
  position: absolute;
  inset: 0;
  border: 3px solid transparent;
  border-top-color: #fe2c55;
  border-right-color: #25f4ee;
  border-radius: 50%;
  animation: ttSpin 1s linear infinite;
}

@keyframes ttSpin {
  to {
    transform: rotate(360deg);
  }
}

.tt-spinner-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.8rem;
  background: linear-gradient(45deg, #25f4ee, #fe2c55);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tt-loading-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.tt-loading-text {
  font-size: 0.85rem;
  color: var(--text-muted, #6b7280);
  margin-bottom: 18px;
}

.tt-loading-bar {
  height: 4px;
  background: var(--input-bg, #e5e7eb);
  border-radius: 4px;
  overflow: hidden;
}

.tt-loading-bar-fill {
  width: 30%;
  height: 100%;
  background: linear-gradient(90deg, #25f4ee, #fe2c55);
  border-radius: 4px;
  animation: ttBarPulse 1.5s ease-in-out infinite;
}

@keyframes ttBarPulse {
  0% {
    width: 10%;
    margin-left: 0;
  }
  50% {
    width: 60%;
    margin-left: 20%;
  }
  100% {
    width: 10%;
    margin-left: 90%;
  }
}

/* ── Result Card ── */
.tt-result {
  margin-top: 32px;
  animation: ttResultIn 0.4s ease;
}

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

.tt-result-card {
  background: var(--card-bg, #fff);
  border: 1.5px solid var(--border, #e5e7eb);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: row;
  transition:
    transform 0.28s,
    box-shadow 0.28s;
}

.tt-result-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.tt-thumb {
  width: 220px;
  min-height: 200px;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--bg-alt, #f3f4f6);
}

.tt-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tt-result-info {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
}

.tt-result-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 18px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tt-download-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tt-dl-btn {
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  color: #fff;
}

.tt-dl-video {
  background: linear-gradient(135deg, #fe2c55, #d91a40);
  box-shadow: 0 4px 14px rgba(254, 44, 85, 0.3);
}

.tt-dl-video:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(254, 44, 85, 0.4);
}

.tt-dl-audio {
  background: linear-gradient(135deg, #25f4ee, #00c4b8);
  color: #000;
  box-shadow: 0 4px 14px rgba(37, 244, 238, 0.3);
}

.tt-dl-audio:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 244, 238, 0.4);
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .tt-result-card {
    flex-direction: column;
  }

  .tt-thumb {
    width: 100%;
    height: 220px;
    min-height: auto;
  }
}
