@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,400..700&family=Playfair+Display:wght@600..800&display=swap');

:root {
  --accent: #d9774b;
  --accent-dim: #b85c38;
  --accent-soft: rgba(217, 119, 75, 0.12);

  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;

  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.08);
}

[data-theme="dark"] {
  --bg: #121212;
  --bg-card: #1e1e1e;
  --bg-raised: #2a2a2a;
  --bg-hover: #333333;
  --border: #3a3a3a;
  --border-focus: #d9774b;
  --text: #e6e6e4;
  --text-muted: #a0a09e;
  --text-dim: #6a6a68;
  --badge-bg: rgba(217,119,75,0.12);
  --badge-text: #d9774b;
  --success: #4dab6b;
  --success-dim: rgba(77,171,107,0.15);
}

[data-theme="light"] {
  --bg: #fafaf8;
  --bg-card: #ffffff;
  --bg-raised: #f3f2ef;
  --bg-hover: #eae8e4;
  --border: #e2e0db;
  --border-focus: #d9774b;
  --text: #1c1c1a;
  --text-muted: #5f5e5a;
  --text-dim: #989793;
  --badge-bg: rgba(217,119,75,0.08);
  --badge-text: #b85c38;
  --success: #2f855a;
  --success-dim: rgba(47,133,90,0.1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, .logo-text {
  font-family: 'Playfair Display', serif;
  letter-spacing: -0.02em;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--accent-dim); }

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

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 1.2rem;
}
.logo-icon {
  width: 28px;
  height: 28px;
  background: var(--accent);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5'/%3E%3C/svg%3E") center/contain no-repeat;
  background-size: contain;
}
.logo-text strong { color: var(--accent); font-weight: 700; }

.header-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.header-nav a {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: color var(--transition);
}
.header-nav a:hover { color: var(--text); }

.theme-toggle {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 40px;
  width: 44px;
  height: 26px;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: background var(--transition), border-color var(--transition);
}
.theme-toggle:hover { border-color: var(--accent); }

[data-theme="dark"] .theme-icon-sun { display: none; }
[data-theme="light"] .theme-icon-moon { display: none; }

.hero {
  position: relative;
  padding: 80px 24px 60px;
  overflow: hidden;
  background: var(--bg);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 40%, var(--accent-soft) 0%, transparent 40%);
  pointer-events: none;
}

.hero-inner {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
  animation: fadeUp 0.5s ease both;
}

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

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--badge-bg);
  color: var(--badge-text);
  border: 1px solid var(--accent);
  border-radius: 40px;
  padding: 6px 16px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 36px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-soft); }
  50% { box-shadow: 0 0 0 4px transparent; }
}

.hero-title {
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  color: var(--text);
}
.hero-title em {
  font-style: normal;
  color: var(--accent);
}

.hero-sub {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 520px;
  margin: 0 auto 48px;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent);
}
.stat-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
}

.tool-section {
  padding: 0 0 80px;
}

.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  padding: 56px 32px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
  position: relative;
  margin-bottom: 24px;
}
.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: scale(1.003);
}
.upload-zone.drag-over { border-style: solid; }

.upload-icon {
  display: inline-block;
  width: 48px;
  height: 48px;
  background: var(--accent);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 4l-1.4 1.4L16.2 11H4v2h12.2l-5.6 5.6L12 20l8-8-8-8z'/%3E%3C/svg%3E") center/contain no-repeat;
  margin-bottom: 16px;
}

.upload-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.upload-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-dim); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  padding: 8px 14px;
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-muted); }

.btn-success {
  background: var(--success);
  color: #fff;
}
.btn-success:hover { opacity: 0.9; transform: translateY(-1px); }

.btn-icon { font-size: 1rem; }

.btn-download-photo {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  z-index: 2;
}
.btn-download-photo:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.options-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
  animation: fadeUp 0.35s ease both;
}

.panel-title {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
  letter-spacing: 0.05em;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

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

.option-card-inner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg-raised);
}
.option-card-inner:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.option-card input:checked + .option-card-inner {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 2px var(--accent);
}

.option-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.option-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.option-text strong {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
}
.option-text span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.option-check {
  font-size: 0.9rem;
  color: var(--accent);
  opacity: 0;
  transition: opacity var(--transition);
  flex-shrink: 0;
}
.option-card input:checked + .option-card-inner .option-check { opacity: 1; }

.custom-fields {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.custom-fields-title {
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
  font-size: 0.85rem;
}
.custom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field-group label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.field-group input {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: var(--text);
  transition: border-color var(--transition);
  outline: none;
}
.field-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.photo-queue {
  margin-bottom: 24px;
}
.queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.queue-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  border-radius: 40px;
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  margin-left: 6px;
}

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

.photo-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  position: relative;
  cursor: pointer;
}
.photo-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.photo-thumb {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  background: var(--bg-raised);
}

.photo-info {
  padding: 10px 12px;
}
.photo-name {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
.photo-size {
  font-size: 0.68rem;
  color: var(--text-dim);
}

.photo-status {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 0.8rem;
}
.photo-status.done {
  background: var(--success-dim);
  border-color: var(--success);
}
.photo-status.processing {
  background: var(--accent-soft);
  border-color: var(--accent);
  animation: spin 1s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.photo-remove {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
}
.photo-card:hover .photo-remove { opacity: 1; }

.metadata-compare {
  display: none;
  padding: 0 12px 12px;
  font-size: 0.7rem;
  border-top: 1px solid var(--border);
  margin-top: 8px;
  animation: fadeUp 0.25s ease;
}

.photo-card.expanded .metadata-compare {
  display: block;
}

.metadata-compare table {
  width: 100%;
  border-collapse: collapse;
}

.metadata-compare td {
  padding: 4px 6px;
  color: var(--text-muted);
}

.metadata-compare td:first-child {
  color: var(--text-dim);
  font-weight: 600;
  width: 40%;
}

.metadata-compare .meta-before { color: var(--text-dim); }
.metadata-compare .meta-after { color: var(--success); }

.action-bar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: sticky;
  bottom: 20px;
  box-shadow: var(--shadow-lg);
  animation: fadeUp 0.35s ease both;
}
.action-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  flex-wrap: wrap;
  gap: 16px;
}
.action-info {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.action-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.progress-bar-wrap {
  height: 4px;
  background: var(--bg-raised);
  position: relative;
}
.progress-bar {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.3s ease;
}
.progress-label {
  position: absolute;
  right: 12px;
  top: -22px;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.how-section {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}
.section-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 40px;
}
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
}
.step { display: flex; flex-direction: column; gap: 12px; }
.step-num {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--border);
  line-height: 1;
}
.step h3 {
  font-size: 1rem;
  font-weight: 700;
}
.step p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  font-size: 0.85rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 32px;
  margin-bottom: 32px;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-brand p {
  font-size: 0.75rem;
  color: var(--text-dim);
}
.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-links a {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.footer-links a:hover { color: var(--accent); }
.footer-copy {
  font-size: 0.72rem;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

@media (max-width: 600px) {
  .hero { padding: 60px 16px 40px; }
  .header-nav a { display: none; }
  .action-bar-inner { flex-direction: column; align-items: flex-start; }
  .hero-stats { gap: 20px; }
  .stat-divider { display: none; }
  .options-grid { grid-template-columns: 1fr; }
  .upload-zone { padding: 40px 20px; }
}

.icon-arrow {
  display: inline-block;
  width: 1em;
  height: 1em;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 4l-1.4 1.4L16.2 11H4v2h12.2l-5.6 5.6L12 20l8-8-8-8z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.icon-upload {
  display: inline-block;
  width: 1em;
  height: 1em;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.icon-check {
  display: inline-block;
  width: 1em;
  height: 1em;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.icon-download {
  display: inline-block;
  width: 1em;
  height: 1em;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z'/%3E%3C/svg%3E") center/contain no-repeat;
}