/* =====================
   Design System
===================== */
:root {
  --primary: #4f46e5;
  --primary-light: #eef2ff;
  --success: #16a34a;
  --danger: #dc2626;

  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;

  --shadow-lg: 0 20px 50px rgba(0,0,0,0.08);
  --shadow-md: 0 10px 30px rgba(0,0,0,0.06);
}

/* =====================
   Base
===================== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Apple SD Gothic Neo", sans-serif;
  background: var(--bg);
  color: var(--text);
}

h1, h2, h3 {
  margin: 0 0 12px;
}

p {
  margin: 0 0 10px;
  line-height: 1.6;
}

/* =====================
   Layout
===================== */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px;
}

.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 28px;
}

/* =====================
   Section
===================== */
.section {
  margin-bottom: 22px;
}

.section h3 {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 6px;
}

/* =====================
   Output / Box
===================== */
.output {
  background: #f9fafb;
  border-radius: var(--radius-md);
  padding: 14px;
  font-size: 0.95rem;
  min-height: 44px;
  white-space: pre-line;
}

/* =====================
   Buttons
===================== */
/* 공통 버튼 */
.btn {
  border: none;
  border-radius: 14px;
  padding: 14px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Primary */
.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: #4338ca;
}

/* Danger */
.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background: #b91c1c;
}


/* =====================
   Inputs
===================== */
textarea {
  width: 100%;
  min-height: 120px;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid #d1d5db;
  font-size: 15px;
  resize: vertical;
}

/* =====================
   Score Grid
===================== */
.score-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.score-item {
  background: #f8fafc;
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: center;
}

.score-item span {
  font-size: 0.75rem;
  color: var(--muted);
}

.score-item strong {
  display: block;
  margin-top: 4px;
  font-size: 1.3rem;
  font-weight: 700;
}

.footer {
  text-align: center;
  padding: 28px 16px;
  font-size: 13px;
  color: #6b7280;
  border-top: 1px solid #e5e7eb;
  line-height: 1.6;
}

.footer-links {
  margin-bottom: 12px;
}

.footer a {
  color: #374151;
  text-decoration: none;
  font-weight: 500;
}

.footer a:hover {
  text-decoration: underline;
}

.divider {
  margin: 0 10px;
  color: #9ca3af;
}

.footer-info {
  margin-bottom: 10px;
  color: #4b5563;
}

.footer-copy {
  font-size: 12px;
  color: #9ca3af;
}

/* =====================
   Responsive
===================== */
@media (max-width: 480px) {
  .footer {
    font-size: 12px;
  }

  .footer-links {
    display: flex;
    justify-content: center;
    gap: 12px;
  }

  .divider {
    display: none;
  }
}
