/* =========================================================================
   VIDEO METADATA EDITOR PAGE STYLES - VIDDOW.COM
   3-Column Sticky Architecture & Safe Ads (Synchronized with az2pdf.com)
   100% Client-Side RAM & CPU Processing • Lossless Tag Preservation
   ========================================================================= */

/* Khung layout 3 cột bọc toàn bộ trang công cụ */
.tool-layout-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 2px 0 60px;
  position: relative;
  box-sizing: border-box;
}

/* 2 bên sidebar quảng cáo trượt 300px sát mép ngoài màn hình 0px và cách header 2px */
.sticky-sidebar {
  width: 300px;
  flex-shrink: 0;
  position: -webkit-sticky;
  position: sticky;
  top: calc(var(--header-height, 58px) + 2px);
  z-index: 20;
  border-radius: 0 !important;
  will-change: transform;
  margin: 0 !important;
  padding: 0 !important;
}

.sticky-sidebar.sidebar-left {
  margin-left: 0 !important;
  padding-left: 0 !important;
}

.sticky-sidebar.sidebar-right {
  margin-right: 0 !important;
  padding-right: 0 !important;
}

.sticky-sidebar-inner {
  width: 300px;
  height: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  border-radius: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  transition: transform 0.15s ease-out;
}

.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;
}

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

/* 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;
  position: relative;
}

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

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

/* Main Card */
.metadata-card {
  background: rgba(17, 22, 34, 0.75);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}

/* Drop Zone */
.drop-zone {
  border: 2px dashed rgba(249, 115, 22, 0.4);
  background: rgba(249, 115, 22, 0.02);
  border-radius: var(--radius-md);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: #f97316;
  background: rgba(249, 115, 22, 0.08);
}

.drop-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 16px;
  color: #f97316;
}

/* Editor Area Container */
.metadata-editor-area {
  animation: metaFadeIn 0.3s ease-out;
}

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

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

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

.media-preview-box video {
  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: 6px;
  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: 3px 9px;
  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(249, 115, 22, 0.12);
  border-color: rgba(249, 115, 22, 0.25);
  color: #fb923c;
}

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

/* Quick Actions Toolbar */
.meta-quick-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  padding: 14px 18px;
  background: rgba(10, 13, 20, 0.5);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.quick-toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-strip-meta {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-strip-meta:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: #ef4444;
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-reset-meta {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

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

.btn-saved-profile {
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.3);
  color: #fb923c;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-saved-profile:hover {
  background: rgba(249, 115, 22, 0.22);
  border-color: #f97316;
  color: #ffffff;
  transform: translateY(-1px);
}

.privacy-badge-hint {
  font-size: 12.5px;
  color: #10b981;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.memory-saved-indicator {
  color: #34d399;
  font-size: 12.5px;
  font-weight: 500;
  opacity: 0.9;
  transition: opacity 0.2s, transform 0.2s;
}

.memory-saved-indicator.pulse {
  animation: savedPulse 0.4s ease;
}

@keyframes savedPulse {
  0% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.08); opacity: 1; color: #10b981; }
  100% { transform: scale(1); opacity: 0.9; }
}

/* Metadata Form Fields */
.meta-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.meta-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.meta-field-group.full-width {
  grid-column: span 2;
}

.meta-label {
  font-size: 13.5px;
  font-weight: 600;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.meta-label-hint {
  font-size: 11.5px;
  font-weight: 400;
  color: #64748b;
}

.meta-input,
.meta-textarea {
  width: 100%;
  background: rgba(10, 13, 20, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  color: #ffffff;
  font-family: inherit;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.meta-input:focus,
.meta-textarea:focus {
  outline: none;
  border-color: #f97316;
  background: rgba(10, 13, 20, 0.9);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.18);
}

.meta-input::placeholder,
.meta-textarea::placeholder {
  color: #475569;
}

.meta-textarea {
  resize: vertical;
  min-height: 70px;
}

/* Strip Alert Banner */
.strip-active-banner {
  display: none;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 20px;
  align-items: center;
  justify-content: space-between;
  color: #fca5a5;
  font-size: 13.5px;
}

.strip-active-banner.show {
  display: flex;
}

.btn-undo-strip {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
}

/* Quick Genre Tags */
.quick-genre-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.genre-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.genre-tag:hover {
  background: rgba(249, 115, 22, 0.15);
  border-color: rgba(249, 115, 22, 0.35);
  color: #fb923c;
  transform: translateY(-1px);
}

.genre-tag.active {
  background: rgba(249, 115, 22, 0.25);
  border-color: #f97316;
  color: #ffffff;
}

/* Privacy & Camera Hardware Simulation Card */
.hardware-audit-card {
  background: rgba(10, 14, 24, 0.65);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 24px;
}

.hardware-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.hardware-card-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

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

.hardware-card-badge {
  font-size: 11px;
  font-weight: 700;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60a5fa;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.hardware-help-text {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.4;
}

.hardware-preset-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.hardware-select-label {
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
  white-space: nowrap;
}

.hardware-select {
  flex: 1;
  min-width: 260px;
  padding: 10px 14px;
  background: #090d16;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

.hardware-select:focus {
  border-color: #3b82f6;
}

.hardware-inputs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  background: rgba(0, 0, 0, 0.25);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.hw-field label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 4px;
}

.hw-field .meta-input {
  padding: 8px 10px;
  font-size: 12.5px;
}

@media (max-width: 768px) {
  .hardware-inputs-grid {
    grid-template-columns: 1fr;
  }
}

/* Privacy Options Checkbox */
.privacy-option-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  cursor: pointer;
}

.privacy-option-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #10b981;
  cursor: pointer;
}

.privacy-option-text {
  font-size: 13.5px;
  color: #cbd5e1;
}

.privacy-option-text strong {
  color: #34d399;
}

/* Main Action Buttons */
.meta-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-save-meta {
  padding: 14px 34px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  border-radius: 0 !important;
  min-width: 220px;
}

/* 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(249, 115, 22, 0.4);
}

.feature-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(249, 115, 22, 0.12);
  color: #f97316;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

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

.feature-box p {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
}

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

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

.step-number {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 32px;
  font-weight: 900;
  color: rgba(249, 115, 22, 0.15);
  line-height: 1;
}

.step-card h4 {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}

.step-card p {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
}

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

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

.faq-item:hover {
  border-color: rgba(249, 115, 22, 0.3);
}

.faq-question {
  width: 100%;
  padding: 16px 20px;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-family: inherit;
}

.faq-arrow {
  color: #94a3b8;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.faq-item.active .faq-arrow {
  transform: rotate(180deg);
  color: #f97316;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease-out;
  padding: 0 20px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

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

/* Technical Overview & Definition Card */
.geo-definition-card {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.08) 0%, rgba(16, 185, 129, 0.05) 100%);
  border: 1px solid rgba(249, 115, 22, 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, #f97316 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: #fb923c;
  background: rgba(249, 115, 22, 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(249, 115, 22, 0.35);
  background: rgba(249, 115, 22, 0.1);
}

/* Responsive Queries */
@media (max-width: 1360px) {
  .sticky-sidebar {
    display: none !important;
  }
  .tool-layout-wrapper {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
  }
  .main-content {
    max-width: 880px;
  }
}

@media (max-width: 900px) {
  .features-grid,
  .howto-steps {
    grid-template-columns: 1fr;
  }
  .meta-form-grid {
    grid-template-columns: 1fr;
  }
  .meta-field-group.full-width {
    grid-column: span 1;
  }
  .media-header-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .media-preview-box {
    width: 100%;
    height: 160px;
  }
  .section-title {
    font-size: 26px;
  }
}

@media (max-width: 600px) {
  .metadata-card {
    padding: 20px 16px;
  }
  .meta-action-bar {
    flex-direction: column;
    width: 100%;
  }
  .meta-action-bar .btn {
    width: 100%;
  }
  .meta-quick-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .quick-toolbar-left {
    flex-direction: column;
  }
}
