/* SSSTiks.app - Master Style System (Inspired by SSSTik.io Palette) */

:root {
  /* Brand Gradient Colors */
  --primary-purple: #5940f1;
  --neon-magenta: #ce00ff;
  --brand-blue: #338aff;
  --deep-purple: #2200ff;
  --hero-gradient: linear-gradient(135deg, #5940f1 0%, #a400f0 50%, #ce00ff 100%);
  --button-gradient: linear-gradient(135deg, #5940f1 0%, #ce00ff 100%);
  --button-hover-gradient: linear-gradient(135deg, #472dd9 0%, #b000db 100%);
  
  /* Neutral Color Tokens */
  --bg-page: #f5f5f9;
  --bg-card: #ffffff;
  --bg-subtle: #f8f9fe;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-white: #ffffff;
  --border-color: #e2e8f0;
  --border-active: #c084fc;
  
  /* Shadows & Radius */
  --shadow-sm: 0 2px 8px rgba(89, 64, 241, 0.06);
  --shadow-md: 0 10px 25px -5px rgba(89, 64, 241, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 20px 40px -10px rgba(89, 64, 241, 0.22);
  --shadow-glow: 0 0 25px rgba(206, 0, 255, 0.4);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;
  
  /* Layout Constraints */
  --max-width: 1100px;
}

/* Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Header & Navigation Bar */
.navbar {
  background: var(--hero-gradient);
  padding: 14px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.navbar-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-white);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.5px;
}

.brand-logo img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
  transition: transform 0.3s ease;
}

.brand-logo:hover img {
  transform: rotate(-6deg) scale(1.08);
}

.brand-logo span.highlight {
  color: #ffd600;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lang-btn {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-white);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

/* Hero Section with Signature ssstik.io Gradient */
.hero-section {
  background: var(--hero-gradient);
  color: var(--text-white);
  padding: 48px 20px 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 140%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 60%);
  pointer-events: none;
}

.hero-container {
  max-width: 860px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: clamp(2.2rem, 5.5vw, 3.4rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 12px;
  letter-spacing: -0.8px;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  opacity: 0.92;
  font-weight: 500;
  margin-bottom: 32px;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

/* Downloader Form Area */
.downloader-card {
  background: rgba(255, 255, 255, 0.98);
  border-radius: var(--radius-lg);
  padding: 10px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.downloader-form {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  position: relative;
}

.input-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 18px;
  color: var(--primary-purple);
  display: flex;
  align-items: center;
  pointer-events: none;
}

.downloader-input {
  width: 100%;
  padding: 18px 120px 18px 52px;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  font-size: 1.05rem;
  color: var(--text-main);
  background: #f8fafc;
  outline: none;
  transition: all 0.2s ease;
}

.downloader-input:focus {
  background: #ffffff;
  border-color: var(--primary-purple);
  box-shadow: 0 0 0 4px rgba(89, 64, 241, 0.15);
}

.downloader-input::placeholder {
  color: #94a3b8;
}

/* Input Action Buttons (Paste & Clear) */
.input-action-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: #edf2f7;
  border: none;
  color: #475569;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.input-action-btn:hover {
  background: #e2e8f0;
  color: var(--primary-purple);
}

.submit-btn {
  background: var(--button-gradient);
  color: var(--text-white);
  border: none;
  padding: 18px 36px;
  border-radius: var(--radius-md);
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(89, 64, 241, 0.35);
  transition: all 0.25s ease;
}

.submit-btn:hover {
  background: var(--button-hover-gradient);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(206, 0, 255, 0.4);
}

.submit-btn:active {
  transform: translateY(0);
}

.submit-btn.loading {
  opacity: 0.85;
  pointer-events: none;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 0.8s linear infinite;
  display: none;
}

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

/* Error Notification Box */
.error-box {
  display: none;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  margin-top: 18px;
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
  animation: fadeIn 0.3s ease;
}

/* Result Container & Video Card */
.result-container {
  display: none;
  max-width: 860px;
  margin: 36px auto 0;
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
  color: var(--text-main);
  text-align: left;
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.video-result-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  align-items: start;
}

.video-preview-wrapper {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: #000;
  aspect-ratio: 9/16;
}

.video-preview-wrapper img, .video-preview-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-info-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
}

.author-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.author-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-purple);
}

.author-names h4 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
}

.author-names p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.video-caption {
  font-size: 0.98rem;
  color: #334155;
  margin-bottom: 20px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.download-options-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.download-link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}

.btn-no-watermark {
  background: var(--button-gradient);
  color: var(--text-white);
  box-shadow: 0 6px 18px rgba(89, 64, 241, 0.25);
}

.btn-no-watermark:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(206, 0, 255, 0.35);
}

.btn-hd {
  background: #0f172a;
  color: #ffffff;
}

.btn-hd:hover {
  background: #1e293b;
  transform: translateY(-2px);
}

.btn-audio {
  background: #f1f5f9;
  color: var(--primary-purple);
  border: 1px solid #cbd5e1;
}

.btn-audio:hover {
  background: #e2e8f0;
  color: var(--deep-purple);
}

/* Slideshow Image Gallery */
.slideshow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.slideshow-card {
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #f1f5f9;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.slideshow-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.slideshow-card a {
  display: block;
  text-align: center;
  padding: 8px;
  background: var(--primary-purple);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}

/* Content & Feature Sections */
.main-content-section {
  max-width: var(--max-width);
  margin: 48px auto;
  padding: 0 20px;
}

.section-heading {
  text-align: center;
  margin-bottom: 36px;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 10px;
}

.section-title span {
  background: var(--button-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Highlights Grid */
.highlights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 56px;
}

.highlight-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 30px 24px;
  text-align: center;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.highlight-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-active);
}

.highlight-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  background: rgba(89, 64, 241, 0.08);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--primary-purple);
}

.highlight-card h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text-main);
}

.highlight-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Step-by-Step HowTo Box (Inspired by ssstik.io blue/purple highlight box) */
.howto-container {
  background: linear-gradient(135deg, #eef2ff 0%, #f3e8ff 100%);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  border: 1px solid rgba(89, 64, 241, 0.15);
  margin-bottom: 56px;
  box-shadow: var(--shadow-sm);
}

.howto-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 28px;
}

.howto-step-item {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--button-gradient);
  color: #ffffff;
  font-weight: 900;
  border-radius: 50%;
  font-size: 1.1rem;
  margin-bottom: 14px;
}

.howto-step-item h4 {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.howto-step-item p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* FAQ Accordion Section */
.faq-wrapper {
  max-width: 860px;
  margin: 0 auto 56px;
}

.faq-item {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  margin-bottom: 14px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.faq-item:hover {
  border-color: var(--primary-purple);
}

.faq-question {
  width: 100%;
  padding: 20px 24px;
  background: none;
  border: none;
  text-align: left;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.faq-icon {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
  color: var(--primary-purple);
  flex-shrink: 0;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease-out, padding 0.35s ease;
  padding: 0 24px;
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.6;
}

.faq-item.active .faq-answer {
  max-height: 400px;
  padding: 0 24px 22px 24px;
}

/* Footer Section */
.footer {
  background: #0b0f19;
  color: #94a3b8;
  padding: 48px 20px 32px;
  border-top: 1px solid #1e293b;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
}

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

.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

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

.footer-disclaimer {
  font-size: 0.85rem;
  max-width: 640px;
  line-height: 1.5;
  color: #64748b;
}

.footer-copyright {
  font-size: 0.88rem;
  color: #475569;
}

/* Mobile Responsive Overrides */
@media (max-width: 768px) {
  .hero-section {
    padding: 36px 16px 48px;
  }
  
  .downloader-form {
    flex-direction: column;
  }
  
  .submit-btn {
    width: 100%;
    padding: 16px;
  }

  .downloader-input {
    padding: 16px 105px 16px 46px;
    font-size: 0.95rem;
  }
  
  .video-result-grid {
    grid-template-columns: 1fr;
  }

  .video-preview-wrapper {
    max-width: 240px;
    margin: 0 auto;
  }

  .highlights-grid, .howto-steps {
    grid-template-columns: 1fr;
  }
}
