/* ==========================================================================
   TwiVideo / SSSTwitter - Core Design System & Utilities
   Optimized for 100/100 Core Web Vitals & Cloudflare Pages Performance
   Theme: Clean Light Mode with Vibrant Twitter Sky Blue Gradient (#009ffc)
   ========================================================================== */

:root {
  /* Color Palette - Vibrant Twitter Sky Blue & Clean Modern Hues */
  --primary: #009ffc;
  --primary-hover: #0086d6;
  --primary-light: #e0f4ff;
  --primary-dark: #006eb4;
  --accent: #1d9bf0;
  --accent-gradient: linear-gradient(135deg, #009ffc 0%, #008be5 50%, #0077cc 100%);
  --hero-gradient: linear-gradient(135deg, #009ffc 0%, #008be5 50%, #006eb4 100%);
  --success: #10b981;
  --success-hover: #059669;
  --purple: #8b5cf6;
  --purple-hover: #7c3aed;

  /* Surfaces & Backgrounds (Pure Light Mode - No Eye Fatigue) */
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-glass: rgba(255, 255, 255, 0.96);
  --bg-muted: #f1f5f9;
  --bg-dark: #0f172a;

  /* Typography */
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #ffffff;
  --text-sub: #475569;

  /* Borders & Shadows */
  --border-color: #e2e8f0;
  --border-focus: #009ffc;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.06);
  --shadow-lg: 0 10px 25px -5px rgb(0 0 0 / 0.08), 0 8px 10px -6px rgb(0 0 0 / 0.06);
  --shadow-xl: 0 20px 35px -10px rgba(0, 159, 252, 0.22);
  --shadow-glow: 0 8px 24px -4px rgba(0, 159, 252, 0.4);

  /* Border Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

button, a, input, select, textarea, [role="button"] {
  touch-action: manipulation;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  max-width: 100%;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.25;
}

a {
  color: #026aa2;
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: #004d7a;
}

button {
  cursor: pointer;
  border: none;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
}

:focus-visible {
  outline: 3px solid var(--border-focus);
  outline-offset: 2px;
}

/* Container */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  position: relative;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo img {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0, 159, 252, 0.28);
  object-fit: cover;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.brand-logo:hover img {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(0, 159, 252, 0.42);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.85rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-sub);
  font-weight: 600;
  font-size: 0.96rem;
  transition: color var(--transition-fast);
  padding: 0.35rem 0;
}

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

/* Mobile Menu Toggle Button (Hamburger) */
.btn-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  padding: 0;
  gap: 5px;
  transition: all var(--transition-fast);
  z-index: 101;
}

.btn-menu-toggle:hover {
  background: #f0f9ff;
  border-color: #bae6fd;
}

.hamburger-bar {
  width: 22px;
  height: 2.5px;
  background-color: var(--text-main);
  border-radius: 2px;
  transition: all 0.25s ease-in-out;
}

.btn-menu-toggle.active .hamburger-bar:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
  background-color: var(--primary);
}

.btn-menu-toggle.active .hamburger-bar:nth-child(2) {
  opacity: 0;
}

.btn-menu-toggle.active .hamburger-bar:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
  background-color: var(--primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.badge-edge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

/* ==========================================================================
   Hero Section with Vibrant Twitter Sky Blue Gradient (#009ffc)
   ========================================================================== */
.hero-section {
  position: relative;
  background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.18) 0%, transparent 65%), var(--hero-gradient);
  color: var(--text-light);
  padding: 2.75rem 0 8.5rem;
  text-align: center;
  overflow: hidden;
  contain: paint;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 0.85rem;
}

.hero-title {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 900;
  line-height: 1.18;
  color: #ffffff;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.16);
}

.hero-desc {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.95);
  max-width: 680px;
  margin: 0 auto 1.65rem;
  font-weight: 450;
}

/* Hero Downloader Card */
.downloader-box {
  background: var(--bg-card-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255, 255, 255, 0.4);
  max-width: 780px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

.input-form {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 0.35rem 0.5rem 0.35rem 1rem;
  gap: 0.75rem;
  transition: all var(--transition-fast);
}

.input-form:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0, 159, 252, 0.15);
}

.input-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.url-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1.05rem;
  color: var(--text-main);
  padding: 0.65rem 0;
  outline: none;
  font-family: inherit;
}

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

.input-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.btn-paste {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-muted);
  color: var(--text-sub);
  padding: 0.55rem 0.95rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
  cursor: pointer;
  user-select: none;
}

.btn-paste:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

.btn-paste.is-clear {
  background: #f8fafc;
  color: #64748b;
  border-color: #cbd5e1;
}

.btn-paste.is-clear:hover {
  background: #fee2e2;
  color: #ef4444;
  border-color: #fca5a5;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: var(--accent-gradient);
  color: #ffffff;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-md);
  font-size: 1.05rem;
  font-weight: 700;
  box-shadow: var(--shadow-glow);
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.btn-download:hover {
  background: linear-gradient(135deg, #008be5 0%, #0077cc 50%, #0062a3 100%);
  transform: translateY(-1px);
  box-shadow: 0 10px 28px -4px rgba(0, 159, 252, 0.5);
}

.btn-download:active {
  transform: translateY(1px);
}

.downloader-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  text-align: center;
}

.turnstile-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0.9rem auto 0;
  min-height: 65px;
  width: 100%;
  contain: layout style;
}

/* ==========================================================================
   Loading State & Alert Message
   ========================================================================== */
.alert-box {
  display: none;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  margin: 1.25rem auto 0;
  max-width: 780px;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: left;
}

.alert-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.loader-container {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 0;
  gap: 1rem;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(0, 159, 252, 0.2);
  border-left-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.loader-text {
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
}

/* ==========================================================================
   Result Card Section
   ========================================================================== */
.result-section {
  display: none;
  padding: 2.5rem 0 3.5rem;
}

.result-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1.75rem;
  max-width: 860px;
  margin: 0 auto;
}

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

.media-preview-wrap {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000000;
  box-shadow: var(--shadow-md);
}

.media-thumbnail {
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  max-height: 420px;
  object-fit: cover;
  display: block;
}

.media-badge-duration {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.75);
  color: #ffffff;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
}

.result-details {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.author-bar {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

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

.author-info h4 {
  font-size: 1.05rem;
  font-weight: 700;
}

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

.tweet-text-content {
  font-size: 0.98rem;
  color: var(--text-sub);
  line-height: 1.55;
  background: var(--bg-muted);
  padding: 1rem;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--primary);
  max-height: 120px;
  overflow-y: auto;
}

.download-options-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.download-buttons-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.btn-res-download {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  text-decoration: none;
  gap: 0.5rem;
  min-height: 50px;
  transition: all var(--transition-fast);
}

.btn-res-download .btn-text-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  white-space: nowrap;
}

.btn-res-download .btn-label {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.btn-res-1080p {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 159, 252, 0.25);
}

.btn-res-1080p:hover {
  background: linear-gradient(135deg, #008be5 0%, #006eb4 100%);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-res-720p {
  background: #f0f9ff;
  color: #0284c7;
  border: 1px solid #bae6fd;
}

.btn-res-720p:hover {
  background: #e0f2fe;
  color: #0369a1;
}

.btn-res-480p {
  background: var(--bg-muted);
  color: var(--text-sub);
  border: 1px solid var(--border-color);
}

.btn-res-480p:hover {
  background: #e2e8f0;
  color: var(--text-main);
}

.btn-res-mp3 {
  background: #f5f3ff;
  color: var(--purple-hover);
  border: 1px solid #ddd6fe;
}

.btn-res-mp3:hover {
  background: #ede9fe;
  color: #6d28d9;
}

.btn-reset-wrap {
  margin-top: 0.5rem;
}

.btn-reset {
  width: 100%;
  background: transparent;
  color: var(--text-muted);
  border: 1px dashed var(--border-color);
  padding: 0.75rem;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.btn-reset:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* ==========================================================================
   Features Section (Why Choose Us)
   ========================================================================== */
.features-section {
  padding: 4.5rem 0;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3.5rem;
}

.section-tag {
  display: inline-block;
  color: #006eb4;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

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

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.75rem;
}

.feature-card {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  transition: all var(--transition-fast);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #bae6fd;
}

.feature-icon-wrap {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.feature-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

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

/* ==========================================================================
   How to Download Section (3D Step Cards)
   ========================================================================== */
.steps-section {
  padding: 5rem 0;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.step-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.step-img-wrap {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #f0f9ff;
}

.step-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.step-card:hover .step-img-wrap img {
  transform: scale(1.04);
}

.step-body {
  padding: 1.75rem;
}

.step-num {
  display: inline-block;
  background: var(--primary-light);
  color: #005999;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.85rem;
}

.step-body h3 {
  font-size: 1.25rem;
  margin-bottom: 0.6rem;
}

.step-body p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ==========================================================================
   FAQ Section (Accordion)
   ========================================================================== */
.faq-section {
  padding: 5rem 0;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
}

.faq-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-main);
  overflow: hidden;
  transition: all var(--transition-fast);
}

.faq-item.active {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background: transparent;
  color: var(--text-main);
  font-size: 1.05rem;
  font-weight: 600;
  text-align: left;
}

.faq-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-muted);
  color: var(--text-sub);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: transform 0.3s ease, background-color 0.3s ease;
  flex-shrink: 0;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
  background: var(--primary);
  color: #ffffff;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease-out, padding 0.3s ease;
  padding: 0 1.5rem;
  color: var(--text-sub);
  font-size: 0.98rem;
  line-height: 1.65;
}

.faq-item.active .faq-answer {
  max-height: 600px;
  padding: 0 1.5rem 1.25rem;
}

/* ==========================================================================
   Comprehensive SEO Content Section
   ========================================================================== */
.seo-content-section {
  padding: 5rem 0;
  background: var(--bg-main);
  border-top: 1px solid var(--border-color);
}

.seo-article-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  box-shadow: var(--shadow-sm);
  max-width: 980px;
  margin: 0 auto;
}

.seo-article-card h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: -0.02em;
  margin: 2.75rem 0 1rem;
  color: var(--text-main);
  position: relative;
  padding-bottom: 0.5rem;
}

.seo-article-card h2:first-of-type {
  margin-top: 0;
}

.seo-article-card h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 48px;
  height: 3px;
  background: var(--primary);
  border-radius: var(--radius-full);
}

.seo-article-card h3 {
  font-size: 1.3rem;
  margin: 1.75rem 0 0.6rem;
  color: var(--text-main);
}

.seo-article-card p {
  color: var(--text-sub);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.seo-article-card ul, .seo-article-card ol {
  margin-left: 1.75rem;
  margin-bottom: 1.5rem;
  color: var(--text-sub);
  font-size: 1.05rem;
  line-height: 1.85;
}

.seo-article-card li {
  margin-bottom: 0.5rem;
}

.seo-callout-box {
  background: #f0f9ff;
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
  color: #075985;
  font-size: 0.98rem;
  line-height: 1.65;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-break: break-word;
}

.seo-callout-box > div {
  flex: 1;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.seo-callout-box svg {
  flex-shrink: 0;
  color: var(--primary);
  margin-top: 0.15rem;
}

.seo-callout-box strong,
.seo-callout-box .callout-title {
  color: #0c4a6e;
  font-weight: 700;
}

.seo-callout-box .seo-link {
  color: #034873;
  text-decoration-color: rgba(3, 72, 115, 0.5);
  font-weight: 700;
}

.seo-callout-box .seo-link:hover {
  color: #022b45;
  text-decoration-color: #022b45;
}

code {
  background: rgba(0, 159, 252, 0.08);
  color: #006eb4;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88em;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.seo-article-card strong {
  font-weight: 600;
  color: var(--text-main);
}

.seo-link {
  color: #005999;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(0, 89, 153, 0.45);
  font-weight: 600;
  transition: all var(--transition-fast);
}

.seo-link:hover {
  color: #003d6b;
  text-decoration-color: #003d6b;
}

/* Clean Feature Bullet List (No Cards) */
.feature-bullet-list {
  list-style: none !important;
  margin: 1.5rem 0 2rem !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.feature-bullet-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  color: var(--text-sub);
  font-size: 1.02rem;
  line-height: 1.75;
}

.bullet-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  margin-top: 0.2rem;
}

.bullet-text {
  flex: 1;
}

.bullet-text strong {
  color: var(--text-main);
  font-weight: 600;
}

/* Concluding Summary CTA */
.seo-summary-cta {
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px dashed var(--border-color);
  text-align: center;
}

.btn-scroll-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: #e0f2fe;
  color: #0284c7;
  border: 1px solid #bae6fd;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.98rem;
  transition: all var(--transition-fast);
}

.btn-scroll-top:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 159, 252, 0.25);
}

/* Article Device Step Box */
.device-guide-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin: 1.75rem 0 2.5rem;
}

.device-guide-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.6rem;
  box-shadow: var(--shadow-xs);
}

.device-guide-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-color);
}

.device-guide-icon {
  width: 38px;
  height: 38px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.device-guide-header h3 {
  font-size: 1.15rem;
  margin: 0;
  color: var(--text-main);
}

.clean-step-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.clean-step-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  font-size: 0.95rem;
  color: var(--text-sub);
  line-height: 1.6;
}

.step-badge {
  flex: 0 0 28px !important;
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  max-width: 28px !important;
  border-radius: 50% !important;
  background: #e0f2fe;
  color: #0284c7;
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  margin-top: 0.15rem;
}

.clean-step-item > span:not(.step-badge) {
  flex: 1;
}

/* Comparison Table */
.table-responsive-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 2rem 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: block;
}

.comparison-table td:first-child {
  font-weight: 600;
  color: var(--text-main);
}

.comparison-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  text-align: left;
  background: #ffffff;
  font-size: 0.95rem;
}

.comparison-table th, .comparison-table td {
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.comparison-table th {
  background: #f8fafc;
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table tr:hover td {
  background: #f0f9ff;
}

.table-badge-highlight {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #e0f4ff;
  color: #005999;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  padding: 3.5rem 0 2rem;
  margin-top: auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-brand .brand-logo {
  display: inline-block;
  margin-bottom: 0.25rem;
}

.footer-brand .brand-logo img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 159, 252, 0.22);
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-top: 0.6rem;
  max-width: 320px;
}

.footer-col h3,
.footer-col h4 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--text-main);
  font-weight: 700;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-col a {
  color: var(--text-sub);
  font-size: 0.9rem;
}

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

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: #475569;
  font-size: 0.85rem;
  line-height: 1.6;
}

.footer-disclaimer {
  max-width: 760px;
  margin: 0.5rem auto 0;
  font-size: 0.8rem;
  color: #475569;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */
@media (max-width: 860px) {
  .btn-menu-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #ffffff;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1.25rem 1.25rem;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.14);
    border-bottom: 2px solid var(--primary-light);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100;
  }

  .nav-links.nav-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 0.9rem 1rem;
    border-radius: var(--radius-md);
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--text-main);
    border-bottom: 1px solid #f1f5f9;
  }

  .nav-links a:hover {
    background: #f0f9ff;
    color: var(--primary);
  }

  .result-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .media-thumbnail {
    aspect-ratio: 16 / 9;
    max-height: 280px;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .seo-content-section {
    padding: 3.5rem 0;
  }

  .seo-article-card {
    padding: 2.25rem 1.75rem;
    border-radius: var(--radius-md);
  }
}

@media (max-width: 640px) {
  .hero-section {
    padding: 1.85rem 0 5.75rem;
  }

  .hero-title {
    font-size: clamp(2rem, 7.5vw, 2.75rem);
    line-height: 1.15;
    margin-bottom: 0.65rem;
  }

  .input-form {
    flex-direction: column;
    padding: 0.75rem;
    gap: 0.75rem;
  }

  .input-icon {
    display: none;
  }

  .url-input {
    width: 100%;
    text-align: center;
    padding: 0.4rem 0;
  }

  .input-actions {
    width: 100%;
    justify-content: center;
  }

  .btn-download {
    width: 100%;
  }

  .result-card {
    padding: 1.25rem 1rem;
    border-radius: var(--radius-md);
  }

  .seo-content-section {
    padding: 2.75rem 0;
  }

  .seo-article-card {
    padding: 2.25rem 1.6rem;
  }

  .seo-article-card ul,
  .seo-article-card ol {
    margin-left: 1.4rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1.1rem;
  }

  .hero-title {
    font-size: clamp(2.65rem, 10.5vw, 3.2rem);
    line-height: 1.1;
    margin-bottom: 0.85rem;
  }

  .result-card {
    padding: 1.25rem 1rem;
  }

  .btn-res-download {
    padding: 0.8rem 1rem;
    min-height: 48px;
  }

  .btn-res-download .btn-label {
    font-size: 0.96rem;
  }

  .seo-content-section {
    padding: 2.5rem 0;
  }

  .seo-article-card {
    padding: 1.85rem 1.35rem;
    border-radius: var(--radius-md);
  }

  .seo-article-card h2 {
    font-size: 1.35rem;
    margin: 1.85rem 0 0.75rem;
    line-height: 1.35;
  }

  .seo-article-card p,
  .seo-article-card li {
    font-size: 0.98rem;
    line-height: 1.7;
  }

  .seo-callout-box {
    padding: 1rem 1.15rem;
    margin: 1.25rem 0;
    font-size: 0.94rem;
  }
}

/* ==========================================================================
   Floating Social Share Sidebar (High-Performance & Pure CSS)
   ========================================================================== */
.floating-share-bar {
  position: fixed;
  right: 0;
  left: auto;
  top: 50%;
  transform: translate3d(0, -50%, 0);
  z-index: 990;
  display: flex;
  flex-direction: column;
  width: 48px;
  border-radius: 12px 0 0 12px;
  box-shadow: -2px 8px 24px -4px rgba(0, 0, 0, 0.16), -1px 2px 6px -1px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  contain: layout style;
  user-select: none;
  background: #ffffff;
}

.share-counter {
  background: #ffffff;
  padding: 8px 2px 6px;
  text-align: center;
  border-bottom: 1px solid #f1f5f9;
  border-top-left-radius: 12px;
  border-top-right-radius: 0;
}

.share-counter .count {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
  letter-spacing: -0.3px;
}

.share-counter .label {
  display: block;
  font-size: 9px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.share-buttons {
  display: flex;
  flex-direction: column;
}

.btn-share {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 42px;
  text-decoration: none;
  border: none;
  outline: none;
  cursor: pointer;
  touch-action: manipulation;
  position: relative;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.btn-share-x { background: #000000; color: #ffffff; }
.btn-share-telegram { background: #0088cc; color: #ffffff; }
.btn-share-whatsapp { background: #25d366; color: #ffffff; }
.btn-share-facebook { background: #1877f2; color: #ffffff; }
.btn-share-reddit { background: #ff4500; color: #ffffff; }
.btn-share-native { background: #10b981; color: #ffffff; }

.btn-share-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 28px;
  background: #f1f5f9;
  color: #64748b;
  border: none;
  cursor: pointer;
  touch-action: manipulation;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 0;
  transition: background 0.15s ease, color 0.15s ease, width 0.2s ease;
}

.btn-share-toggle:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.btn-share-toggle .icon-toggle {
  transition: transform 0.3s ease;
}

/* Tooltips on Desktop (Positioned to the left of the bar) */
@media (hover: hover) {
  .btn-share::after {
    content: attr(data-tooltip);
    position: absolute;
    right: calc(100% + 10px);
    left: auto;
    top: 50%;
    transform: translateY(-50%) translateX(6px);
    background: #0f172a;
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    padding: 5px 10px;
    border-radius: 6px;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 1000;
  }

  .btn-share:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }

  .btn-share:hover {
    filter: brightness(1.1);
    transform: scale(1.05);
    z-index: 2;
  }
}

/* Collapsed State (Right Side) */
.floating-share-bar.is-collapsed {
  transform: translate3d(48px, -50%, 0);
  box-shadow: none;
}

.floating-share-bar.is-collapsed .btn-share-toggle {
  position: absolute;
  left: -24px;
  right: auto;
  bottom: 0;
  width: 24px;
  height: 38px;
  border-radius: 8px 0 0 8px;
  background: var(--primary);
  color: #ffffff;
  box-shadow: -2px 2px 10px rgba(0, 159, 252, 0.4);
}

.floating-share-bar.is-collapsed .btn-share-toggle .icon-toggle {
  transform: rotate(180deg);
}

/* Copy Link Floating Toast Notification */
.share-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: #0f172a;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 10000;
}

.share-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Mobile Responsiveness (< 768px) */
@media (max-width: 768px) {
  .floating-share-bar {
    width: 42px;
  }
  .btn-share {
    width: 42px;
    height: 38px;
  }
  .share-counter {
    padding: 6px 2px 4px;
  }
  .share-counter .count {
    font-size: 11px;
  }
  .share-counter .label {
    font-size: 8px;
  }
  .btn-share-toggle {
    width: 42px;
    height: 26px;
  }
}

