/* PicDriver Global Design System & Component Library */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Color Palette - Modern Dark Photography Slate */
  --bg-main: #090d16;
  --bg-surface: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: #6366f1;
  --border-glow: rgba(99, 102, 241, 0.25);

  /* Brand Accents */
  --brand-primary: #6366f1;
  --brand-primary-hover: #4f46e5;
  --brand-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  --brand-gradient-cyan: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  --brand-success: #10b981;
  --brand-warning: #f59e0b;
  --brand-danger: #ef4444;

  /* Typography */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Elevation & Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 10px 30px -5px rgba(0, 0, 0, 0.5), 0 0 20px rgba(99, 102, 241, 0.1);
  --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.35);

  /* Layout */
  --max-width: 1280px;
  --header-height: 72px;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Fluid Media & Responsive Tables Reset */
img, canvas, svg, video {
  max-width: 100%;
  height: auto;
}

table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
}

.table-responsive,
.table-container,
.table-wrapper,
.matrix-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Header & Nav */
.pic-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  background: rgba(9, 13, 22, 0.85);
  border-bottom: 1px solid var(--border-subtle);
  height: var(--header-height);
  display: flex;
  align-items: center;
}

.pic-header-container,
.header-inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pic-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

.pic-logo-badge {
  background: var(--brand-gradient);
  color: #ffffff;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.pic-nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.pic-nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.pic-nav-link:hover {
  color: var(--text-primary);
}

.privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #34d399;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
}

/* Tool Hero Section */
.tool-hero {
  padding: 48px 24px 24px;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.tool-hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tool-hero p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 720px;
  margin: 0 auto 24px;
}

/* Tool Workspace Container */
.tool-workspace {
  max-width: var(--max-width);
  margin: 0 auto 60px;
  padding: 0 24px;
}

.workspace-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 380px;
  min-height: 600px;
}

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

/* Dropzone */
.dropzone-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px;
  background: rgba(15, 23, 42, 0.4);
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  margin: 24px;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  min-height: 380px;
}

.dropzone-container:hover, .dropzone-container.drag-over {
  border-color: var(--brand-primary);
  background: rgba(99, 102, 241, 0.05);
  box-shadow: var(--shadow-glow);
}

.dropzone-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  color: var(--brand-primary);
}

.dropzone-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.dropzone-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 16px;
  text-align: center;
}

.btn-upload {
  background: var(--brand-primary);
  color: #ffffff;
  border: none;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
  transition: all 0.2s ease;
}

.btn-upload:hover {
  background: var(--brand-primary-hover);
  transform: translateY(-1px);
}

.paste-hint {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-family: var(--font-mono);
}

.kbd {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

/* Live Preview Canvas & Split Slider */
.preview-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: #060911;
  overflow: hidden;
  min-height: 480px;
}

.preview-canvas-wrapper {
  position: relative;
  max-width: 100%;
  max-height: 70vh;
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

canvas {
  display: block;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

/* Before / After Split Slider */
.split-slider-container {
  position: relative;
  overflow: hidden;
  user-select: none;
  max-width: 100%;
}

.split-before-layer {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 50%;
  overflow: hidden;
  border-right: 2px solid #ffffff;
  z-index: 10;
}

.split-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: ew-resize;
  z-index: 20;
}

/* Sidebar Controls */
.controls-sidebar {
  padding: 28px;
  background: rgba(15, 23, 42, 0.95);
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (max-width: 1024px) {
  .controls-sidebar {
    border-left: none;
    border-top: 1px solid var(--border-subtle);
  }
}

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

.control-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.control-val {
  color: var(--brand-primary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

/* Batch Upload Queue (Up to 10 Items) */
.batch-queue-container {
  margin: 16px 24px;
}

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

.batch-queue-title {
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.batch-badge {
  background: rgba(99, 102, 241, 0.15);
  color: var(--brand-primary);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
}

.batch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}

.batch-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  cursor: pointer;
  transition: all 0.15s ease;
}

.batch-card.active {
  border-color: var(--brand-primary);
  background: rgba(99, 102, 241, 0.1);
}

.batch-thumb {
  width: 100%;
  height: 70px;
  object-fit: cover;
  border-radius: 4px;
}

.batch-info {
  font-size: 0.75rem;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.7);
  border: none;
  color: #fff;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 11px;
  cursor: pointer;
}

/* ==========================================================================
   Ultra-Attractive Modern Download & Action Buttons
   ========================================================================== */
.btn-primary-action,
.btn-primary,
button[id*="download"],
.btn-download {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: 9999px;
  border: none;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #db2777 100%);
  background-size: 200% 200%;
  color: #ffffff !important;
  font-family: var(--font-main, 'Plus Jakarta Sans', system-ui, sans-serif);
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: 0.015em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  user-select: none;
  width: 100%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25) inset,
              0 4px 16px rgba(99, 102, 241, 0.4),
              0 10px 28px -4px rgba(124, 58, 237, 0.45);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.25s ease,
              background-position 0.5s ease;
  z-index: 1;
}

/* Light ray shimmer sweep across button */
.btn-primary-action::before,
.btn-primary::before,
button[id*="download"]::before,
.btn-download::before {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 80%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.35) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
  pointer-events: none;
  z-index: 2;
  transition: none;
}

/* Radiant glow ambient aura */
.btn-primary-action:hover,
.btn-primary:hover,
button[id*="download"]:hover,
.btn-download:hover {
  transform: translateY(-2px) scale(1.015);
  background-position: 100% 50%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4) inset,
              0 8px 24px rgba(99, 102, 241, 0.55),
              0 16px 36px -2px rgba(219, 39, 119, 0.5);
}

.btn-primary-action:hover::before,
.btn-primary:hover::before,
button[id*="download"]:hover::before,
.btn-download:hover::before {
  animation: btn-shimmer-pass 0.85s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes btn-shimmer-pass {
  0% { left: -120%; }
  100% { left: 240%; }
}

/* Active click physics */
.btn-primary-action:active,
.btn-primary:active,
button[id*="download"]:active,
.btn-download:active {
  transform: translateY(1px) scale(0.985);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2) inset,
              0 3px 10px rgba(99, 102, 241, 0.4);
}

/* Icon download arrow bounce */
.btn-primary-action svg,
.btn-primary svg,
button[id*="download"] svg,
.btn-download svg {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
  flex-shrink: 0;
}

.btn-primary-action:hover svg,
.btn-primary:hover svg,
button[id*="download"]:hover svg,
.btn-download:hover svg {
  transform: translateY(3px);
}

/* Secondary Action Button (e.g. Download ZIP) */
.btn-secondary-action,
.btn-secondary,
button[id*="zip"],
#btn-download-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 9999px;
  background: rgba(30, 41, 59, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  color: var(--text-primary);
  font-family: var(--font-main, 'Plus Jakarta Sans', system-ui, sans-serif);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  width: 100%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-secondary-action:hover,
.btn-secondary:hover,
button[id*="zip"]:hover,
#btn-download-all:hover {
  background: rgba(99, 102, 241, 0.16);
  border-color: #818cf8;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.btn-secondary-action:active,
.btn-secondary:active,
button[id*="zip"]:active,
#btn-download-all:active {
  transform: translateY(1px);
}

/* Interactive Reference Chart Section */
.ref-section {
  max-width: var(--max-width);
  margin: 60px auto;
  padding: 0 24px;
}

.ref-table-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

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

.ref-table th, .ref-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.95rem;
}

.ref-table th {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-secondary);
  font-weight: 600;
}

/* Content & FAQ Sections */
.info-section {
  max-width: var(--max-width);
  margin: 60px auto;
  padding: 0 24px;
}

/* Symmetrical 4-Column Layout for Steps & Features */
.steps-grid, .features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 32px;
}

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

@media (max-width: 1024px) {
  .steps-grid, .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

@media (max-width: 640px) {
  .steps-grid, .features-grid {
    grid-template-columns: 1fr;
  }
}

.info-section h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 24px;
  text-align: center;
}

.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 18px 24px;
  text-align: left;
  background: none;
  border: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.faq-answer {
  padding: 0 24px 20px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  display: none;
  line-height: 1.7;
}

.faq-item.active .faq-answer {
  display: block;
}

/* Footer */
.pic-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 48px 24px;
  background: rgba(9, 13, 22, 0.95);
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

/* ==========================================================================
   Material Design 3 (M3) UI System
   ========================================================================== */

/* M3 Sliders */
.slider,
input[type="range"].slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  outline: none;
  cursor: pointer;
  transition: background 0.2s ease;
  position: relative;
  margin: 8px 0;
}

.slider:hover,
input[type="range"].slider:hover {
  background: rgba(255, 255, 255, 0.18);
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #818cf8;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.15s ease, background 0.15s ease;
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: #6366f1;
  box-shadow: 0 0 0 8px rgba(99, 102, 241, 0.25), 0 4px 12px rgba(0, 0, 0, 0.5);
}

.slider::-webkit-slider-thumb:active {
  transform: scale(1.1);
  background: #4f46e5;
  box-shadow: 0 0 0 12px rgba(99, 102, 241, 0.35), 0 2px 6px rgba(0, 0, 0, 0.6);
}

.slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #818cf8;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.15s ease, background 0.15s ease;
}

.slider::-moz-range-thumb:hover {
  transform: scale(1.2);
  background: #6366f1;
  box-shadow: 0 0 0 8px rgba(99, 102, 241, 0.25), 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* M3 Value Badges */
.control-value,
.md-value-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  padding: 3px 8px;
  border-radius: 9999px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #818cf8;
  font-family: var(--font-mono, monospace);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* M3 Switch Component */
.md-switch-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md, 12px);
  cursor: pointer;
  user-select: none;
  transition: background 0.2s ease, border-color 0.2s ease;
  margin: 6px 0;
}

.md-switch-container:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(99, 102, 241, 0.3);
}

.md-switch-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.md-switch-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.md-switch-caption {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.md-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
  flex-shrink: 0;
}

.md-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.md-switch-track {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
  transition: background 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.md-switch-thumb {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: #94a3b8;
  border-radius: 50%;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.md-switch input:checked + .md-switch-track {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 0 14px rgba(99, 102, 241, 0.35);
}

.md-switch input:checked + .md-switch-track .md-switch-thumb {
  transform: translateX(22px);
  background-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

/* M3 Segmented Pill Controls */
.md-segmented-tabs,
.mode-selector,
.layout-selector {
  display: grid;
  gap: 6px;
  background: rgba(15, 23, 42, 0.85);
  padding: 5px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.25);
}

.md-segment-btn,
.mode-btn,
.layout-btn {
  padding: 8px 14px;
  background: transparent;
  border: none;
  border-radius: 9999px;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.md-segment-btn:hover,
.mode-btn:hover,
.layout-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.md-segment-btn.active,
.mode-btn.active,
.layout-btn.active {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.45);
  font-weight: 700;
}

/* M3 Elevated Section Panels */
.sub-panel,
.md-surface-panel {
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(16px);
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.panel-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.panel-icon-badge {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* M3 Chips */
.preset-chip-group,
.md-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.preset-chip,
.md-chip {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.preset-chip:hover,
.md-chip:hover {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-1px);
}

.preset-chip.active,
.md-chip.active {
  background: rgba(99, 102, 241, 0.25);
  border-color: #6366f1;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.35);
  font-weight: 700;
}

/* M3 Select Inputs & Outlined Fields */
.select-input,
.md-select {
  width: 100%;
  background-color: rgba(15, 23, 42, 0.85);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 9px 36px 9px 14px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: all 0.2s ease;
}

.select-input:hover,
.md-select:hover {
  border-color: rgba(255, 255, 255, 0.22);
}

.select-input:focus,
.md-select:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

/* ==========================================================================
   Comprehensive Mobile & Tablet Responsiveness Suite (320px - 1024px)
   ========================================================================== */

@media (max-width: 1024px) {
  .workspace-card {
    grid-template-columns: 1fr !important;
    min-height: auto;
  }
  .controls-sidebar {
    border-left: none;
    border-top: 1px solid var(--border-subtle);
  }
}

@media (max-width: 768px) {
  .pic-header {
    height: auto;
    padding: 10px 0;
  }
  .pic-header-container {
    padding: 0 16px;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
  }
  .pic-logo {
    font-size: 1.15rem;
  }
  .pic-nav-links {
    gap: 12px;
    font-size: 0.84rem;
    flex-wrap: wrap;
  }
  .tool-hero {
    padding: 30px 16px 16px;
  }
  .tool-hero h1 {
    font-size: clamp(1.6rem, 6vw, 2.3rem);
  }
  .controls-sidebar {
    padding: 20px 14px;
    gap: 18px;
  }
  .dropzone-container {
    margin: 12px;
    padding: 24px 14px;
    min-height: 240px;
  }
  .action-grid,
  .export-actions,
  .btn-group {
    flex-direction: column;
    width: 100%;
  }
  .btn-primary,
  .btn-secondary,
  .action-btn {
    min-height: 44px;
    width: 100%;
    justify-content: center;
  }
  .preset-chip-group,
  .md-chip-group {
    flex-wrap: wrap;
    gap: 6px;
  }
  .preset-chip,
  .md-chip {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
  .comparison-wrapper,
  .split-container,
  .canvas-viewport {
    max-width: 100%;
    width: 100%;
  }
  table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 480px) {
  .pic-header-container {
    justify-content: center;
    text-align: center;
  }
  .privacy-pill {
    display: none;
  }
  .tool-hero p {
    font-size: 0.88rem;
  }
  .dropzone-container {
    margin: 8px;
    padding: 20px 12px;
    min-height: 200px;
  }
  .dropzone-icon {
    width: 48px;
    height: 48px;
  }
  .dropzone-title {
    font-size: 1.1rem;
  }
  .controls-sidebar {
    padding: 16px 10px;
  }
  .info-section {
    padding: 32px 12px;
  }
  .faq-question {
    padding: 14px 16px;
    font-size: 0.95rem;
  }
  .faq-answer {
    padding: 0 16px 16px;
    font-size: 0.88rem;
  }
}

/* ══════════════════════════════════════════════════════════════════════
   PICDRIVER GLOBAL COMPONENT EXTENSIONS & STUDIO DESIGN SYSTEM
   ══════════════════════════════════════════════════════════════════════ */

/* Dropzone Subtitle & Demo Bar */
.dropzone-sub,
.dropzone-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 6px;
  margin-bottom: 8px;
}

.demo-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

/* Universal Button Design System */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  border: 1px solid transparent;
  user-select: none;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

.btn-primary {
  background: var(--brand-primary);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
  background: var(--brand-primary-hover);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-surface);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.btn-subtle {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-subtle:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.btn-option {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
}

.btn-option:hover, .btn-option.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--brand-primary);
  color: #ffffff;
}

.btn-preset {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-preset:hover, .btn-preset.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--brand-primary);
  color: #fff;
}

/* ═══════════════ STUDIO TOOL GRID (2-COLUMN & RESPONSIVE) ═══════════════ */
.tool-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  align-items: start;
  margin-bottom: 40px;
}

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

.tool-preview-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.tool-controls-panel {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Viewport Toolbar & Column Utilities */
.canvas-col,
.viewport-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.controls-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.viewport-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(15, 23, 42, 0.6);
  border-bottom: 1px solid var(--border-subtle);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.tool-btn:hover {
  color: #fff;
  border-color: var(--brand-primary);
  background: rgba(99, 102, 241, 0.12);
}

.zoom-display {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 48px;
  text-align: center;
}

.text-btn {
  background: transparent;
  border: none;
  color: var(--brand-primary);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 4px 8px;
}

.text-btn:hover {
  text-decoration: underline;
  color: #a5b4fc;
}

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

.download-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* ═══════════════ EDUCATIONAL CONTENT GUIDE & SEO CARDS ═══════════════ */
.tool-content-guide {
  padding: 56px 0;
  border-top: 1px solid var(--border-subtle);
  margin-top: 56px;
}

.guide-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.tool-content-guide h2 {
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  font-weight: 700;
  color: #ffffff;
  margin-top: 42px;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tool-content-guide h2:first-of-type {
  margin-top: 0;
}

.tool-content-guide p {
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.75;
  margin-bottom: 18px;
}

.tool-content-guide p strong {
  color: var(--text-primary);
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 28px 0 42px;
}

.guide-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.guide-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.guide-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.guide-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 0;
}

/* ═══════════════ RESPONSIVE COMPARISON TABLES ═══════════════ */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 24px 0 42px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  -webkit-overflow-scrolling: touch;
}

.guide-table,
.specs-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.guide-table thead,
.specs-table thead {
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid var(--border-subtle);
}

.guide-table th,
.specs-table th {
  padding: 16px 20px;
  font-weight: 700;
  color: #ffffff;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.guide-table td,
.specs-table td {
  padding: 16px 20px;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  line-height: 1.6;
}

.guide-table td strong,
.specs-table td strong {
  color: #ffffff;
}

.guide-table tr:last-child td,
.specs-table tr:last-child td {
  border-bottom: none;
}

.guide-table tr:hover td,
.specs-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* ═══════════════ FREQUENTLY ASKED QUESTIONS (FAQ) ═══════════════ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 24px 0 48px;
}

.faq-item {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  transition: all 0.2s ease;
}

.faq-item:hover {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.faq-question {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
}

.faq-answer p {
  font-size: 0.93rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 0;
}

/* ═══════════════ FOOTER ═══════════════ */
.pic-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 40px 24px;
  background: rgba(9, 13, 22, 0.95);
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--brand-primary);
  text-decoration: underline;
}

/* ═══════════════ CALC MODULES (FILM CALCULATOR ETC) ═══════════════ */
.calc-module {
  display: none;
}

.calc-module.active {
  display: block;
}

.dot-color-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s ease;
}

.dot-color-dot:hover, .dot-color-dot.active {
  transform: scale(1.15);
  border-color: var(--brand-primary);
}

/* ═══════════════ UNIVERSAL UTILITIES & WRAPPERS ═══════════════ */
.pic-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 60px;
}

.pic-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.workspace-main {
  max-width: var(--max-width);
  margin: 0 auto 60px;
  padding: 0 24px;
}

.canvas-container {
  position: relative;
  min-height: 480px;
  background: radial-gradient(circle at center, rgba(30, 41, 59, 0.75) 0%, rgba(15, 23, 42, 0.98) 100%);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  border: 1px solid var(--border-subtle);
  border-top: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 24px;
  user-select: none;
}

.tab-view {
  display: none;
}

.tab-view.active {
  display: block;
}

.pic-content-section {
  padding: 48px 0;
  border-top: 1px solid var(--border-subtle);
  margin-top: 48px;
}

.btn-choose-base,
.btn-choose-blend,
.btn-choose-img1,
.btn-choose-img2,
.btn-select-before,
.btn-select-after,
.btn-choose-master,
.btn-choose-tiles {
  background: var(--brand-primary);
  color: #ffffff;
  border: none;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-choose-base:hover,
.btn-choose-blend:hover,
.btn-choose-img1:hover,
.btn-choose-img2:hover,
.btn-select-before:hover,
.btn-select-after:hover,
.btn-choose-master:hover,
.btn-choose-tiles:hover {
  background: var(--brand-primary-hover);
  transform: translateY(-1px);
}

.batch-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.batch-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
}

.batch-thumb-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0;
}

.switch-toggle,
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch-toggle input,
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: .2s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .2s;
  border-radius: 50%;
}

.switch-toggle input:checked + .toggle-slider,
.toggle-switch input:checked + .toggle-slider {
  background-color: var(--brand-primary);
}

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

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--brand-primary);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

