/* ==========================================================================
   After Effects Project & Preset Downgrader
   Unslopped Studio Interface — Graphite Neutral Ramp
   ========================================================================== */

:root {
  /* Graphite Ramp (unslop design system) */
  --bg-deep: #0f0f10;
  --bg-page: #141415;
  --bg-card: #19191b;
  --bg-raised: #232325;
  --bg-raised-hover: #2b2b2f;
  
  --border-hairline: rgba(237, 237, 237, 0.08);
  --border-hover: rgba(237, 237, 237, 0.16);
  --border-focus: #3b82f6;
  
  --text-primary: #ededed;
  --text-secondary: #a1a1a6;
  --text-muted: #85858b;
  
  --accent: #3b82f6;
  --accent-surface: rgba(59, 130, 246, 0.1);
  --accent-border: rgba(59, 130, 246, 0.3);
  
  --color-success: #4cc38a;
  --color-success-bg: rgba(76, 195, 138, 0.08);
  --color-success-border: rgba(76, 195, 138, 0.2);
  
  --color-danger: #e5484d;
  --color-danger-bg: rgba(229, 72, 77, 0.08);
  --color-danger-border: rgba(229, 72, 77, 0.2);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, Monaco, monospace;
  
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle, quiet scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-page);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-raised);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #333338;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  margin-bottom: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 28px;
  height: 28px;
  background: var(--bg-raised);
  border: 1px solid var(--border-hairline);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.header-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.status-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-success);
}

/* Hero Section */
.hero-section {
  margin-bottom: 28px;
}

.hero-title {
  font-size: 26px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.hero-copy {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.6;
}

/* Main Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  margin-bottom: 24px;
}

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

/* Cards */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: 12px;
  padding: 20px;
}

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

.panel-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Drop Zone */
.drop-zone {
  border: 1px dashed rgba(237, 237, 237, 0.16);
  border-radius: 10px;
  padding: 36px 20px;
  text-align: center;
  background: var(--bg-deep);
  cursor: pointer;
  transition: border-color 0.16s var(--ease), background-color 0.16s var(--ease);
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--border-hover);
  background: #121214;
}

.drop-zone.dragover {
  border-style: solid;
  border-color: var(--accent);
}

.drop-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 12px;
  background: var(--bg-raised);
  border: 1px solid var(--border-hairline);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.drop-prompt {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.drop-subtext {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.format-tags {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 16px;
}

.format-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  background: var(--bg-raised);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-hairline);
}

.drop-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.14s var(--ease), border-color 0.14s var(--ease), transform 0.1s var(--ease);
  text-decoration: none;
  line-height: 1;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* Primary Button (unslop dark: crisp light neutral on dark) */
.btn-primary {
  background: var(--text-primary);
  color: var(--bg-deep);
  border-color: rgba(255, 255, 255, 0.12);
}
.btn-primary:hover:not(:disabled) {
  background: #ffffff;
}

.btn-secondary {
  background: var(--bg-raised);
  border-color: var(--border-hairline);
  color: var(--text-primary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--bg-raised-hover);
  border-color: var(--border-hover);
}

.btn-sm {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 6px;
}

.btn-icon {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.12s var(--ease);
}
.btn-icon:hover {
  background: var(--bg-raised);
  color: var(--text-primary);
  border-color: var(--border-hairline);
}

/* Queue List */
.queue-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.queue-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.queue-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.queue-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-deep);
  padding: 2px 6px;
  border-radius: 4px;
}

.queue-btns {
  display: flex;
  gap: 8px;
}

.empty-state {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-muted);
  font-size: 13px;
  border: 1px solid var(--border-hairline);
  border-radius: 8px;
  background: var(--bg-deep);
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 480px;
  overflow-y: auto;
}

.file-row {
  display: grid;
  grid-template-columns: 48px 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-deep);
  border: 1px solid var(--border-hairline);
  border-radius: 8px;
  transition: background-color 0.14s var(--ease);
}
.file-row:hover {
  background: #111113;
}

.file-ext {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-align: center;
  padding: 3px 6px;
  border-radius: 4px;
  background: var(--bg-raised);
  color: var(--text-secondary);
  border: 1px solid var(--border-hairline);
}

.file-meta-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.file-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-submeta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.tag-version {
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
}
.tag-version.source { color: var(--text-secondary); }
.tag-version.target { color: var(--text-primary); font-weight: 500; }

.file-status-col {
  font-size: 12px;
}

.status-label {
  font-size: 11px;
  font-family: var(--font-mono);
  padding: 2px 6px;
  border-radius: 4px;
}
.status-label.ready { color: var(--text-muted); background: var(--bg-raised); }
.status-label.processing { color: var(--accent); background: var(--accent-surface); }
.status-label.success { color: var(--color-success); background: var(--color-success-bg); border: 1px solid var(--color-success-border); }
.status-label.error { color: var(--color-danger); background: var(--color-danger-bg); border: 1px solid var(--color-danger-border); }

.file-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Settings Form */
.settings-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

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

.control-label-hint {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.select-field,
.input-field {
  background: var(--bg-deep);
  border: 1px solid var(--border-hairline);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  width: 100%;
  outline: none;
  transition: border-color 0.14s var(--ease);
}

.select-field:focus,
.input-field:focus {
  border-color: var(--border-focus);
}

/* Switch / Checkbox Row */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: var(--bg-deep);
  border: 1px solid var(--border-hairline);
  border-radius: 8px;
}

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

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

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

.switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--bg-raised);
  border: 1px solid var(--border-hairline);
  transition: background-color 0.16s var(--ease);
  border-radius: 10px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 2px;
  background-color: var(--text-secondary);
  transition: transform 0.16s var(--ease), background-color 0.16s var(--ease);
  border-radius: 50%;
}
input:checked + .slider {
  background-color: var(--accent);
  border-color: var(--accent);
}
input:checked + .slider:before {
  transform: translateX(16px);
  background-color: #ffffff;
}

/* Info Callout */
.info-callout {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  border-top: 1px solid var(--border-hairline);
  padding-top: 16px;
  margin-top: 8px;
}
.info-callout strong {
  color: var(--text-secondary);
  font-weight: 500;
}

/* Inspector Modal */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s var(--ease);
  padding: 16px;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: 12px;
  width: 100%;
  max-width: 800px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
}

.modal-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.modal-content-body {
  padding: 16px 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hex-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 11px;
}
.hex-table th {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border-hairline);
  color: var(--text-muted);
  font-weight: 500;
}
.hex-table td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
}

.diff-old {
  color: var(--color-danger);
  background: var(--color-danger-bg);
  padding: 1px 4px;
  border-radius: 3px;
}
.diff-new {
  color: var(--color-success);
  background: var(--color-success-bg);
  padding: 1px 4px;
  border-radius: 3px;
}

.hex-dump-box {
  background: var(--bg-deep);
  border: 1px solid var(--border-hairline);
  border-radius: 6px;
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  overflow-x: auto;
  line-height: 1.7;
}

/* FAQ Section - Clean Linear/Vercel Studio Aesthetic */
.faq-section {
  margin-top: 64px;
  padding-top: 36px;
  border-top: 1px solid var(--border-hairline);
}
.faq-header {
  margin-bottom: 24px;
}
.faq-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.faq-title {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
.faq-list {
  display: flex;
  flex-direction: column;
}
.faq-row {
  border-bottom: 1px solid var(--border-hairline);
  padding: 0;
  background: transparent;
  transition: all 0.16s var(--ease);
}
.faq-row:first-child {
  border-top: 1px solid var(--border-hairline);
}
.faq-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 4px;
  cursor: pointer;
  outline: none;
  list-style: none;
  font-size: 13.5px;
  font-weight: 450;
  color: var(--text-secondary);
  user-select: none;
  transition: color 0.15s ease;
}
.faq-summary::-webkit-details-marker {
  display: none;
}
.faq-summary:hover {
  color: var(--text-primary);
}
.faq-row[open] .faq-summary {
  color: var(--text-primary);
}
.faq-chevron {
  color: var(--text-muted);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.15s ease;
  flex-shrink: 0;
  margin-left: 16px;
}
.faq-summary:hover .faq-chevron {
  color: var(--text-primary);
}
.faq-row[open] .faq-chevron {
  transform: rotate(180deg);
  color: var(--text-primary);
}
.faq-content {
  padding: 0 4px 18px 4px;
}
.faq-content p {
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0;
}
.faq-content code {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--text-primary);
}

/* Footer */
.site-footer {
  margin-top: 48px;
  padding-top: 20px;
  padding-bottom: 24px;
  border-top: 1px solid var(--border-hairline);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  gap: 16px;
  flex-wrap: wrap;
}
.footer-creator {
  display: flex;
  align-items: center;
  gap: 8px;
}
.creator-link {
  color: var(--text-primary);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px dotted var(--border-subtle);
  transition: all 0.15s ease;
}
.creator-link:hover {
  color: #fff;
  border-bottom-color: var(--text-primary);
}
.footer-dot {
  color: var(--text-muted);
  opacity: 0.5;
}
.footer-note {
  font-family: var(--font-mono);
  font-size: 11px;
}
.footer-socials {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.social-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  color: var(--text-secondary);
  transition: all 0.16s var(--ease);
  text-decoration: none;
}
.social-icon-btn:hover {
  background: var(--bg-raised);
  border-color: var(--border-subtle);
  color: var(--text-primary);
  transform: translateY(-1px);
}
.social-icon-btn svg {
  display: block;
}

/* Navigation Links in Header */
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-item {
  font-size: 12.5px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 450;
  transition: all 0.15s ease;
  padding: 5px 10px;
  border-radius: 6px;
}
.nav-item:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}
.nav-item.active {
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
}

/* Breadcrumbs */
.breadcrumbs-bar {
  margin-top: 14px;
  margin-bottom: 24px;
}
.breadcrumbs-list {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}
.breadcrumbs-list a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
}
.breadcrumbs-list a:hover {
  color: var(--text-primary);
}
.bc-sep {
  color: var(--text-muted);
  opacity: 0.5;
}
.bc-current {
  color: var(--text-primary);
  font-weight: 500;
}

/* Profile Hero & Story */
.profile-hero {
  margin-bottom: 24px;
}
.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: 14px;
  padding: 32px 28px;
  display: flex;
  gap: 28px;
  align-items: flex-start;
}
@media (max-width: 680px) {
  .profile-card {
    flex-direction: column;
    padding: 24px 20px;
  }
}
.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--bg-raised);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c084fc;
  flex-shrink: 0;
}
.profile-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.profile-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: #c084fc;
  font-weight: 500;
}
.profile-name {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0;
}
.profile-subtitle {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 4px 0 16px 0;
  max-width: 620px;
}
.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.profile-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 450;
  background: var(--bg-raised);
  border: 1px solid var(--border-hairline);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.16s var(--ease);
}
.profile-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-subtle);
  color: var(--text-primary);
  transform: translateY(-1px);
}
.profile-btn.primary-btn {
  background: #2e1065;
  border-color: #7e22ce;
  color: #f3e8ff;
  font-weight: 500;
}
.profile-btn.primary-btn:hover {
  background: #3b0764;
  border-color: #a855f7;
  color: #fff;
}

/* Story Section */
.story-section {
  margin-bottom: 40px;
}
.story-card {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: 14px;
  padding: 32px 28px;
}
.story-title {
  font-size: 16px;
  font-weight: 550;
  color: var(--text-primary);
  margin: 0 0 16px 0;
}
.story-text {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0 0 14px 0;
  max-width: 740px;
}
.story-text code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  background: var(--bg-raised);
  border: 1px solid var(--border-hairline);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--text-primary);
}
.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-hairline);
}
.story-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-number {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}
.stat-desc {
  font-size: 11.5px;
  color: var(--text-muted);
}
