/* ==============================================================================
   FreeHDMoviesStreaming - Modern Professional Dark Theme Design System
   Multi-Page Support & Clean Visual Directory
   ============================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg-page: #101216;
  --bg-surface: #161920;
  --bg-card: #1c202a;
  --bg-card-hover: #222734;
  --bg-input: #12141a;
  --border-color: #272c3a;
  --border-subtle: #1e222d;

  --text-main: #f3f4f6;
  --text-body: #cbd5e1;
  --text-muted: #8b9bb4;
  --text-dim: #5c687e;

  --color-brand: #38bdf8;
  --color-success: #22c55e;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --max-width: 1100px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-page);
  color: var(--text-body);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background-color: rgba(18, 21, 28, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.brand-logo-img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.brand-text {
  font-weight: 700;
  color: var(--text-main);
}

.brand-badge {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 4px;
  margin-left: 6px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-link {
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.15s;
  padding: 6px 0;
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-brand);
  border-radius: 2px;
}

/* Page Layout */
.main-content {
  padding: 36px 0 64px;
}

.directory-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 36px;
}

/* Hero / Heading */
.page-header-block {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 28px;
}

.page-title {
  font-size: clamp(1.75rem, 3.2vw, 2.3rem);
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.25;
  letter-spacing: -0.025em;
  margin-bottom: 12px;
}

.page-meta-update {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.page-lead-copy {
  font-size: 0.95rem;
  color: var(--text-body);
  line-height: 1.65;
}

/* Standards & Testing Methodology Cards */
.standards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 22px;
  margin: 28px 0;
}

.standards-col h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.standards-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.86rem;
  color: var(--text-body);
}

.standards-list li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.std-check {
  color: var(--color-success);
  flex-shrink: 0;
}

.ad-score-key {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.86rem;
}

.ad-score-key li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.score-emoji {
  font-size: 1.15rem;
  line-height: 1.2;
}

.score-emoji.good { color: var(--color-success); }
.score-emoji.med { color: var(--color-warning); }
.score-emoji.poor { color: var(--color-danger); }

/* Search & Table Controls */
.table-controls-wrap {
  margin: 32px 0 20px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.table-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.search-bar-box {
  flex-grow: 1;
  min-width: 280px;
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0 14px;
  transition: border-color 0.15s;
}

.search-bar-box:focus-within {
  border-color: var(--color-brand);
}

.search-bar-box svg {
  width: 16px;
  height: 16px;
  color: var(--text-dim);
  margin-right: 10px;
  flex-shrink: 0;
}

.search-input-field {
  width: 100%;
  padding: 10px 0;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 0.92rem;
  outline: none;
  font-family: inherit;
}

.search-input-field::placeholder {
  color: var(--text-dim);
}

.category-filter-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 7px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 500;
  transition: all 0.15s;
}

.filter-chip:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
}

.filter-chip.active {
  background: #222938;
  border-color: #3b82f6;
  color: #fff;
  font-weight: 600;
}

/* Master Table */
.table-scroll-container {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: #14171f;
  margin-bottom: 32px;
}

.sites-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
}

.sites-table th {
  background: #181c26;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
}

.sites-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.92rem;
  vertical-align: middle;
}

.sites-table tbody tr.site-row:hover {
  background: #1c212e;
}

.th-rank, .td-rank {
  width: 7%;
  font-weight: 700;
  color: var(--text-dim);
}

.th-site, .td-site {
  width: 38%;
  text-align: left !important;
}

.site-item-header {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.site-icon-box {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  object-fit: contain;
  background: #111;
  flex-shrink: 0;
}

.site-link-text {
  font-weight: 600;
  color: #cbd5e1;
  font-size: 0.96rem;
  transition: color 0.15s;
}

.site-link-text:hover {
  color: #38bdf8;
}

.th-movies, .td-movies, .th-tv, .td-tv {
  width: 14%;
}

.circle-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: rgba(34, 197, 94, 0.15);
  color: var(--color-success);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 50%;
}

.circle-check svg {
  width: 13px;
  height: 13px;
  stroke: var(--color-success);
  stroke-width: 2.8;
}

.circle-dash {
  color: var(--text-dim);
}

.th-score, .td-score {
  width: 14%;
}

.ad-icon-badge {
  font-size: 1.3rem;
  line-height: 1;
}

.ad-icon-badge.good { color: var(--color-success); }
.ad-icon-badge.med { color: var(--color-warning); }
.ad-icon-badge.poor { color: var(--color-danger); }

.th-action, .td-action {
  width: 13%;
}

/* Polished Action Buttons (NO ugly external link arrow icon!) */
.btn-stream {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  background: #1f2737;
  border: 1px solid #2d384e;
  color: #e2e8f0;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.15s;
}

.btn-stream:hover {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

.btn-toggle-preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  padding: 6px 8px;
  background: transparent;
  color: var(--text-dim);
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 0.78rem;
  transition: all 0.15s;
}

.btn-toggle-preview:hover {
  color: var(--text-main);
  background: var(--bg-card);
  border-color: var(--border-color);
}

/* Expandable Screenshot Preview Row */
.preview-row {
  display: none;
  background: #11141c;
}

.preview-row.open {
  display: table-row;
}

.preview-cell {
  padding: 16px 24px;
  text-align: left;
}

.preview-screenshot-card {
  max-width: 720px;
  margin: 0 auto;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.preview-screenshot-img {
  width: 100%;
  height: auto;
  display: block;
}

.preview-screenshot-bar {
  padding: 8px 16px;
  background: #181c26;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ==============================================================================
   Rich Legal Streaming Platforms Section
   ============================================================================== */
.legal-showcase-section {
  margin-top: 48px;
  padding-top: 36px;
  border-top: 1px solid var(--border-color);
}

.legal-section-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-brand);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.2);
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.legal-section-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 8px;
}

.legal-section-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  max-width: 780px;
  margin-bottom: 24px;
}

.legal-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
  margin-bottom: 36px;
}

.legal-platform-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s, border-color 0.15s;
  position: relative;
}

.legal-platform-card:hover {
  transform: translateY(-2px);
  border-color: #3b82f6;
}

.legal-card-banner {
  height: 4px;
  width: 100%;
}

.legal-card-body {
  padding: 20px;
}

.legal-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.legal-brand-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.legal-brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: contain;
}

.legal-brand-name {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text-main);
}

.legal-pill-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(34, 197, 94, 0.1);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.legal-card-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.76rem;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.legal-spec-item {
  background: var(--bg-input);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.legal-card-text {
  font-size: 0.88rem;
  color: var(--text-body);
  line-height: 1.5;
  margin-bottom: 18px;
}

.legal-card-footer {
  padding: 0 20px 20px;
}

.btn-legal-watch {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  background: #2563eb;
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 6px;
  transition: background 0.15s;
}

.btn-legal-watch:hover {
  background: #1d4ed8;
}

/* In-depth Guides & Content */
.guide-article-block {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border-color);
}

.guide-article-block h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 12px;
}

.guide-article-block p {
  font-size: 0.92rem;
  color: var(--text-body);
  line-height: 1.7;
  margin-bottom: 16px;
}

/* FAQ Accordion */
.faq-accordion-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.faq-card-row {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-input);
  overflow: hidden;
}

.faq-trigger {
  width: 100%;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

.faq-trigger svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.faq-card-row.open .faq-trigger svg {
  transform: rotate(180deg);
  color: var(--color-brand);
}

.faq-content {
  display: none;
  padding: 0 20px 16px;
  font-size: 0.9rem;
  color: var(--text-body);
  line-height: 1.65;
}

.faq-card-row.open .faq-content {
  display: block;
}

/* Disclaimer */
.disclaimer-card {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-left: 3px solid #ef4444;
  border-radius: 8px;
  padding: 18px 22px;
  margin: 36px 0 0;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.disclaimer-card strong {
  color: #f87171;
}

/* Footer */
.site-footer {
  background: #0d0f14;
  border-top: 1px solid var(--border-color);
  padding: 40px 0 28px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.footer-nav-col h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-main);
  margin-bottom: 12px;
}

.footer-nav-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-nav-col a {
  color: var(--text-muted);
  font-size: 0.84rem;
  transition: color 0.15s;
}

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

.footer-bottom-bar {
  border-top: 1px solid var(--border-subtle);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-dim);
}

@media (max-width: 768px) {
  .standards-grid {
    grid-template-columns: 1fr;
  }
  .directory-panel {
    padding: 20px 14px;
  }
  .nav-links {
    display: none;
  }
  .th-movies, .td-movies, .th-tv, .td-tv {
    display: none;
  }
}
