/*
Theme Name: TikSaveVideo
Theme URI: https://tiksavevideo.com
Author: TikSaveVideo Team
Description: Custom Fast TikTok Downloader Theme for WordPress.
Version: 1.0.0
*/

:root {
  --primary: #FE2C55;
  --primary-hover: #E02447;
  --dark-bg: #0F172A;
  --card-bg: #FFFFFF;
  --text-main: #0F172A;
  --text-muted: #64748B;
  --border-color: #E2E8F0;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Plus Jakarta Sans', sans-serif; }
body { background-color: #F8FAFC; color: var(--text-main); line-height: 1.5; font-size: 15px; top: 0px !important; }

.goog-te-banner-frame, .skiptranslate, #google_translate_element { display: none !important; }
body { top: 0px !important; position: static !important; }

.navbar {
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(10px);
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.brand-logo { font-size: 20px; font-weight: 800; color: #FFF; text-decoration: none; letter-spacing: -0.5px; }
.brand-logo span { color: var(--primary); }

.custom-lang-selector {
  position: relative; background: #1E293B; border: 1px solid #334155;
  border-radius: 10px; padding: 6px 12px; display: flex; align-items: center; gap: 6px; cursor: pointer;
}
.custom-lang-selector select {
  background: transparent; border: none; color: #F1F5F9; font-size: 13px; font-weight: 600; outline: none; cursor: pointer; appearance: none;
}
.custom-lang-selector select option { background: #0F172A; color: #FFF; }

.container { max-width: 800px; margin: 0 auto; padding: 15px; }
@media(min-width: 768px) { .container { padding: 30px 20px; } }

.adsense-card-slot {
  margin: 20px auto; text-align: center; background: #FFFFFF; border: 1px solid #E2E8F0;
  border-radius: 12px; padding: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  display: flex; flex-direction: column; align-items: center; justify-content: center; max-width: 320px; overflow: hidden;
}
.adsense-card-label { font-size: 9px; font-weight: 700; color: #94A3B8; text-transform: uppercase; margin-bottom: 6px; font-family: Roboto, Arial, sans-serif; }

.downloader-card {
  background: var(--card-bg); border-radius: 20px; padding: 24px 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.03); border: 1px solid var(--border-color); text-align: center; margin-bottom: 25px;
}
@media(min-width: 768px) { .downloader-card { border-radius: 24px; padding: 36px 30px; } }

.downloader-card h1 { font-size: 20px; font-weight: 800; color: var(--dark-bg); margin-bottom: 8px; line-height: 1.3; }
@media(min-width: 768px) { .downloader-card h1 { font-size: 26px; } }
.downloader-card p { color: var(--text-muted); font-size: 13px; margin-bottom: 20px; line-height: 1.5; }

.input-group { display: flex; flex-direction: column; gap: 10px; max-width: 600px; margin: 0 auto; }
@media(min-width: 640px) { .input-group { flex-direction: row; } }

.input-group input {
  flex: 1; padding: 13px 16px; border: 2px solid var(--border-color); border-radius: 12px; font-size: 14px; outline: none; width: 100%;
}
.input-group input:focus { border-color: var(--primary); }

.btn-submit {
  background: linear-gradient(135deg, #FE2C55 0%, #E02447 100%);
  color: #FFF; border: none; padding: 13px 26px; border-radius: 12px; font-weight: 700; font-size: 14px; cursor: pointer;
}

#loading-status { display: none; margin-top: 20px; font-weight: 700; color: var(--primary); font-size: 13px; }

.result-card {
  display: none; margin-top: 25px; padding: 20px 15px; background: #F8FAFC; border: 1px solid var(--border-color); border-radius: 16px; text-align: center;
}
.result-card img { max-width: 140px; border-radius: 12px; margin-bottom: 12px; }
.result-card h3 { font-size: 14px; color: var(--dark-bg); margin-bottom: 16px; font-weight: 700; line-height: 1.4; }

.download-actions { display: flex; flex-direction: column; gap: 10px; max-width: 450px; margin: 0 auto; }
.dl-btn {
  display: flex; align-items: center; justify-content: center; padding: 12px 16px;
  color: #FFF; text-decoration: none; border-radius: 10px; font-weight: 700; font-size: 13px; cursor: pointer;
}
.dl-hd { background: linear-gradient(135deg, #4338CA 0%, #312E81 100%); }
.dl-nowm { background: linear-gradient(135deg, #059669 0%, #047857 100%); }
.dl-mp3 { background: linear-gradient(135deg, #FE2C55 0%, #C81E3D 100%); }
.btn-disabled { opacity: 0.5; cursor: not-allowed !important; pointer-events: none !important; }

.progress-container { display: none; margin: 15px auto 20px; max-width: 450px; text-align: left; }
.progress-text { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.progress-bar-bg { width: 100%; height: 10px; background: #E2E8F0; border-radius: 10px; overflow: hidden; }
.progress-bar-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #FE2C55 0%, #25F4EE 100%); border-radius: 10px; }

.hd-ad-overlay {
  display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(15, 23, 42, 0.85); backdrop-filter: blur(8px); z-index: 9999; justify-content: center; align-items: center; padding: 15px;
}
.hd-ad-card {
  background: #FFFFFF; width: 100%; max-width: 420px; border-radius: 20px; padding: 20px; box-shadow: 0 20px 40px rgba(0,0,0,0.3); text-align: center;
}
.hd-ad-header { font-size: 14px; font-weight: 700; color: var(--dark-bg); margin-bottom: 12px; }
.hd-yellow-line-bg { width: 100%; height: 6px; background: #E2E8F0; border-radius: 6px; overflow: hidden; margin-bottom: 15px; }
.hd-yellow-line-fill { height: 100%; width: 0%; background: #FFD700; transition: width 1s linear; }
.hd-ad-slot-box {
  min-height: 250px; background: #F1F5F9; border: 1px dashed #CBD5E1; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 15px; overflow: hidden;
}
.btn-skip-ad {
  background: #94A3B8; color: #FFF; border: none; padding: 12px 20px; border-radius: 10px; font-weight: 700; font-size: 13px; cursor: not-allowed; width: 100%;
}
.btn-skip-ad.active { background: linear-gradient(135deg, #FE2C55 0%, #E02447 100%); cursor: pointer; }

.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin: 30px 0; }
.feature-card { background: var(--card-bg); padding: 20px 15px; border-radius: 16px; border: 1px solid var(--border-color); text-align: center; }
.feature-card h2 { font-size: 15px; margin-bottom: 6px; font-weight: 700; }
.feature-card p { font-size: 12px; color: var(--text-muted); }

.seo-article-card {
  background: var(--card-bg); border-radius: 20px; padding: 25px 20px;
  border: 1px solid var(--border-color); margin: 30px 0; text-align: left;
}
.seo-article-card h2 { font-size: 18px; font-weight: 800; color: var(--dark-bg); margin: 18px 0 8px; }
.seo-article-card p, .seo-article-card li { font-size: 13px; color: #475569; line-height: 1.7; }

footer {
  background: var(--dark-bg);
  color: #94A3B8;
  padding: 30px 15px 120px;
  text-align: center;
  margin-top: 40px;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-bottom: 18px;
}

.footer-links a {
  color: #CBD5E1;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--primary);
}

footer p {
  font-size: 12px;
  color: #64748B;
  border-top: 1px solid #1E293B;
  padding-top: 18px;
  margin-top: 10px;
}

.adsense-anchor-wrapper {
  position: fixed; bottom: 0; left: 0; width: 100%; z-index: 99999; display: flex; justify-content: center; pointer-events: none; animation: slideUpAnchor 0.4s cubic-bezier(0, 0, 0.2, 1);
}
@keyframes slideUpAnchor { from { transform: translateY(100%); } to { transform: translateY(0); } }

.adsense-anchor-container {
  background: #FFFFFF; width: 100%; box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.12); border-top-left-radius: 8px; border-top-right-radius: 8px; pointer-events: auto; overflow: hidden; border: 1px solid #E2E8F0; border-bottom: none; text-align: center;
}
.adsense-anchor-header {
  height: 18px; background: #F1F5F9; border-bottom: 1px solid #E2E8F0; display: flex; justify-content: space-between; align-items: center; padding: 0 10px;
}
.adsense-anchor-label { font-size: 9px; font-weight: 700; color: #64748B; text-transform: uppercase; }
.adsense-anchor-close { background: transparent; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 2px; }

@media (max-width: 767px) {
  .adsense-anchor-container { max-width: 100%; }
  .ads-mobile-only { display: flex; justify-content: center; align-items: center; padding: 4px 0; }
  .ads-desktop-only { display: none !important; }
}
@media (min-width: 768px) {
  .adsense-anchor-container { max-width: 735px; }
  .ads-mobile-only { display: none !important; }
  .ads-desktop-only { display: flex; justify-content: center; align-items: center; padding: 5px 0; }
}