/* Viddow.com - Video Metadata Checker Stylesheet
   Architecture: Pure Vanilla CSS • Glassmorphism • Dark Mode First • Fluid Responsive
   Zero Tailwind Dependency • High-Fidelity Technical Data Visualization
*/

/* 1. Layout Wrapper */
.tool-layout-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  position: relative;
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  min-height: calc(100vh - 160px);
}

/* 2. Sidebars Quảng Cáo Sticky Chuẩn Viddow */
.sticky-sidebar {
  width: 300px;
  min-width: 300px;
  flex-shrink: 0;
  display: block;
  z-index: 10;
  pointer-events: auto;
}

@media (max-width: 1400px) {
  .sticky-sidebar {
    display: none !important;
  }
}

.sticky-sidebar-inner {
  position: -webkit-sticky;
  position: sticky;
  top: 80px;
  width: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.sticky-sidebar.sidebar-left .sticky-sidebar-inner {
  transform-origin: top left;
}

.sticky-sidebar.sidebar-right .sticky-sidebar-inner {
  transform-origin: top right;
}

@media (max-height: 675px) {
  .sticky-sidebar.sidebar-left .sticky-sidebar-inner { transform: scale(0.93); }
  .sticky-sidebar.sidebar-right .sticky-sidebar-inner { transform: scale(0.93); }
}

@media (max-height: 635px) {
  .sticky-sidebar.sidebar-left .sticky-sidebar-inner { transform: scale(0.88); }
  .sticky-sidebar.sidebar-right .sticky-sidebar-inner { transform: scale(0.88); }
}

@media (max-height: 595px) {
  .sticky-sidebar.sidebar-left .sticky-sidebar-inner { transform: scale(0.82); }
  .sticky-sidebar.sidebar-right .sticky-sidebar-inner { transform: scale(0.82); }
}

@media (max-height: 550px) {
  .sticky-sidebar.sidebar-left .sticky-sidebar-inner { transform: scale(0.75); }
  .sticky-sidebar.sidebar-right .sticky-sidebar-inner { transform: scale(0.75); }
}

.sticky-sidebar *,
.sticky-sidebar .ad-slot-group-container,
.sticky-sidebar .ad-slot-wrapper,
.sticky-sidebar .ad-placeholder-frame,
.sticky-sidebar .ad-placeholder,
.sticky-sidebar .banner-img,
.sticky-sidebar .btn-ad-pill {
  border-radius: 0 !important;
}

/* 3. Cột nội dung chính */
.main-content {
  flex: 1 1 auto;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

/* 4. Header & Top Banner */
.section-header {
  text-align: center;
  margin-bottom: 24px;
}

.section-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
  display: block;
  text-align: center;
  margin-bottom: 8px;
}

.section-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.5;
}

.metadata-top-ad {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

/* 5. Main Card Container */
.checker-card {
  background: rgba(15, 20, 32, 0.75);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 32px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  margin-bottom: 30px;
}

/* 6. Drop Zone */
.drop-zone {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 48px 24px;
  text-align: center;
  background: rgba(10, 13, 20, 0.4);
  cursor: pointer;
  transition: all 0.25s ease;
  outline: none;
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.06);
  transform: translateY(-2px);
}

.drop-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #60a5fa;
  transition: transform 0.2s;
}

.drop-zone:hover .drop-icon {
  transform: scale(1.08);
}

.drop-icon svg {
  width: 32px;
  height: 32px;
}

/* 7. Media Header Overview Card */
.media-header-card {
  display: flex;
  gap: 20px;
  background: rgba(10, 13, 20, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 24px;
  align-items: center;
}

.media-preview-box {
  width: 140px;
  height: 90px;
  flex-shrink: 0;
  background: #090d16;
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}

.media-preview-box video,
.media-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.media-filename {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-specs-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.spec-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

.spec-pill.highlight {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.25);
  color: #60a5fa;
}

.spec-pill.success {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.25);
  color: #34d399;
}

.spec-pill.warning {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.25);
  color: #fbbf24;
}

.spec-pill.danger {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.25);
  color: #f87171;
}

/* 8. Inspector Sections & Tables */
.checker-sections-wrap {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-bottom: 24px;
}

.checker-panel {
  background: rgba(10, 14, 22, 0.55);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s;
}

.checker-panel:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.panel-title {
  font-size: 14px;
  font-weight: 700;
  color: #e2e8f0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}

.panel-title svg {
  color: #3b82f6;
}

.panel-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.panel-body {
  padding: 16px 18px;
}

/* Key-Value Metadata Grid Table */
.meta-table {
  width: 100%;
  border-collapse: collapse;
}

.meta-table tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

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

.meta-table td {
  padding: 10px 8px;
  font-size: 13px;
  vertical-align: top;
}

.meta-key {
  width: 220px;
  color: #94a3b8;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.meta-val {
  color: #f1f5f9;
  font-weight: 500;
  word-break: break-word;
}

.meta-val.empty {
  color: #64748b;
  font-style: italic;
}

.meta-val.highlight {
  color: #60a5fa;
  font-weight: 600;
}

.copy-mini-btn {
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  opacity: 0;
  transition: opacity 0.2s, color 0.2s;
  margin-left: 6px;
}

.meta-table tr:hover .copy-mini-btn {
  opacity: 1;
}

.copy-mini-btn:hover {
  color: #38bdf8;
}

/* Privacy Alert Box */
.privacy-status-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  font-size: 13px;
  gap: 12px;
}

.privacy-status-box.clean {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #34d399;
}

.privacy-status-box.alert {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #f87171;
}

.btn-quick-strip {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-quick-strip:hover {
  background: #ef4444;
  color: #ffffff;
}

/* Raw JSON Code Box */
.json-preview-container {
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: 'JetBrains Mono', 'Fira Code', Menlo, Consolas, monospace;
  font-size: 12px;
  color: #a5b4fc;
  max-height: 220px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* 9. Action Buttons Bar */
.checker-action-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}

.btn-edit-action {
  padding: 14px 34px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  border-radius: 0 !important;
  min-width: 220px;
  text-decoration: none;
}

/* Toast Notification */
.checker-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  z-index: 99999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.checker-toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* 10. Features, How-To, FAQ */
.info-section {
  margin-top: 48px;
}

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

.feature-box {
  background: rgba(17, 22, 34, 0.65);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px;
  transition: transform 0.2s, border-color 0.2s;
}

.feature-box:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.4);
}

.feature-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #60a5fa;
  margin-bottom: 16px;
}

.feature-title {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}

.feature-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* How-To Steps Grid */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 24px;
}

.step-card {
  background: rgba(17, 22, 34, 0.55);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  position: relative;
}

.step-num {
  font-size: 28px;
  font-weight: 900;
  color: rgba(59, 130, 246, 0.3);
  margin-bottom: 12px;
  line-height: 1;
}

.step-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}

.step-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

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

.faq-item {
  background: rgba(17, 22, 34, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s;
}

.faq-item.active {
  border-color: rgba(59, 130, 246, 0.4);
}

.faq-question {
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.faq-chevron {
  transition: transform 0.25s;
  color: var(--text-muted);
  flex-shrink: 0;
}

.faq-item.active .faq-chevron {
  transform: rotate(180deg);
  color: #60a5fa;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
  padding: 0 20px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.faq-item.active .faq-answer {
  padding-bottom: 18px;
}

/* 10.5. Technical Overview & Definition Card */
.geo-definition-card {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(16, 185, 129, 0.05) 100%);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-lg, 16px);
  padding: 24px 28px;
  margin-top: 36px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
}

.geo-definition-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #3b82f6 0%, #10b981 100%);
}

.geo-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.15);
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.geo-text {
  font-size: 14.5px;
  line-height: 1.68;
  color: #e2e8f0;
  margin-bottom: 16px;
}

.geo-text strong {
  color: #ffffff;
}

.geo-meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.geo-pill {
  font-size: 12px;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px 12px;
  border-radius: 14px;
  transition: all 0.2s ease;
}

.geo-pill:hover {
  color: #ffffff;
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.1);
}

/* 11. Responsive Design */
@media (max-width: 900px) {
  .features-grid,
  .steps-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .checker-card {
    padding: 20px 16px;
  }
  .media-header-card {
    flex-direction: column;
    align-items: stretch;
  }
  .media-preview-box {
    width: 100%;
    height: 160px;
  }
  .meta-key {
    width: 120px;
  }
  .checker-action-bar {
    flex-direction: column;
    width: 100%;
  }
  .checker-action-bar .btn,
  .btn-edit-action {
    width: 100%;
  }
}
