/*
Theme Name: TokDL Theme
Author: TokDL Global
Description: TikTok Downloader Theme for WordPress
Version: 1.0
*/

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Plus Jakarta Sans', sans-serif; }
body { background-color: #07090e; color: #f1f5f9; line-height: 1.6; }

/* Navbar Premium */
.navbar { display: flex; justify-content: space-between; align-items: center; max-width: 1000px; margin: 0 auto; padding: 24px 20px; }
.logo { font-size: 1.5rem; font-weight: 800; color: #fff; text-decoration: none; display: flex; align-items: center; gap: 8px; letter-spacing: -0.5px; }
.logo span { background: linear-gradient(135deg, #fe2c55, #ff007f); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.nav-right { display: flex; align-items: center; gap: 12px; }
.badge-pro { background: rgba(254, 44, 85, 0.12); color: #fe2c55; border: 1px solid rgba(254, 44, 85, 0.3); padding: 5px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }

/* Language Select Styling */
.lang-select { background: #0b0f17; color: #fff; border: 1px solid rgba(255, 255, 255, 0.2); padding: 5px 10px; border-radius: 12px; font-size: 0.8rem; font-weight: 600; cursor: pointer; outline: none; transition: all 0.3s ease; }
.lang-select:hover { border-color: #fe2c55; }

/* Hero Area */
.hero { text-align: center; padding: 40px 20px 30px 20px; }
.hero-badge { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); padding: 6px 16px; border-radius: 30px; font-size: 0.85rem; color: #cbd5e1; margin-bottom: 20px; }
.hero h1 { font-size: 2.8rem; font-weight: 800; margin-bottom: 14px; letter-spacing: -1px; background: linear-gradient(180deg, #ffffff 0%, #a1a1aa 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; line-height: 1.2; }
.hero p { font-size: 1.1rem; color: #94a3b8; max-width: 580px; margin: 0 auto; font-weight: 400; }

/* Container */
.container { max-width: 820px; margin: 0 auto 60px auto; padding: 0 20px; }

/* Downloader Card */
.downloader-card { background: rgba(18, 24, 38, 0.6); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, 0.08); padding: 36px; border-radius: 28px; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); }

/* Input Box & Button Styling */
.input-group { display: flex; flex-direction: row; gap: 12px; margin-top: 15px; }
.input-group input { flex: 1; padding: 18px 22px; background: #0b0f17; border: 1px solid #1e293b; border-radius: 16px; font-size: 1rem; color: #fff; outline: none; transition: all 0.3s ease; }
.input-group input:focus { border-color: #fe2c55; box-shadow: 0 0 20px rgba(254, 44, 85, 0.25); }
.input-group input:disabled { opacity: 0.5; cursor: not-allowed; background: #05070a; border-color: #0f172a; }

.btn-download { background: linear-gradient(135deg, #fe2c55, #e02648); color: #fff; border: none; padding: 18px 32px; border-radius: 16px; font-size: 1rem; font-weight: 700; cursor: pointer; white-space: nowrap; transition: all 0.3s ease; box-shadow: 0 8px 20px rgba(254, 44, 85, 0.3); display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-download:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(254, 44, 85, 0.5); }
.btn-download:disabled { opacity: 0.5; cursor: not-allowed !important; transform: none !important; box-shadow: none !important; }

.btn-download.loading {
  background: linear-gradient(135deg, #e02648, #9f1239);
  cursor: not-allowed;
  animation: btnPulse 1.2s infinite ease-in-out;
  opacity: 0.9;
}

@keyframes btnPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(254, 44, 85, 0.7); }
  50% { transform: scale(0.97); box-shadow: 0 0 0 12px rgba(254, 44, 85, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(254, 44, 85, 0); }
}

/* Loading Spinner */
.spinner-box { display: none; margin-top: 24px; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.spinner { width: 44px; height: 44px; border: 4px solid rgba(254, 44, 85, 0.15); border-top: 4px solid #fe2c55; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.spinnerText { color: #94a3b8; font-weight: 600; font-size: 0.95rem; }

#statusMsg { margin-top: 18px; font-weight: 600; font-size: 0.95rem; text-align: center; }
#downloadStatusMsg { margin-bottom: 16px; font-weight: 600; font-size: 0.95rem; text-align: center; }
.result-box { display: none; margin-top: 30px; padding-top: 30px; border-top: 1px solid rgba(255,255,255,0.08); }

/* Video Player Preview */
.video-preview-wrapper { width: 100%; max-width: 320px; margin: 0 auto 20px auto; border-radius: 20px; overflow: hidden; background: #000; box-shadow: 0 15px 35px rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.1); }
.video-preview-wrapper video { width: 100%; display: block; border-radius: 20px; }

/* PHOTO SLIDER STYLING */
.slider-container { position: relative; width: 100%; max-width: 340px; margin: 0 auto 20px auto; overflow: hidden; border-radius: 20px; box-shadow: 0 15px 35px rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.1); background: #000; }
.slider-track { display: flex; transition: transform 0.4s ease-in-out; }
.slider-slide { min-width: 100%; box-sizing: border-box; }
.slider-slide img { width: 100%; height: 380px; object-fit: cover; display: block; }
.slider-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.6); color: #fff; border: none; font-size: 1.2rem; width: 38px; height: 38px; border-radius: 50%; cursor: pointer; backdrop-filter: blur(4px); transition: 0.3s; z-index: 10; display: flex; align-items: center; justify-content: center; }
.slider-btn:hover { background: #fe2c55; }
.slider-btn.prev { left: 10px; }
.slider-btn.next { right: 10px; }
.slider-counter { position: absolute; bottom: 12px; right: 12px; background: rgba(0,0,0,0.7); color: #fff; padding: 4px 10px; border-radius: 12px; font-size: 0.75rem; font-weight: 700; backdrop-filter: blur(4px); }

.video-title { font-size: 1.05rem; margin-bottom: 20px; color: #e2e8f0; font-weight: 700; text-align: center; }

/* Button Group Grid */
.button-group { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.btn-save { display: flex; align-items: center; justify-content: center; color: white; border: none; padding: 16px 10px; border-radius: 14px; font-weight: 700; font-size: 0.9rem; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.btn-nowm { background: linear-gradient(135deg, #10b981, #059669); }
.btn-nowm:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4); }
.btn-hd { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.btn-hd:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4); }

.btn-save:disabled { opacity: 0.4; cursor: not-allowed !important; transform: none !important; box-shadow: none !important; filter: grayscale(50%); }

.btn-mp3 { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.btn-mp3:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4); }

.badge-ads { background: #ef4444; color: #ffffff; font-size: 0.65rem; padding: 2px 6px; border-radius: 6px; margin-left: 6px; font-weight: 800; letter-spacing: 0.5px; display: inline-block; vertical-align: middle; box-shadow: 0 2px 4px rgba(0,0,0,0.3); }

.ads-wrapper { margin: 24px 0; text-align: center; border-radius: 16px; background: rgba(15, 23, 42, 0.4); border: 1px dashed rgba(255, 255, 255, 0.12); padding: 12px; min-height: 270px; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; }
.ads-label { font-size: 0.7rem; color: #475569; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; font-weight: 700; }

/* Features Grid */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 45px; }
.feature-card { background: rgba(18, 24, 38, 0.4); border: 1px solid rgba(255,255,255,0.06); padding: 24px; border-radius: 20px; text-align: center; transition: 0.3s; }
.feature-card:hover { border-color: rgba(254, 44, 85, 0.3); transform: translateY(-3px); }
.feature-card .icon { font-size: 1.8rem; margin-bottom: 12px; display: block; }
.feature-card h4 { font-size: 1.05rem; color: #f8fafc; margin-bottom: 8px; font-weight: 700; }
.feature-card p { font-size: 0.88rem; color: #94a3b8; line-height: 1.5; }

/* FAQ & SEO Section */
.faq-section { margin-top: 45px; background: rgba(18, 24, 38, 0.4); border: 1px solid rgba(255,255,255,0.06); border-radius: 24px; padding: 32px; }
.faq-section h3 { font-size: 1.3rem; margin-bottom: 20px; color: #fff; font-weight: 800; }
.faq-item { margin-bottom: 16px; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 16px; }
.faq-item:last-child { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
.faq-title { font-weight: 700; color: #e2e8f0; font-size: 1rem; margin-bottom: 6px; }
.faq-desc { font-size: 0.9rem; color: #94a3b8; }
.seo-guide { margin-top: 24px; padding-top: 20px; border-top: 1px dashed rgba(255,255,255,0.1); color: #94a3b8; font-size: 0.9rem; }
.seo-guide h4 { color: #fff; font-weight: 700; margin-bottom: 8px; font-size: 1.05rem; }
.seo-guide ol { padding-left: 20px; margin-top: 8px; }
.seo-guide li { margin-bottom: 6px; }

.footer-text { text-align: center; margin-top: 40px; font-size: 0.85rem; color: #64748b; }

/* Modal Ad Styling */
.ad-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(12px);
  z-index: 99999;
  justify-content: center;
  align-items: center;
  padding: 20px;
}
.ad-modal-content {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  max-width: 450px;
  width: 100%;
  padding: 28px 24px;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  position: relative;
}
.ad-modal-title { font-size: 1.1rem; font-weight: 700; color: #fff; margin-bottom: 15px; }
.ad-container-box {
  min-height: 250px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  overflow: hidden;
  padding: 10px;
}
.ad-timer-text { font-size: 0.95rem; color: #cbd5e1; font-weight: 600; }
.ad-timer-text span { color: #fe2c55; font-weight: 800; font-size: 1.2rem; }

/* Mobile Responsive */
@media (max-width: 640px) {
  .hero h1 { font-size: 2rem; }
  .downloader-card { padding: 24px 18px; border-radius: 20px; }
  .input-group { flex-direction: column; }
  .btn-download { width: 100%; }
  .button-group { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .faq-section { padding: 20px; }
}
