:root {
  --bg: #0b1220;
  --bg-soft: #121b2e;
  --card: #161f33;
  --border: #24304a;
  --text: #e8ecf5;
  --muted: #93a1c0;
  --accent: #4f8cff;
  --accent-dark: #3a6fd8;
  --safe: #2fbf71;
  --warn: #f2b134;
  --danger: #f0554b;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", -apple-system, sans-serif;
  background: linear-gradient(180deg, var(--bg) 0%, #0e1626 100%);
  color: var(--text);
  min-height: 100vh;
}

.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}

.header {
  text-align: center;
  margin-bottom: 32px;
}

.header h1 {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.header p {
  color: var(--muted);
  margin: 0;
  font-size: 0.95rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.dropzone {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  overflow: hidden;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--accent);
  background: #16223b;
}

.dropzone-text {
  text-align: center;
  color: var(--muted);
}

.dropzone-text .icon {
  font-size: 2.2rem;
  display: block;
  margin-bottom: 8px;
}

.dropzone-text p {
  margin: 0 0 4px;
  color: var(--text);
  font-weight: 500;
}

.preview {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  background: #000;
}

.btn {
  border: none;
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s ease, opacity 0.15s ease;
}

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

.btn:not(:disabled):active {
  transform: scale(0.98);
}

.btn.primary {
  background: var(--accent);
  color: white;
}

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

.btn.secondary {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}

.btn.secondary:not(:disabled):hover {
  background: rgba(79, 140, 255, 0.1);
}

.result {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.result-head h2 {
  font-size: 1.05rem;
  margin: 0;
}

.badge {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--safe);
  color: #06210f;
}

.badge.safe { background: var(--safe); color: #06210f; }
.badge.warn { background: var(--warn); color: #2b1e00; }
.badge.danger { background: var(--danger); color: #2b0503; }

#resultText {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  margin: 0;
  color: var(--text);
  line-height: 1.6;
  font-size: 0.95rem;
}

.status {
  min-height: 1.2em;
  color: var(--danger);
  font-size: 0.9rem;
  margin: 0;
}

.footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 24px;
}
