﻿:root {
  color-scheme: light;
  --ink: #0f1115;
  --paper: #f7f5f0;
  --accent: #ff4d6d;
  --accent-2: #1d8cf8;
  --soft: #f0f4ff;
  --shadow: 0 26px 60px rgba(15, 17, 21, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "IBM Plex Sans KR", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 10% 20%, #fff4f0 0%, transparent 45%),
    radial-gradient(circle at 90% 10%, #e6f0ff 0%, transparent 40%),
    #f8f7f4;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 72px;
  position: relative;
}

.page::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(255, 77, 109, 0.12), transparent 50%),
    radial-gradient(circle at 20% 80%, rgba(29, 140, 248, 0.1), transparent 45%);
  z-index: -1;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  align-items: center;
  animation: fadeUp 0.8s ease both;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.badge {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(15, 17, 21, 0.08);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.hero h1 {
  font-family: "Black Han Sans", sans-serif;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.2;
  margin: 0 0 16px;
}

.lead {
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 20px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.btn {
  border: none;
  border-radius: 14px;
  padding: 12px 18px;
  font-weight: 600;
  background: #ffffff;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 8px 20px rgba(15, 17, 21, 0.12);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  background: #111111;
  color: #ffffff;
}

.btn.ghost {
  background: transparent;
  border: 1px solid rgba(15, 17, 21, 0.18);
  box-shadow: none;
}

.btn.tiny {
  padding: 8px 12px;
  font-size: 12px;
  box-shadow: none;
}

.trust-row {
  display: flex;
  gap: 8px;
  font-size: 13px;
  color: rgba(15, 17, 21, 0.64);
}

.dot {
  color: rgba(15, 17, 21, 0.4);
}

.hero-preview {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.preview-shell {
  background: #0f1115;
  border-radius: 24px;
  padding: 16px;
  color: #ffffff;
  box-shadow: var(--shadow);
}

.preview-head {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 10px;
  opacity: 0.8;
}

.preview-shell video {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  object-fit: cover;
  background: #2c313a;
}

.upload-preview {
  display: none;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  object-fit: cover;
  background: #2c313a;
}

.preview-shell.has-upload video {
  display: none;
}

.preview-shell.has-upload .upload-preview {
  display: block;
}

.scan-progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  margin-top: 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.scan-progress.active {
  opacity: 1;
}

.scan-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.scan-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 0;
  background: linear-gradient(90deg, #ff4d6d, #ffe066);
  transition: width 3s linear;
}

.scan-progress.active .scan-bar::after {
  width: 100%;
}

.preview-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}

.toggle {
  display: flex;
  gap: 6px;
  font-size: 12px;
  align-items: center;
}

.toggle input {
  accent-color: #ff4d6d;
}

.privacy-note {
  font-size: 12px;
  color: rgba(15, 17, 21, 0.6);
  margin: 0;
}

.section-head {
  margin: 48px 0 20px;
}

.section-head h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.section-head p {
  margin: 0;
  color: rgba(15, 17, 21, 0.6);
}

.mode-tabs {
  display: flex;
  gap: 8px;
}

.tab {
  border: 1px solid rgba(15, 17, 21, 0.15);
  background: #ffffff;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
}

.tab.active {
  background: #111111;
  color: #ffffff;
}

.mode-panels {
  margin-top: 18px;
}

.mode-panel {
  display: none;
  padding: 18px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 18px 40px rgba(15, 17, 21, 0.08);
}

.mode-panel.active {
  display: block;
}

.tips {
  margin: 0 0 12px;
  padding-left: 18px;
}

.camera-status {
  display: flex;
  gap: 14px;
  font-size: 13px;
  color: rgba(15, 17, 21, 0.6);
}

.upload-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
}

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

.upload-row .btn {
  box-shadow: none;
}

.upload-note {
  margin: 0;
  font-size: 12px;
  color: rgba(15, 17, 21, 0.6);
  flex-basis: 100%;
}

.slider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px 20px;
  font-size: 13px;
}

.slider-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.slider-grid input[type="range"] {
  width: 100%;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.theme-option {
  border: 1px solid rgba(15, 17, 21, 0.12);
  background: #ffffff;
  border-radius: 18px;
  padding: 16px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.theme-option:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(15, 17, 21, 0.12);
}

.theme-option.active {
  border-color: #111111;
  box-shadow: 0 12px 26px rgba(15, 17, 21, 0.18);
}

.theme-title {
  font-weight: 700;
  display: block;
  margin-bottom: 6px;
}

.theme-desc {
  font-size: 12px;
  color: rgba(15, 17, 21, 0.6);
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.result-card {
  position: relative;
  border-radius: 24px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  aspect-ratio: 9 / 16;
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: floatIn 0.8s ease both;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.chip {
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.stamp {
  opacity: 0.7;
}

.card-title {
  margin: 0;
  font-size: 22px;
  line-height: 1.3;
}

.card-summary {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
}

.card-tags,
.keyword-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.card-bottom {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.card-caution {
  font-size: 12px;
  opacity: 0.75;
  margin: 0;
}

.footer {
  margin-top: 56px;
  font-size: 12px;
  color: rgba(15, 17, 21, 0.6);
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #111111;
  color: #ffffff;
  padding: 12px 18px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  font-size: 13px;
}

.toast.show {
  opacity: 1;
}

body[data-theme="tabloid"] .result-card {
  background: #f4efe6;
  color: #111111;
  font-family: "Gowun Batang", serif;
}

body[data-theme="tabloid"] .result-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.05) 0,
    rgba(0, 0, 0, 0.05) 2px,
    transparent 2px,
    transparent 8px
  );
  opacity: 0.6;
  pointer-events: none;
}

body[data-theme="tabloid"] .card-title {
  font-family: "Black Han Sans", sans-serif;
  font-size: 24px;
}

body[data-theme="tabloid"] .chip,
body[data-theme="tabloid"] .tag {
  background: #111111;
  color: #ffffff;
}

body[data-theme="tabloid"] .card-bottom {
  color: rgba(17, 17, 17, 0.7);
}

body[data-theme="y2k"] .result-card {
  background: linear-gradient(135deg, #ffe6f1 0%, #cdebff 100%);
  color: #0f1115;
  font-family: "IBM Plex Sans KR", sans-serif;
  border: 2px solid #0f1115;
  box-shadow: 0 18px 40px rgba(255, 77, 109, 0.18);
}

body[data-theme="y2k"] .result-card::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  top: -60px;
  right: -60px;
}

body[data-theme="y2k"] .card-title {
  font-family: "Bagel Fat One", cursive;
  font-size: 26px;
}

body[data-theme="y2k"] .chip,
body[data-theme="y2k"] .tag {
  background: #ffffff;
  border: 1px solid #0f1115;
}

body[data-theme="campus"] .result-card {
  background: #f3f8ff;
  color: #0f1115;
  font-family: "IBM Plex Sans KR", sans-serif;
  border: 1px solid rgba(15, 17, 21, 0.12);
}

body[data-theme="campus"] .result-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(17, 17, 17, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 17, 17, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.6;
  pointer-events: none;
}

body[data-theme="campus"] .card-title {
  font-family: "Yeon Sung", cursive;
  font-size: 24px;
}

body[data-theme="campus"] .chip,
body[data-theme="campus"] .tag {
  background: #fff36b;
  color: #0f1115;
}

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

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (min-width: 1024px) {
  .hero {
    grid-template-columns: 1.1fr 0.9fr;
  }

  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .page {
    padding: 24px 18px 60px;
  }

  .hero {
    gap: 24px;
  }
}

@media (max-width: 680px) {
  .cta-row,
  .trust-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .preview-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .mode-tabs {
    flex-direction: column;
  }

  .result-actions {
    flex-direction: column;
  }

  .cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .btn {
    width: 100%;
  }

  .theme-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
