/* ==========================================================================
   TikTok Tools Dedicated Styles (DwnIt Platform)
   Theme: TikTok Dark Neon (Cyan #00f2fe & Neon Pink #fe2c55)
   ========================================================================== */

:root {
  --tk-pink: #fe2c55;
  --tk-pink-hover: #ff0838;
  --tk-cyan: #00f2fe;
  --tk-cyan-glow: rgba(0, 242, 254, 0.35);
  --tk-pink-glow: rgba(254, 44, 85, 0.4);
  --tk-dark-bg: #090a10;
  --tk-card-bg: rgba(18, 20, 32, 0.85);
  --tk-card-border: rgba(254, 44, 85, 0.2);
  --tk-card-border-active: rgba(0, 242, 254, 0.6);
  --tk-accent-grad: linear-gradient(135deg, #fe2c55 0%, #ff0844 50%, #00f2fe 100%);
}

.tiktok-landing {
  position: relative;
  overflow: hidden;
  padding: 40px 0 80px;
}

/* Background Ambient Glow */
.tiktok-landing::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(254, 44, 85, 0.12) 0%, rgba(0, 242, 254, 0.05) 50%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.tiktok-landing::after {
  content: '';
  position: absolute;
  top: 150px;
  right: 15%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(0, 242, 254, 0.1) 0%, rgba(254, 44, 85, 0.04) 50%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.tk-container {
  position: relative;
  z-index: 1;
  max-width: 1050px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Breadcrumb */
.tk-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: #8b92a8;
  margin-bottom: 24px;
}
.tk-breadcrumb a {
  color: #a0a6be;
  text-decoration: none;
  transition: color 0.2s ease;
}
.tk-breadcrumb a:hover {
  color: var(--tk-cyan);
}

/* Brand Badge */
.tk-brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(254, 44, 85, 0.1);
  border: 1px solid rgba(254, 44, 85, 0.3);
  padding: 6px 16px;
  border-radius: 50px;
  color: #ff859b;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 16px;
  backdrop-filter: blur(8px);
  box-shadow: 0 0 20px rgba(254, 44, 85, 0.15);
}

/* Hero Header */
.tk-page-title {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.25;
  color: #ffffff;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}
@media (max-width: 768px) {
  .tk-page-title {
    font-size: 1.95rem;
  }
}

.tk-highlight-text {
  background: linear-gradient(135deg, #00f2fe 0%, #fe2c55 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tk-page-subtitle {
  font-size: 1.05rem;
  color: #9da6be;
  max-width: 720px;
  margin-bottom: 32px;
  line-height: 1.7;
}

/* Main Downloader Box */
.tk-downloader-box {
  background: var(--tk-card-bg);
  border: 1px solid var(--tk-card-border);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 35px rgba(254, 44, 85, 0.08);
  backdrop-filter: blur(16px);
  margin-bottom: 50px;
}

/* Subtabs Navigation */
.tk-tab-selector {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
  background: rgba(10, 12, 20, 0.7);
  padding: 6px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow-x: auto;
  scrollbar-width: none;
}
.tk-tab-selector::-webkit-scrollbar {
  display: none;
}

.tk-subtab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #a8b0c8;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: all 0.25s ease;
}
.tk-subtab:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}
.tk-subtab.active {
  color: #ffffff;
  background: rgba(254, 44, 85, 0.18);
  border-color: rgba(254, 44, 85, 0.5);
  box-shadow: 0 4px 15px rgba(254, 44, 85, 0.2);
}
.tk-subtab.active-cyan {
  background: rgba(0, 242, 254, 0.15);
  border-color: rgba(0, 242, 254, 0.45);
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.2);
}

/* Smart Input Form */
.tk-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(12, 14, 24, 0.95);
  border: 2px solid rgba(254, 44, 85, 0.35);
  border-radius: 16px;
  padding: 6px;
  transition: all 0.3s ease;
}
.tk-input-wrapper:focus-within {
  border-color: var(--tk-cyan);
  box-shadow: 0 0 25px var(--tk-cyan-glow);
}
.tk-input-field {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 1.05rem;
  padding: 12px 16px;
  width: 100%;
}
.tk-input-field::placeholder {
  color: #5d6580;
}

.tk-btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--tk-accent-grad);
  color: #ffffff;
  font-weight: 700;
  font-size: 1.02rem;
  border: none;
  outline: none;
  padding: 14px 28px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 25px var(--tk-pink-glow);
  white-space: nowrap;
}
.tk-btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(254, 44, 85, 0.6);
}
.tk-btn-submit:active {
  transform: translateY(0);
}

/* Paste & Clear Helper Buttons */
.tk-input-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 6px;
}
.tk-btn-quick {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd3e8;
  font-size: 0.82rem;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.tk-btn-quick:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

/* Status & Processing Box */
.tk-processing-box {
  display: none;
  margin-top: 24px;
  background: rgba(13, 16, 28, 0.95);
  border: 1px solid rgba(0, 242, 254, 0.3);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
}
.tk-progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  margin: 12px 0 8px;
}
.tk-progress-fill {
  width: 0%;
  height: 100%;
  background: var(--tk-accent-grad);
  border-radius: 4px;
  transition: width 0.1s linear;
}
.tk-proc-countdown-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  color: #8b92a8;
}
.tk-proc-countdown-row strong {
  color: var(--tk-cyan);
}

/* Result Card */
.tk-result-container {
  display: none;
  margin-top: 28px;
  animation: fadeIn 0.4s ease-out;
}
.tk-media-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  background: rgba(13, 16, 28, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 20px;
}
@media (max-width: 820px) {
  .tk-media-card {
    grid-template-columns: 1fr;
  }
}

/* Vertical 9:16 Video Preview */
.tk-thumb-wrapper {
  position: relative;
  aspect-ratio: 9/16;
  max-height: 380px;
  border-radius: 14px;
  overflow: hidden;
  background: #000000;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}
.tk-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tk-thumb-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Media Info */
.tk-media-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.tk-media-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.45;
  margin-bottom: 8px;
}
.tk-media-author {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--tk-cyan);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 16px;
  direction: ltr;
  unicode-bidi: isolate;
}
.tk-download-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}
.tk-dl-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(22, 26, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 12px 18px;
  border-radius: 12px;
  transition: all 0.2s ease;
}
.tk-dl-row:hover {
  background: rgba(28, 33, 54, 0.9);
  border-color: rgba(0, 242, 254, 0.3);
}
.tk-dl-row.highlighted {
  background: rgba(254, 44, 85, 0.12);
  border-color: rgba(254, 44, 85, 0.4);
}
.tk-dl-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: #ffffff;
}
.tk-dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--tk-accent-grad);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 8px 18px;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease;
}
.tk-dl-btn:hover {
  transform: scale(1.04);
}

/* Video Cutter Trimmer UI */
.tk-cutter-panel {
  background: rgba(13, 16, 28, 0.9);
  border: 1px solid rgba(0, 242, 254, 0.25);
  border-radius: 16px;
  padding: 22px;
  margin-top: 20px;
}
.tk-cutter-header {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--tk-cyan);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tk-cutter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 600px) {
  .tk-cutter-grid {
    grid-template-columns: 1fr;
  }
}
.tk-time-input-group label {
  display: block;
  font-size: 0.85rem;
  color: #8b92a8;
  margin-bottom: 6px;
}
.tk-time-input {
  width: 100%;
  background: rgba(20, 24, 40, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 1rem;
  font-family: monospace;
  outline: none;
  transition: border-color 0.2s ease;
}
.tk-time-input:focus {
  border-color: var(--tk-cyan);
}

/* SEO Content & Comparison Matrix */
.tk-content-section {
  margin-top: 60px;
}
.tk-sec-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 14px;
}
.tk-sec-desc {
  font-size: 1rem;
  color: #9da6be;
  line-height: 1.75;
  margin-bottom: 30px;
}
.tk-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 50px;
}
.tk-feat-card {
  background: var(--tk-card-bg);
  border: 1px solid var(--tk-card-border);
  border-radius: 18px;
  padding: 24px;
  transition: all 0.3s ease;
}
.tk-feat-card:hover {
  transform: translateY(-4px);
  border-color: var(--tk-cyan);
  box-shadow: 0 12px 30px rgba(0, 242, 254, 0.1);
}
.tk-feat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(254, 44, 85, 0.15);
  color: var(--tk-pink);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.tk-feat-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}
.tk-feat-text {
  font-size: 0.92rem;
  color: #8b92a8;
  line-height: 1.6;
}

/* Specs Table */
.tk-specs-table-wrapper {
  background: var(--tk-card-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 50px;
}
.tk-specs-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
}
.tk-specs-table th {
  background: rgba(254, 44, 85, 0.15);
  color: #ffffff;
  padding: 16px 20px;
  font-size: 0.95rem;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.tk-specs-table td {
  padding: 14px 20px;
  color: #a0a6be;
  font-size: 0.92rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.tk-specs-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* FAQ Accordion */
.tk-faq-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.tk-faq-item {
  background: var(--tk-card-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}
.tk-faq-item:hover {
  border-color: rgba(0, 242, 254, 0.3);
}
.tk-faq-question {
  width: 100%;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 18px 22px;
  text-align: right;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}
.tk-faq-answer {
  display: none;
  padding: 0 22px 18px;
  font-size: 0.95rem;
  color: #8b92a8;
  line-height: 1.7;
}
.tk-faq-item.open .tk-faq-answer {
  display: block;
}
.tk-faq-icon {
  transition: transform 0.3s ease;
}
.tk-faq-item.open .tk-faq-icon {
  transform: rotate(180deg);
  color: var(--tk-cyan);
}

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

/* ==========================================================================
   Text Story & Photo Slides Specific Styles
   ========================================================================== */

/* Text Story 9:16 Vertical Preview Frame */
.tk-text-story-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  margin: 0 auto 24px;
  aspect-ratio: 9 / 16;
  border-radius: 20px;
  background: linear-gradient(145deg, #120826 0%, #1f0d3d 50%, #0d1b2a 100%);
  border: 2px solid rgba(0, 242, 254, 0.4);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(254, 44, 85, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 20px;
  overflow: hidden;
}

.tk-text-story-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 30%, rgba(254, 44, 85, 0.15), transparent 60%),
              radial-gradient(circle at 70% 70%, rgba(0, 242, 254, 0.15), transparent 60%);
  pointer-events: none;
}

.tk-text-story-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tk-text-story-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tk-text-story-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--tk-cyan);
  object-fit: cover;
}

.tk-text-story-username {
  font-weight: 800;
  color: #ffffff;
  font-size: 0.95rem;
  line-height: 1.2;
}

.tk-text-story-tag {
  font-size: 0.75rem;
  color: var(--tk-cyan);
  background: rgba(0, 242, 254, 0.15);
  padding: 2px 8px;
  border-radius: 20px;
  display: inline-block;
  margin-top: 2px;
}

.tk-text-story-body {
  position: relative;
  z-index: 2;
  margin: auto 0;
  text-align: center;
  padding: 20px 10px;
}

.tk-text-story-quote {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.6;
  color: #ffffff;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.8);
  word-break: break-word;
}

.tk-text-story-footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: #a0a6be;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.tk-sound-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #00f2fe;
}

/* Slideshow Grid */
.tk-slides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.tk-slide-item {
  position: relative;
  background: var(--tk-card-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.tk-slide-img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
}

.tk-slide-actions {
  padding: 10px;
  background: rgba(10, 11, 18, 0.9);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tk-slide-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
}

.tk-slide-dl-btn {
  background: linear-gradient(135deg, #00f2fe 0%, #0099ff 100%);
  color: #000;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Profile Notice Box */
.tk-profile-notice-card {
  background: rgba(18, 20, 32, 0.95);
  border: 1px solid rgba(0, 242, 254, 0.3);
  border-radius: 18px;
  padding: 30px 24px;
  text-align: center;
  margin-top: 20px;
}

.tk-profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--tk-cyan);
  margin-bottom: 12px;
  object-fit: cover;
}

/* ==========================================================================
   TikTok Download Preparation & Countdown Box (Matches YouTube Experience)
   ========================================================================== */
.tk-dl-prep-box {
  display: none;
  background: linear-gradient(145deg, #160a12 0%, #0d111d 100%);
  border: 1px solid rgba(254, 44, 85, 0.4);
  border-radius: 16px;
  padding: 24px 20px;
  margin-top: 20px;
  box-shadow: 0 10px 30px rgba(254, 44, 85, 0.15);
  animation: slideDownFade 0.3s ease;
  text-align: center;
}

@keyframes slideDownFade {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.tk-proc-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
}

.tk-proc-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(254, 44, 85, 0.2);
  border-top-color: #fe2c55;
  border-radius: 50%;
  animation: tkSpin 0.8s linear infinite;
}

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

.tk-proc-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
}

.tk-proc-status-text {
  font-size: 0.92rem;
  color: #ff99aa;
  margin-bottom: 16px;
  min-height: 22px;
  transition: opacity 0.2s ease;
}

.tk-progress-track {
  width: 100%;
  height: 10px;
  background: #1e2640;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  margin-bottom: 14px;
}

.tk-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #fe2c55 0%, #ff0050 50%, #00f2fe 100%);
  border-radius: 999px;
  transition: width 0.1s linear;
  box-shadow: 0 0 12px rgba(254, 44, 85, 0.6);
}

.tk-proc-countdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
  color: #8b92a8;
  font-weight: 600;
}

.tk-proc-timer-badge {
  background: #331118;
  color: #ff8595;
  border: 1px solid #5c1f2b;
  padding: 3px 12px;
  border-radius: 999px;
  font-family: monospace;
  font-weight: 700;
}

.tk-proc-ad-slot {
  margin-top: 18px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  font-size: 0.85rem;
  color: #cbd5e1;
}




/* === 2026-10-18: mobile tool-page fixes === */
@media (max-width: 576px) {
  .tk-input-wrapper { flex-direction: column; align-items: stretch; gap: 10px; padding: 10px; }
  .tk-input-field { width: 100%; }
  .tk-input-actions { justify-content: flex-end; padding-left: 0; }
  .tk-btn-submit { width: 100%; box-sizing: border-box; white-space: normal; text-align: center; }
  .tk-subtab { white-space: normal; font-size: .82rem; padding: 8px 10px; text-align: center; line-height: 1.25; }
}
