/* ==========================================================================
   GhostMeta AI - Components & Interactive UI
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Cyber Dropzone Area
   -------------------------------------------------------------------------- */
.dropzone-container {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
}

.dropzone-wrapper {
  position: relative;
  background: var(--bg-card);
  border: 2px dashed rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-xl);
  padding: 56px 32px;
  text-align: center;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
  box-shadow: var(--shadow-lg), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.dropzone-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(16, 185, 129, 0.08) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.dropzone-wrapper:hover,
.dropzone-wrapper.dragover {
  border-color: var(--emerald-400);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 35px rgba(16, 185, 129, 0.25);
}

.dropzone-wrapper:hover::before,
.dropzone-wrapper.dragover::before {
  opacity: 1;
}

.dropzone-corners {
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: var(--emerald-400);
  opacity: 0.5;
  transition: all 0.3s ease;
}

.dropzone-wrapper:hover .dropzone-corners {
  opacity: 1;
  width: 22px;
  height: 22px;
}

.corner-tl { top: 12px; left: 12px; border-top: 2px solid; border-left: 2px solid; border-radius: 4px 0 0 0; }
.corner-tr { top: 12px; right: 12px; border-top: 2px solid; border-right: 2px solid; border-radius: 0 4px 0 0; }
.corner-bl { bottom: 12px; left: 12px; border-bottom: 2px solid; border-left: 2px solid; border-radius: 0 0 0 4px; }
.corner-br { bottom: 12px; right: 12px; border-bottom: 2px solid; border-right: 2px solid; border-radius: 0 0 4px 0; }

.dropzone-icon-box {
  width: 76px;
  height: 76px;
  margin: 0 auto 20px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(99, 102, 241, 0.15));
  border: 1px solid var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dropzone-wrapper:hover .dropzone-icon-box {
  transform: scale(1.08);
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.4);
}

.dropzone-icon-box svg {
  width: 36px;
  height: 36px;
  color: var(--emerald-400);
  transition: transform 0.3s ease;
}

.dropzone-wrapper:hover .dropzone-icon-box svg {
  transform: translateY(-2px);
}

.dropzone-heading {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.dropzone-subheading {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.dropzone-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gradient-primary);
  color: #060911;
  font-weight: 700;
  font-size: 15px;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.35);
  margin-bottom: 20px;
}

.dropzone-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(16, 185, 129, 0.55);
}

.dropzone-filetypes {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.filetype-badge {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

/* Sample Quick-Test Bar */
.sample-bar {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.sample-label {
  font-size: 13px;
  color: var(--text-muted);
}

.sample-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sample-btn:hover {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--emerald-400);
  color: var(--emerald-400);
}

/* --------------------------------------------------------------------------
   2. Clean Settings & Tool Controller Bar
   -------------------------------------------------------------------------- */
.settings-panel {
  background: var(--bg-surface-glass);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(16px);
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  box-shadow: var(--shadow-md);
}

.setting-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.setting-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.setting-tooltip {
  cursor: help;
  color: var(--text-muted);
  font-size: 12px;
}

.custom-select, .custom-range {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
}

.custom-select:focus {
  border-color: var(--emerald-400);
}

.custom-toggle-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.3);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.toggle-info {
  display: flex;
  flex-direction: column;
}

.toggle-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.toggle-desc {
  font-size: 11px;
  color: var(--text-muted);
}

/* Custom Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.12);
  transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--emerald-500);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* --------------------------------------------------------------------------
   3. Studio Workspace (After Upload State)
   -------------------------------------------------------------------------- */
.studio-workspace {
  display: none;
  flex-direction: column;
  gap: 32px;
  animation: fadeIn 0.4s ease forwards;
}

.studio-workspace.active {
  display: flex;
}

/* Top Action Ribbon */
.studio-header-card {
  background: var(--bg-surface-glass);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  backdrop-filter: blur(16px);
}

.studio-status-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}

.security-score-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 8px 16px;
  border-radius: var(--radius-full);
}

.security-score-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--emerald-500);
  color: #060911;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.security-score-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--emerald-400);
}

.studio-btn-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-primary {
  background: var(--gradient-primary);
  color: #060911;
  border: none;
  padding: 10px 24px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(16, 185, 129, 0.5);
}

/* Two-Column Studio Layout */
.studio-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
}

@media (max-width: 1024px) {
  .studio-grid {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   4. Visual Comparison View / Diff Slider
   -------------------------------------------------------------------------- */
.preview-card {
  background: var(--bg-surface-glass);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-md);
}

.preview-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.preview-title {
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.diff-slider-container {
  position: relative;
  width: 100%;
  height: 480px;
  background: #020408;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  user-select: none;
}

.diff-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.diff-image.before {
  z-index: 1;
  width: 100%;
}

.diff-image-after-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  overflow: hidden;
  z-index: 2;
}

.diff-image.after {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* width will be scaled up inside wrapper via JS */
}

.diff-handle {
  position: absolute;
  top: 0;
  left: 50%;
  width: 3px;
  height: 100%;
  background: var(--emerald-400);
  z-index: 10;
  cursor: ew-resize;
  transform: translateX(-50%);
  box-shadow: 0 0 12px var(--emerald-400);
}

.diff-handle-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #060911;
  border: 2px solid var(--emerald-400);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--emerald-400);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.6);
}

.diff-tag {
  position: absolute;
  top: 14px;
  z-index: 5;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.diff-tag.original {
  right: 14px;
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.diff-tag.cleaned {
  left: 14px;
  background: rgba(16, 185, 129, 0.2);
  color: var(--emerald-400);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

/* File Metric Stats Bar */
.file-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.metric-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: center;
}

.metric-title {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-family: var(--font-mono);
  margin-bottom: 4px;
}

.metric-val {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.metric-val.green {
  color: var(--emerald-400);
}

/* --------------------------------------------------------------------------
   5. Forensic Metadata Inspector Card
   -------------------------------------------------------------------------- */
.inspector-card {
  background: var(--bg-surface-glass);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-md);
  height: fit-content;
}

.inspector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 16px;
}

.inspector-tabs {
  display: flex;
  gap: 6px;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  overflow-x: auto;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tab-btn.active {
  background: var(--emerald-500);
  color: #060911;
  font-weight: 700;
}

/* Detected Threats / Found Metadata Alerts */
.audit-alert-box {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.audit-alert-box.clean {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
}

.alert-icon {
  color: #f87171;
  flex-shrink: 0;
  margin-top: 2px;
}

.audit-alert-box.clean .alert-icon {
  color: var(--emerald-400);
}

.alert-content h5 {
  font-size: 14px;
  font-weight: 700;
  color: #fca5a5;
  margin-bottom: 2px;
}

.audit-alert-box.clean .alert-content h5 {
  color: var(--emerald-400);
}

.alert-content p {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Metadata Key-Value List */
.meta-tree {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 6px;
}

.meta-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
}

.meta-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.meta-key {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--indigo-400);
}

.meta-status-tag {
  font-size: 10px;
  font-family: var(--font-mono);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}

.meta-status-tag.stripped {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.meta-val {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  word-break: break-all;
  background: rgba(0, 0, 0, 0.3);
  padding: 6px 8px;
  border-radius: 4px;
}

/* Hash Scrambler Comparison */
.hash-comparison-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hash-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hash-title {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.hash-code {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--emerald-400);
  background: rgba(16, 185, 129, 0.08);
  padding: 4px 8px;
  border-radius: 4px;
  word-break: break-all;
}

.hash-code.original {
  color: #f87171;
  background: rgba(239, 68, 68, 0.08);
}

/* --------------------------------------------------------------------------
   6. Batch Processing Queue Card
   -------------------------------------------------------------------------- */
.batch-card {
  background: var(--bg-surface-glass);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 24px;
  backdrop-filter: blur(16px);
  margin-top: 16px;
}

.batch-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.batch-items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
}

.batch-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  gap: 16px;
}

.batch-file-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.batch-thumb {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--border-medium);
}

.batch-names {
  min-width: 0;
}

.batch-filename {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}

.batch-filesize {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.batch-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.batch-status-pill {
  font-size: 11px;
  font-family: var(--font-mono);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-weight: 700;
}

.batch-status-pill.ready {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald-400);
}

.batch-download-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.batch-download-btn:hover {
  background: var(--emerald-500);
  color: #060911;
}

/* --------------------------------------------------------------------------
   7. Information, Comparison & FAQ Sections
   -------------------------------------------------------------------------- */
.feature-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  border-color: var(--border-active);
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5), 0 0 20px rgba(16, 185, 129, 0.15);
}

.feature-card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(99, 102, 241, 0.15));
  border: 1px solid var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--emerald-400);
}

.feature-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}

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

/* Comparison Table */
.comparison-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-top: 40px;
  box-shadow: var(--shadow-lg);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.comparison-table th, .comparison-table td {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 14px;
}

.comparison-table th {
  background: rgba(0, 0, 0, 0.4);
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-primary);
  font-size: 15px;
}

.comparison-table th.highlight,
.comparison-table td.highlight {
  background: rgba(16, 185, 129, 0.06);
  border-left: 1px solid rgba(16, 185, 129, 0.2);
  border-right: 1px solid rgba(16, 185, 129, 0.2);
  color: var(--emerald-400);
  font-weight: 600;
}

/* FAQ Accordion */
.faq-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 860px;
  margin: 40px auto 0;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.25s ease;
}

.faq-item.active {
  border-color: var(--border-active);
  background: var(--bg-surface-elevated);
}

.faq-question {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-primary);
  padding: 20px 24px;
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-family: var(--font-heading);
}

.faq-chevron {
  color: var(--emerald-400);
  transition: transform 0.3s ease;
}

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

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

.faq-item.active .faq-answer {
  max-height: 300px;
  padding-bottom: 20px;
}
