/* Main Styles for BatchImageCrop */

/* Header */
.header-wrapper {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.logo {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--fg);
}

.logo-link {
  text-decoration: none;
}

.logo-link:hover .logo {
  color: var(--primary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--fg);
  border-color: var(--border);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--border);
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
}

.btn-icon:hover {
  background: var(--bg-secondary);
}

.btn-icon .icon {
  width: 20px;
  height: 20px;
}

/* Theme toggle */
.dark .sun-icon { display: block; }
.dark .moon-icon { display: none; }
.sun-icon { display: none; }
.moon-icon { display: block; }

/* Main layout - centered with ad space on sides */
.main {
  padding: 24px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

/* Ad space containers */
.main::before,
.main::after {
  content: '';
  position: fixed;
  top: 0;
  bottom: 0;
  width: calc((100vw - 1200px) / 2);
  max-width: 300px;
  z-index: 0;
  pointer-events: none;
}

.main::before {
  left: 0;
}

.main::after {
  right: 0;
}

/* Ensure main content is above ad space */
.main > * {
  position: relative;
  z-index: 1;
}

/* Upload zone */
.upload-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 48px 0;
}

.upload-zone {
  width: 100%;
  max-width: 600px;
  padding: 48px 24px;
  border: 2px dashed var(--border);
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.05);
}

.upload-icon {
  width: 48px;
  height: 48px;
  color: var(--fg-secondary);
  margin-bottom: 16px;
}

.upload-text {
  margin: 0 0 8px;
  font-size: 16px;
  color: var(--fg);
}

.upload-link {
  color: var(--primary-hover);
  text-decoration: underline;
}

.upload-hint {
  margin: 0;
  font-size: 13px;
  color: var(--fg-tertiary);
}

.upload-privacy-hint {
  width: 100%;
  max-width: 600px;
  margin: 12px auto 0;
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--fg-secondary);
  font-size: 13px;
  line-height: 1.6;
}

.upload-privacy-hint svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin-top: 2px;
  color: var(--success);
}

/* Workspace */
.workspace {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
}

@media (max-width: 900px) {
  .workspace {
    grid-template-columns: 1fr;
  }
  
  .main::before,
  .main::after {
    display: none;
  }
}

/* Controls panel */
.controls-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  height: fit-content;
  position: sticky;
  top: 80px;
}

/* Tabs */
.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.tab {
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  background: transparent;
  color: var(--fg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tab:nth-child(4) {
  grid-column: 1;
}

.tab:nth-child(5) {
  grid-column: 2;
}

.tab:hover {
  background: var(--bg);
}

.tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Tab content */
.tab-content {
  margin-bottom: 16px;
}

.tab-pane {
  display: none;
}

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

/* Input groups */
.input-group {
  margin-bottom: 12px;
}

.input-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-secondary);
}

.input-inline {
  display: grid;
  grid-template-columns: 1fr 72px;
  gap: 8px;
  align-items: center;
}

.input-inline input[type="range"] {
  width: 100%;
  margin: 0;
}

.input-inline input[type="number"] {
  width: 100%;
  padding: 6px 10px;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--fg);
}

.input-group input[type="number"],
.input-group select {
  width: 100%;
  padding: 8px 12px;
  font-size: 14px;
  font-family: inherit;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.input-group input[type="range"] {
  width: calc(100% - 50px);
  margin-right: 8px;
}

.input-group span {
  display: inline-block;
  min-width: 40px;
  font-size: 13px;
  color: var(--fg-secondary);
}

/* Social presets grid */
.social-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.social-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  font-size: 11px;
  font-weight: 500;
  font-family: inherit;
  background: var(--bg);
  color: var(--fg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.social-btn:hover {
  border-color: var(--fg-tertiary);
}

.social-btn.active {
  border-color: var(--primary);
  color: var(--primary);
}

.social-btn .social-icon {
  width: 20px;
  height: 20px;
}

.social-btn .social-size {
  font-size: 10px;
  color: var(--fg-tertiary);
}

/* Shape buttons */
.shape-btns {
  display: flex;
  gap: 8px;
}

.shape-btn {
  flex: 1;
  padding: 8px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  background: var(--bg);
  color: var(--fg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.shape-btn:hover {
  border-color: var(--fg-tertiary);
}

.shape-btn.active {
  border-color: var(--primary);
  color: var(--primary);
}

/* Aspect ratio buttons for manual mode */
.aspect-ratio-btns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.aspect-ratio-btn {
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  background: var(--bg);
  color: var(--fg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.aspect-ratio-btn:nth-child(4) {
  grid-column: 1;
}

.aspect-ratio-btn:nth-child(5) {
  grid-column: 2;
}

.aspect-ratio-btn:hover {
  border-color: var(--fg-tertiary);
}

.aspect-ratio-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Crop mode selector */
.crop-mode-selector {
  margin-bottom: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.crop-mode-label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-secondary);
}

.crop-mode-btns {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.crop-mode-btn {
  flex: 1;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  background: var(--bg);
  color: var(--fg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.crop-mode-btn:hover {
  border-color: var(--fg-tertiary);
}

.crop-mode-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.crop-mode-hint {
  margin: 0;
  font-size: 11px;
  color: var(--fg-tertiary);
  line-height: 1.4;
}

/* Action buttons */
.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.action-buttons-row {
  display: flex;
  gap: 8px;
}

.action-buttons-row .btn {
  flex: 1;
  min-width: 80px;
}

.btn-process {
  width: 100%;
  padding: 14px 28px;
  font-size: 18px;
  font-weight: 700;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-process:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-process:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

.btn-process svg {
  width: 20px;
  height: 20px;
}

/* Images section */
.images-section {
  min-height: 200px;
}

.image-count {
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-secondary);
}

/* Image grid */
.image-grid {
  display: grid;
  gap: 12px;
}

.image-card {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s;
  text-align: center;
}

.image-card:hover {
  border-color: var(--primary);
}

.image-card.horizontal {
  grid-column: span 1;
}

.image-card.vertical,
.image-card.square {
  grid-column: span 1;
}

@media (min-width: 600px) {
  .image-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .image-card.horizontal {
    grid-column: span 2;
  }
}

.image-preview-wrapper {
  position: relative;
  display: inline-block;
  max-width: 100%;
  max-height: 480px;
  background: var(--bg);
  overflow: hidden; /* 限制 box-shadow 遮罩在图片区域内 */
}

.image-preview {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 480px;
  position: relative;
  object-fit: contain;
}

/* Remove forced aspect ratio and object-fit to show full image */
/* allow natural contain rendering */

/* Crop overlay on image */
.crop-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  /* Ensure overlay matches image display area when using object-fit: contain */
  /* The overlay should be positioned relative to the image element, not the container */
}

.crop-box {
  position: absolute;
  border: 2px solid var(--primary);
  background: transparent;
  cursor: move;
  pointer-events: all;
  z-index: 2;
}

/* 遮罩层，使用 clip-path 限制在图片区域内 */
.crop-overlay-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
  pointer-events: none;
  /* clip-path 通过 JavaScript 动态设置 */
}

/* Crop size info in top-left corner */
.crop-size-info {
  position: absolute;
  top: 4px;
  left: 4px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 4px;
  pointer-events: none;
  z-index: 10;
  font-family: 'Inter', monospace;
}

/* Circle size info centered */
.crop-box-circle .crop-size-info {
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
  text-align: center;
}

/* Rule of thirds grid (nine grid) */
.crop-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.crop-grid-line {
  position: absolute;
  pointer-events: none;
}

.crop-grid-line.vertical {
  width: 0;
  height: 100%;
  top: 0;
  border-left: 1px dashed rgba(255, 255, 255, 0.6);
}

.crop-grid-line.horizontal {
  height: 0;
  width: 100%;
  left: 0;
  border-top: 1px dashed rgba(255, 255, 255, 0.6);
}

.crop-grid-line.vertical.first {
  left: 33.333%;
}

.crop-grid-line.vertical.second {
  left: 66.666%;
}

.crop-grid-line.horizontal.first {
  top: 33.333%;
}

.crop-grid-line.horizontal.second {
  top: 66.666%;
}

/* Handles container - positioned same as crop-box but not clipped */
.crop-handles-container {
  position: absolute;
  pointer-events: none;
  z-index: 20;
}

.crop-handle {
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--primary);
  border: 2px solid #fff;
  border-radius: 50%;
  cursor: nwse-resize;
  z-index: 20;
  pointer-events: all;
}

/* Corner handles - centered on border */
.crop-handle.nw { top: 0; left: 0; transform: translate(-50%, -50%); cursor: nwse-resize; }
.crop-handle.ne { top: 0; right: 0; transform: translate(50%, -50%); cursor: nesw-resize; }
.crop-handle.sw { bottom: 0; left: 0; transform: translate(-50%, 50%); cursor: nesw-resize; }
.crop-handle.se { bottom: 0; right: 0; transform: translate(50%, 50%); cursor: nwse-resize; }

/* Edge handles - centered on border */
.crop-handle.n { top: 0; left: 50%; transform: translate(-50%, -50%); cursor: ns-resize; }
.crop-handle.s { bottom: 0; left: 50%; transform: translate(-50%, 50%); cursor: ns-resize; }
.crop-handle.w { top: 50%; left: 0; transform: translate(-50%, -50%); cursor: ew-resize; }
.crop-handle.e { top: 50%; right: 0; transform: translate(50%, -50%); cursor: ew-resize; }

/* Preview mode crop box (non-editable) */
.crop-box-preview {
  cursor: default;
  pointer-events: none;
}

.crop-box-preview .crop-handle {
  display: none;
}

/* Shape styles for crop box */
.crop-box-rounded {
  overflow: hidden;
  border-radius: 20px;
}

/* Circle: perfect circle using border-radius */
.crop-box-circle {
  overflow: visible;
  border-radius: 50%;
  /* 不使用 aspect-ratio，完全由JS计算正确的宽高百分比 */
}

/* Move-only mode (percentage, pixels, social) - no resize handles */
.crop-box-move-only {
  cursor: move;
}

/* Ensure crop grid respects border radius */
.crop-box-rounded .crop-grid,
.crop-box-circle .crop-grid {
  border-radius: inherit;
  overflow: hidden;
}

/* Hide grid lines outside rounded/circle shapes */
.crop-box-rounded .crop-grid-line,
.crop-box-circle .crop-grid-line {
  border-radius: inherit;
}


.image-info {
  padding: 8px 12px;
  font-size: 12px;
  color: var(--fg-secondary);
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.image-name {
  margin: 0;
  font-weight: 500;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.image-meta {
  margin: 4px 0 0;
  color: var(--fg-tertiary);
}

.image-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  padding: 0;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
}

.image-card:hover .image-remove {
  opacity: 1;
}

.image-remove:hover {
  background: var(--danger);
}

.image-remove svg {
  width: 16px;
  height: 16px;
}

/* Progress overlay */
.progress-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.progress-card {
  background: var(--bg);
  padding: 32px;
  border-radius: 12px;
  text-align: center;
  min-width: 300px;
}

.progress-card h3,
.progress-card .progress-title {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 600;
}

.progress-bar {
  height: 8px;
  background: var(--bg-secondary);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 4px;
  transition: width 0.2s;
  width: 0%;
}

.progress-text {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--fg-secondary);
}

/* Manual crop overlay */
.manual-crop-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}

.manual-crop-modal {
  background: var(--bg);
  border-radius: 12px;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

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

.manual-crop-header h3,
.manual-crop-header .manual-crop-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.manual-crop-container {
  flex: 1;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: #1a1a1a;
}

#crop-canvas {
  max-width: 100%;
  max-height: 60vh;
  cursor: crosshair;
}

.manual-crop-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-top: 1px solid var(--border);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--fg-secondary);
  cursor: pointer;
}

.checkbox-label input {
  width: 16px;
  height: 16px;
}

.manual-crop-actions {
  display: flex;
  gap: 8px;
}

/* Landing Page Content */
.landing-content {
  background: var(--bg-secondary);
  padding: 48px 24px;
}

.landing-container {
  max-width: 800px;
  margin: 0 auto;
}

.landing-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--fg);
  margin: 0 0 16px 0;
  text-align: center;
}

.landing-intro {
  font-size: 16px;
  line-height: 1.7;
  color: var(--fg-secondary);
  text-align: center;
  margin: 0 0 40px 0;
}

.landing-section {
  margin-bottom: 40px;
}

.landing-section h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--fg);
  margin: 0 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
}

.landing-steps {
  padding-left: 24px;
  margin: 0;
}

.landing-steps li {
  font-size: 15px;
  line-height: 1.8;
  color: var(--fg-secondary);
  margin-bottom: 8px;
}

.landing-steps li strong {
  color: var(--fg);
}

.landing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.landing-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.landing-card h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--fg);
  margin: 0 0 8px 0;
}

.landing-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--fg-secondary);
  margin: 0;
}

.landing-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
}

.landing-features li {
  font-size: 14px;
  line-height: 1.6;
  color: var(--fg-secondary);
  padding-left: 24px;
  position: relative;
}

.landing-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 600;
}

.landing-features li strong {
  color: var(--fg);
}

.landing-faq {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.faq-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.faq-item h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
  margin: 0 0 8px 0;
}

.faq-item p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--fg-secondary);
  margin: 0;
}

.landing-tips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.tip-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.tip-item h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
  margin: 0 0 8px 0;
}

.tip-item p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--fg-secondary);
  margin: 0;
}

.landing-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.landing-table th,
.landing-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.landing-table th {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  background: var(--bg-secondary);
}

.landing-table td {
  font-size: 14px;
  color: var(--fg-secondary);
}

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

.landing-advantages {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
}

.landing-advantages li {
  font-size: 14px;
  line-height: 1.8;
  color: var(--fg-secondary);
  padding-left: 24px;
  position: relative;
  margin-bottom: 8px;
}

.landing-advantages li::before {
  content: "•";
  position: absolute;
  left: 8px;
  color: var(--primary);
  font-weight: 700;
}

.landing-advantages li strong {
  color: var(--fg);
}

.landing-cta {
  font-size: 15px;
  line-height: 1.7;
  color: var(--fg);
  font-weight: 500;
  text-align: center;
  margin: 24px 0 0 0;
  padding: 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* Footer */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 24px;
}

.footer-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer p {
  margin: 0;
  font-size: 13px;
  color: var(--fg-tertiary);
}

.footer-nav {
  display: flex;
  gap: 24px;
}

.footer-nav a {
  font-size: 13px;
  color: var(--fg-secondary);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-nav a:hover {
  color: var(--primary);
}

@media (max-width: 640px) {
  .landing-title {
    font-size: 22px;
  }
  
  .landing-section h3 {
    font-size: 18px;
  }
  
  .footer-container {
    flex-direction: column;
    text-align: center;
  }
}

/* Policy Pages (Privacy, Terms, Contact) */
.back-link {
  color: var(--primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s;
}

.back-link:hover {
  color: var(--primary-hover);
}

.policy-main {
  padding: 48px 24px;
  min-height: calc(100vh - 200px);
}

.policy-container {
  max-width: 700px;
  margin: 0 auto;
}

.policy-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--fg);
  margin: 0 0 8px 0;
}

.policy-updated {
  font-size: 14px;
  color: var(--fg-tertiary);
  margin: 0 0 24px 0;
}

.policy-intro {
  font-size: 16px;
  line-height: 1.7;
  color: var(--fg-secondary);
  margin: 0 0 32px 0;
  padding: 20px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  border-left: 4px solid var(--primary);
}

.policy-section {
  margin-bottom: 32px;
}

.policy-section h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--fg);
  margin: 0 0 12px 0;
}

.policy-section p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--fg-secondary);
  margin: 0 0 12px 0;
}

.policy-section ul {
  margin: 0 0 12px 0;
  padding-left: 24px;
}

.policy-section li {
  font-size: 15px;
  line-height: 1.7;
  color: var(--fg-secondary);
  margin-bottom: 8px;
}

.policy-section li strong {
  color: var(--fg);
}

.policy-section ul ul {
  margin-top: 8px;
  margin-bottom: 8px;
}

.policy-section a {
  color: var(--primary);
  text-decoration: none;
}

.policy-section a:hover {
  text-decoration: underline;
}
