/* =========================================================================
   HOME PAGE STYLES - VIDDOW.COM
   ========================================================================= */

/* Hero Section (Trang Chủ) */
.hero,
.hero-section {
  padding: 16px 0 0;
  text-align: center;
  position: relative;
  z-index: auto;
}

.hero-title {
  font-size: 38px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.8px;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

/* Hero Search Wrapper */
.hero-search-wrapper {
  max-width: 760px;
  margin: 0 auto;
  position: relative;
  z-index: 20;
}

.hero-search-share-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  position: relative;
}

/* Input Card */
.input-card {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 10px 8px 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
}

.input-card:focus-within {
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px var(--accent-orange-glow), 0 12px 35px rgba(0, 0, 0, 0.6);
}

.input-field-wrap {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.input-icon {
  color: var(--text-muted);
  margin-right: 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.url-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 16px;
  padding: 10px 0;
}

.url-input::placeholder {
  color: var(--text-muted);
}

.clear-input {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  border-radius: 50%;
  transition: all 0.2s;
}

.clear-input:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

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

.btn-paste {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  padding: 10px 16px;
  font-size: 14px;
  border-radius: var(--radius-md);
  transition: all 0.2s;
  border: 1px solid var(--border-color);
  cursor: pointer;
}

.btn-paste:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

/* =========================================================================
   VIDEO ANALYSIS RESULT & ERROR CARDS (TRANG CHỦ)
   ========================================================================= */

.analysis-error-banner {
  max-width: 760px;
  width: 100%;
  margin: 20px auto 0;
  box-sizing: border-box;
}

.analysis-result-card {
  max-width: 760px;
  width: 100%;
  margin: 24px auto 0;
  box-sizing: border-box;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg), 0 0 35px rgba(249, 115, 22, 0.08);
  position: relative;
  overflow: hidden;
  contain: layout style;
}

/* File Preview Header */
.file-preview-header {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-color);
  min-width: 0;
}

.file-thumbnail {
  width: 120px;
  height: 80px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: #111622;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
  border: 1px solid var(--border-color);
}

.file-info {
  flex: 1;
  min-width: 0;
}

.file-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  min-height: 24px;
  margin-bottom: 8px;
  color: #ffffff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.file-meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-pill {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
}

.meta-pill.highlight {
  background: rgba(249, 115, 22, 0.15);
  color: #f97316;
}

/* Hardware Profiler Widget */
.hardware-profiler-widget {
  background: rgba(10, 13, 20, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hw-info-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hw-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.hw-item strong {
  color: #ffffff;
}

.hw-item svg {
  color: #f97316;
}

.hw-threads-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hw-threads-selector label {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.threads-select {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #ffffff;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

.threads-select:focus {
  border-color: var(--accent-orange);
}

.threads-select option {
  background: #111622;
  color: #ffffff;
}

/* Format Toggle Bar (Video vs Audio) */
.format-toggle-bar {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 18px;
  gap: 6px;
  border: 1px solid var(--border-color);
}

.format-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.format-tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.format-tab-btn.active {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(234, 88, 12, 0.3));
  color: #f97316;
  border: 1px solid rgba(249, 115, 22, 0.4);
  box-shadow: 0 2px 10px rgba(249, 115, 22, 0.15);
}

/* Quality Chips Area */
.quality-chips-container {
  margin-bottom: 20px;
}

.chips-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.quality-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.q-chip {
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.q-chip:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.q-chip.active {
  background: #f97316;
  color: #ffffff;
  border-color: #ea580c;
  box-shadow: 0 2px 10px rgba(249, 115, 22, 0.35);
}

.q-chip .chip-codec {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.25);
  color: #ffffff;
}

/* Responsive Mobile cho Analysis Result Card */
@media (max-width: 768px) {
  .analysis-result-card {
    padding: 18px 14px !important;
    margin-top: 18px !important;
    border-radius: var(--radius-md) !important;
  }

  .file-preview-header {
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 14px;
  }

  .file-thumbnail {
    width: 96px;
    height: 64px;
  }

  .file-title {
    font-size: 15px;
  }

  .hardware-profiler-widget {
    padding: 12px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .hw-info-group {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .hw-threads-selector {
    width: 100%;
    justify-content: space-between;
  }

  .quality-chips-container {
    margin-bottom: 16px;
    position: relative;
  }

  .chips-label {
    margin-bottom: 6px;
    font-size: 11px;
  }

  .quality-chips-grid {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    gap: 6px !important;
    padding: 2px 16px 8px 2px !important;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-mask-image: linear-gradient(to right, #000 88%, transparent 100%);
    mask-image: linear-gradient(to right, #000 88%, transparent 100%);
  }

  .quality-chips-grid::-webkit-scrollbar {
    display: none !important;
  }

  .q-chip {
    flex: 0 0 auto !important;
    scroll-snap-align: start;
    padding: 6px 12px !important;
    font-size: 12px !important;
    border-radius: 6px !important;
    white-space: nowrap !important;
    gap: 4px !important;
  }
}

/* Supported Platforms Bar */
.supported-bar {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
}

.supported-list {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.platform-tag {
  color: var(--text-secondary);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Feature Cards Grid */
.features-section {
  padding: 60px 0 80px;
}

.features-section .section-title {
  font-size: 36px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 36px;
}

/* Ads banners placement */
.home-ad-below-supported,
.home-ad-below-features {
  display: flex;
  justify-content: center;
  width: 100%;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(249, 115, 22, 0.3);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.feature-icon-wrapper {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(249, 115, 22, 0.1);
  color: var(--accent-orange);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  border: 1px solid rgba(249, 115, 22, 0.2);
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Home Mobile Responsive */
@media (max-width: 768px) {
  .hero,
  .hero-section {
    padding-top: 20px;
  }

  .hero-title {
    font-size: 30px;
  }

  @media (max-width: 480px) {
    .hero-title {
      font-size: 26px;
      letter-spacing: -0.4px;
      line-height: 1.25;
    }
  }

  .features-section .section-title {
    font-size: 26px;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .hero-search-share-wrapper {
    gap: 8px;
    align-items: center;
    position: relative;
    width: 100%;
  }

  .hero-search-share-wrapper.is-share-open .input-card {
    transform: scale(0.9) translateX(-24px);
    opacity: 0.22;
    filter: blur(1px);
    pointer-events: none;
  }

  .input-card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    flex-direction: column;
    gap: 12px;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .input-card:focus-within {
    border-color: transparent !important;
    box-shadow: none !important;
  }

  .input-field-wrap {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: all 0.25s ease;
    box-sizing: border-box;
  }

  .input-field-wrap:focus-within {
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 3px var(--accent-orange-glow), 0 10px 30px rgba(0, 0, 0, 0.5);
  }

  .input-icon {
    margin-left: 2px;
    margin-right: 2px;
    flex-shrink: 0;
    color: var(--text-muted);
  }

  .url-input {
    width: 100%;
    padding: 6px 0;
    font-size: 15px;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
  }

  .input-actions {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .input-actions .btn {
    min-height: 48px;
    padding: 12px 18px;
    font-size: 15px;
    font-weight: 700;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-sizing: border-box;
  }

  .input-actions .btn-paste {
    width: auto;
    flex: 0 0 auto;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    box-shadow: none;
  }

  .input-actions .btn-paste:active {
    background: rgba(255, 255, 255, 0.16);
  }

  .input-actions .btn-primary {
    flex: 1;
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.35);
  }
}

/* =========================================================================
   GEO COMPARISON MATRIX & ECOSYSTEM SECTIONS - HOME PAGE
   ========================================================================= */
.home-compare-section {
  margin-top: 48px;
  padding: 36px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.home-section-desc {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.65;
  text-align: center;
  max-width: 780px;
  margin: -12px auto 28px;
}

.compare-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
  background: rgba(10, 13, 20, 0.55);
}

.compare-table th,
.compare-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.compare-table th {
  background: rgba(255, 255, 255, 0.03);
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

.compare-table th.viddow-col,
.compare-table td.viddow-col {
  background: rgba(249, 115, 22, 0.05);
  border-left: 1px solid rgba(249, 115, 22, 0.2);
  border-right: 1px solid rgba(249, 115, 22, 0.2);
  color: #ffffff;
  font-weight: 600;
}

.compare-table th.viddow-col {
  color: var(--accent-orange);
}

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

.table-badge-yes {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #10b981;
  font-weight: 600;
}

.table-badge-no {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ef4444;
}

/* Ecosystem Tools Grid */
.ecosystem-section {
  margin-top: 48px;
  padding: 36px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

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

.ecosystem-card {
  display: flex;
  flex-direction: column;
  background: rgba(10, 13, 20, 0.55);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.25s ease;
}

.ecosystem-card:hover {
  transform: translateY(-3px);
  border-color: rgba(249, 115, 22, 0.4);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
}

.eco-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.eco-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.eco-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
  flex-grow: 1;
}

.eco-action {
  margin-top: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-orange);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

@media (max-width: 900px) {
  .ecosystem-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .home-compare-section,
  .ecosystem-section {
    padding: 28px 18px;
  }
}

/* =========================================================================
   RESPONSIVE COMPARISON MATRIX ON MOBILE & TABLET (CARDS LAYOUT)
   ========================================================================= */
@media (max-width: 768px) {
  .home-compare-section {
    padding: 24px 14px;
    margin-top: 36px;
    border-radius: var(--radius-md);
  }

  .home-section-desc {
    font-size: 13.5px;
    margin-bottom: 20px;
    text-align: left;
  }

  .compare-table-wrap {
    border: none;
    border-radius: 0;
    overflow: visible;
    background: transparent;
  }

  .compare-table {
    display: block;
    width: 100%;
    background: transparent;
    border: none;
  }

  .compare-table thead {
    display: none;
  }

  .compare-table tbody {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }

  .compare-table tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "feature feature"
      "traditional viddow";
    background: rgba(13, 17, 26, 0.75);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  }

  /* Feature Title (Hàng trên cùng của Card) */
  .compare-table td:nth-child(1) {
    grid-area: feature;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 0 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 13.5px;
    font-weight: 700;
    color: #ffffff;
    background: transparent;
  }

  /* Traditional Downloader (Cột trái) */
  .compare-table td:nth-child(2) {
    grid-area: traditional;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 4px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
    padding: 10px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.45;
  }

  .compare-table td:nth-child(2)::before {
    content: "Other Tools";
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted);
    opacity: 0.75;
  }

  /* Viddow Downloader (Cột phải nổi bật) */
  .compare-table td:nth-child(3) {
    grid-area: viddow;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 4px;
    background: rgba(249, 115, 22, 0.07);
    border: 1px solid rgba(249, 115, 22, 0.35);
    border-radius: var(--radius-sm);
    padding: 10px;
    font-size: 12px;
    color: #ffffff;
    font-weight: 600;
    line-height: 1.45;
  }

  .compare-table td:nth-child(3)::before {
    content: "Viddow";
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--accent-orange);
  }

  .compare-table td.viddow-col {
    border-left: 1px solid rgba(249, 115, 22, 0.35);
    border-right: 1px solid rgba(249, 115, 22, 0.35);
  }

  .table-badge-yes {
    font-size: 12px;
    line-height: 1.45;
  }
}

@media (max-width: 380px) {
  .compare-table tr {
    grid-template-columns: 1fr;
    grid-template-areas:
      "feature"
      "viddow"
      "traditional";
    gap: 8px;
  }
}

