

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fb;
  --bg-tertiary: #f1f3f7;
  --bg-hover: #eef0f5;

  --text-primary: #1a1a2e;
  --text-secondary: #555770;
  --text-muted: #8e90a6;
  --text-light: #b0b3c7;

  --accent-main: #e8384f;
  --accent-warm: #fd6a3e;
  --accent-gold: #f5a623;
  --accent-green: #00b87a;
  --accent-teal: #00a3b4;
  --accent-blue: #4285f4;
  --accent-indigo: #5c6bc0;
  --accent-rose: #e8384f;

  --border-color: #e8eaef;
  --border-hover: #d0d3dc;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.08);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.1);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; outline: none; font-family: inherit; }

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 64px;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.navbar-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 16px;
  color: white;
}

.navbar-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.navbar-tagline {
  display: none;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.navbar-links a {
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.navbar-links a:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.bg-mesh { display: none; }

.main-content {
  min-height: calc(100vh - 64px);
}

.hero {
  text-align: center;
  padding: 4.5rem 2rem 2rem;
  max-width: 680px;
  margin: 0 auto;
}

.hero-badge { display: none; }

.hero h1 {
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -1.5px;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--accent-main) 0%, var(--accent-warm) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.7;
}

.tools-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 2rem 5rem;
}

.tools-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: var(--text-light);
  margin-bottom: 1.2rem;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.tool-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 1.25rem 1.5rem;
  background: var(--bg-primary);
  cursor: pointer;
  transition: var(--transition-normal);
  border: none;
  border-radius: 0;
}

.tool-card::before { display: none; }

.tool-card:hover {
  background: var(--bg-secondary);
  transform: none;
  box-shadow: none;
}

.tool-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  margin-bottom: 0;
  transition: var(--transition-fast);
}

.tool-card:hover .tool-card-icon {
  transform: scale(1.08);
  box-shadow: none;
}

.tool-card-text {
  min-width: 0;
  flex: 1;
}

.tool-card h3 {
  font-size: 0.88rem;
  font-weight: 650;
  margin-bottom: 1px;
  color: var(--text-primary);
}

.tool-card p {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.tool-card[data-color="red"]    { --icon-bg: #ffeaed; --icon-color: #e8384f; }
.tool-card[data-color="pink"]   { --icon-bg: #fce4ec; --icon-color: #e84393; }
.tool-card[data-color="orange"] { --icon-bg: #fff3e0; --icon-color: #fd6a3e; }
.tool-card[data-color="gold"]   { --icon-bg: #fff8e1; --icon-color: #f5a623; }
.tool-card[data-color="green"]  { --icon-bg: #e8f5e9; --icon-color: #00b87a; }
.tool-card[data-color="teal"]   { --icon-bg: #e0f7fa; --icon-color: #00a3b4; }
.tool-card[data-color="blue"]   { --icon-bg: #e3f2fd; --icon-color: #4285f4; }
.tool-card[data-color="indigo"] { --icon-bg: #e8eaf6; --icon-color: #5c6bc0; }
.tool-card[data-color="cyan"]   { --icon-bg: #e0f7fa; --icon-color: #00a3b4; }
.tool-card[data-color="purple"] { --icon-bg: #f3e5f5; --icon-color: #9c27b0; }

.tool-card-icon {
  background: var(--icon-bg, #f1f3f7);
  color: var(--icon-color, #555);
}

.tool-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 2.5rem 2rem 5rem;
}

.tool-page-header {
  text-align: center;
  margin-bottom: 2rem;
}

.tool-page-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  transition: var(--transition-fast);
  background: var(--bg-tertiary);
}

.tool-page-back:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.tool-page-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 28px;
}

.tool-page-header h1 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
  letter-spacing: -0.5px;
}

.tool-page-header p {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.upload-zone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-xl);
  padding: 3rem 2rem;
  text-align: center;
  background: var(--bg-secondary);
  transition: var(--transition-normal);
  cursor: pointer;
  margin-bottom: 1.2rem;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--accent-main);
  background: #fff5f6;
}

.upload-zone.drag-over {
  transform: scale(1.01);
}

.upload-zone input[type="file"] { display: none; }

.upload-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #ffeaed;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 24px;
  color: var(--accent-main);
  transition: var(--transition-normal);
}

.upload-zone:hover .upload-icon {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(232, 56, 79, 0.12);
}

.upload-zone h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
}

.upload-zone p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.upload-zone .browse-btn {
  color: var(--accent-main);
  font-weight: 600;
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 1.2rem;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  animation: slideIn 0.25s ease;
}

.file-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #ffeaed;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-main);
  font-size: 16px;
  flex-shrink: 0;
}

.file-item-info { flex: 1; min-width: 0; }

.file-item-name {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}

.file-item-size {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.file-item-remove {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: transparent;
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  flex-shrink: 0;
  font-size: 16px;
}

.file-item-remove:hover {
  background: #ffeaed;
  color: var(--accent-main);
}

.file-item-reorderable {
  cursor: grab;
  user-select: none;
}

.file-item-reorderable:active {
  cursor: grabbing;
}

.file-item-order {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--accent-main);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}

.file-item-arrows {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}

.file-item-arrow {
  width: 24px;
  height: 20px;
  border-radius: 4px;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  font-size: 14px;
  border: none;
  cursor: pointer;
}

.file-item-arrow:hover:not(:disabled) {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.file-item-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.file-item-arrow i,
.file-item-arrow svg {
  width: 14px;
  height: 14px;
}

.file-item-dragging {
  opacity: 0.4;
  border-style: dashed;
}

.file-item-dragover {
  border-color: var(--accent-main);
  background: #fff5f6;
}

.options-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.2rem;
}

.options-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.option-group {
  margin-bottom: 1rem;
}

.option-group:last-child { margin-bottom: 0; }

.option-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: var(--text-secondary);
}

.option-group input[type="text"],
.option-group input[type="number"],
.option-group input[type="password"],
.option-group input[type="url"],
.option-group select {
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  transition: var(--transition-fast);
  outline: none;
}

.option-group input:focus,
.option-group select:focus {
  border-color: var(--accent-main);
  box-shadow: 0 0 0 3px rgba(232, 56, 79, 0.08);
}

.option-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238e90a6' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}

.option-radio-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.option-radio {
  flex: 1;
  min-width: 80px;
}

.option-radio input[type="radio"] { display: none; }

.option-radio label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.option-radio input[type="radio"]:checked + label {
  border-color: var(--accent-main);
  background: #fff5f6;
  color: var(--accent-main);
  font-weight: 600;
}

.option-radio label:hover {
  border-color: var(--border-hover);
}

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

.option-range input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  border-radius: 3px;
  background: var(--bg-tertiary);
  outline: none;
}

.option-range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-main);
  cursor: pointer;
}

.option-range .range-value {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-main);
  min-width: 32px;
  text-align: right;
}

.action-btn {
  width: 100%;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  background: var(--accent-main);
  color: white;
  font-size: 0.92rem;
  font-weight: 700;
  transition: var(--transition-normal);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.action-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: 0.5s ease;
}

.action-btn:hover {
  background: #d1304a;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(232, 56, 79, 0.2);
}

.action-btn:hover::before { left: 100%; }

.action-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.action-btn:disabled::before { display: none; }

.processing-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(8px);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.processing-overlay.active { display: flex; }

.processing-box {
  text-align: center;
  padding: 2.5rem;
  border-radius: var(--radius-xl);
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-xl);
  max-width: 360px;
  width: 90%;
}

.processing-spinner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid var(--bg-tertiary);
  border-top-color: var(--accent-main);
  animation: spin 0.7s linear infinite;
  margin: 0 auto 1.2rem;
}

.processing-box h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.processing-box p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.success-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(8px);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.success-overlay.active { display: flex; }

.success-box {
  text-align: center;
  padding: 2.5rem;
  border-radius: var(--radius-xl);
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-xl);
  max-width: 400px;
  width: 90%;
  animation: scaleIn 0.25s ease;
}

.success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #e8f5e9;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 28px;
  color: var(--accent-green);
}

.success-box h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.success-box p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}

.success-info {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}

.success-stat {
  background: var(--bg-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.success-stat .label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.success-stat .value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-green);
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  background: var(--accent-green);
  color: white;
  font-size: 0.92rem;
  font-weight: 700;
  transition: var(--transition-normal);
  margin-bottom: 0.6rem;
}

.download-btn:hover {
  background: #009966;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 184, 122, 0.2);
}

.reset-btn {
  display: block;
  margin: 0 auto;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  transition: var(--transition-fast);
}

.reset-btn:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.pdf-preview {
  margin-bottom: 1.2rem;
  animation: fadeInUp 0.3s ease;
}

.pdf-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}

.pdf-preview-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-light);
}

.pdf-preview-info {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.pdf-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

.pdf-preview-page {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  transition: var(--transition-fast);
  cursor: default;
  aspect-ratio: 210 / 297;
}

.pdf-preview-page:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.pdf-preview-page canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.pdf-preview-page-num {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(26, 26, 46, 0.7);
  color: white;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  backdrop-filter: blur(4px);
}

.pdf-preview-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 2rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.pdf-preview-loading .mini-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-color);
  border-top-color: var(--accent-main);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.page-selector {
  margin-bottom: 1.2rem;
  animation: fadeInUp 0.3s ease;
}

.page-selector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
  gap: 8px;
}

.page-selector-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-right: 8px;
}

.page-selector-info {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.page-selector-actions {
  display: flex;
  gap: 6px;
}

.page-selector-btn {
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  transition: var(--transition-fast);
  border: 1px solid var(--border-color);
}

.page-selector-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.page-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

.page-selector-page {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-secondary);
  border: 2px solid var(--accent-green);
  transition: var(--transition-normal);
  cursor: pointer;
  aspect-ratio: 210 / 297;
}

.page-selector-page canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: var(--transition-normal);
}

.page-selector-page.selected {
  border-color: var(--accent-green);
}

.page-selector-page.selected .page-selector-x {
  background: rgba(0, 0, 0, 0.45);
  color: white;
}

.page-selector-page.removed {
  border-color: var(--accent-main);
  opacity: 0.55;
}

.page-selector-page.removed canvas {
  filter: grayscale(0.6);
}

.page-selector-page.removed::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 10%;
  right: 10%;
  height: 3px;
  background: var(--accent-main);
  border-radius: 2px;
  transform: translateY(-50%);
}

.page-selector-page.removed .page-selector-x {
  background: var(--accent-main);
  color: white;
}

.page-selector-x {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
  z-index: 5;
  backdrop-filter: blur(4px);
}

.page-selector-x i,
.page-selector-x svg {
  width: 14px;
  height: 14px;
}

.page-selector-x:hover {
  background: var(--accent-main);
  transform: scale(1.15);
}

.page-selector-num {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(26, 26, 46, 0.7);
  color: white;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  backdrop-filter: blur(4px);
  z-index: 5;
}

.page-selector-page:hover {
  box-shadow: var(--shadow-md);
}

.live-preview {
  margin-bottom: 1.2rem;
  animation: fadeInUp 0.3s ease;
}

.live-preview-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-light);
  margin-bottom: 0.8rem;
}

.live-preview-panels {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 1.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

.live-preview-panel {
  text-align: center;
}

.live-preview-panel canvas {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  background: white;
  max-width: 240px;
  max-height: 340px;
}

.live-preview-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.live-preview-label-after {
  color: var(--accent-green);
}

.live-preview-arrow {
  color: var(--text-light);
  flex-shrink: 0;
}

.live-preview-arrow i,
.live-preview-arrow svg {
  width: 20px;
  height: 20px;
}

.footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.78rem;
}

.footer a {
  color: var(--accent-main);
  font-weight: 500;
}

.footer-privacy {
  margin-top: 0.3rem;
  font-size: 0.72rem;
  color: var(--text-light);
}

.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  background: var(--bg-secondary);
}

.error-container {
  text-align: center;
  max-width: 560px;
  animation: scaleIn 0.3s ease;
}

.error-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(232, 56, 79, 0.1);
  border-radius: 50%;
  color: var(--accent-main);
}

.error-icon i,
.error-icon svg {
  width: 40px;
  height: 40px;
}

.error-page h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.8rem;
}

.error-message {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.error-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  height: 44px;
  padding: 0 1.5rem;
  background: var(--accent-main);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.error-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.trust-bar {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  max-width: 960px;
  margin: 0 auto 2.5rem;
  padding: 0 2rem;
  animation: fadeInUp 0.5s ease 0.2s both;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  white-space: nowrap;
}

.trust-item:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.trust-item i,
.trust-item svg {
  color: var(--accent-green);
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.trust-item strong {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.trust-item span {
  font-size: 0.68rem;
  color: var(--text-muted);
  line-height: 1.2;
}

.privacy-section {
  max-width: 720px;
  margin: 0 auto 3rem;
  padding: 0 2rem;
  animation: fadeInUp 0.5s ease 0.3s both;
}

.privacy-card {
  text-align: center;
  padding: 2.5rem 2rem;
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.privacy-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.privacy-icon i,
.privacy-icon svg {
  color: var(--accent-green);
}

.privacy-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
}

.privacy-card p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

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


@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 0.95rem; }
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
  .navbar { padding: 0 1rem; }
  .tools-section { padding: 1.5rem 1rem 4rem; }
  .tool-page { padding: 1.5rem 1rem 4rem; }
  .upload-zone { padding: 2rem 1.5rem; }
  .trust-bar { flex-wrap: wrap; justify-content: center; }
  .live-preview-panels { flex-direction: column; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.7rem; }
  .tools-grid { grid-template-columns: 1fr; }
  .navbar-links { display: none; }
  .tool-card p { display: none; }
  .trust-bar { flex-direction: column; align-items: stretch; padding: 0 1rem; }
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }
