:root {
  --primary: #3182f6;
  --primary-dark: #1b64da;
  --bg: #f9fafb;
  --surface: #ffffff;
  --text: #191f28;
  --text-muted: #6b7684;
  --border: #e5e8eb;
  --success: #00c471;
  --warning: #ff9f0a;
  --vip: #7c3aed;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  --radius: 16px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* Header */
.header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), #6cb4ff);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
}

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

.nav a {
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav a:hover {
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-greeting {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  background: var(--bg);
  color: var(--text);
}

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

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

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

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
  border-radius: 12px;
}

.btn-block {
  width: 100%;
}

/* Hero */
.hero {
  padding: 80px 0 60px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  background: #e8f3ff;
  color: var(--primary);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 36px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Features */
.features {
  padding: 60px 0;
}

.section-title {
  text-align: center;
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 48px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
}

.feature-icon {
  width: 56px;
  height: 56px;
  background: #e8f3ff;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 16px;
}

.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Pricing */
.pricing {
  padding: 60px 0 80px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}

.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.pricing-card.popular {
  border: 2px solid var(--primary);
  box-shadow: var(--shadow);
}

.pricing-card.vvip {
  border: 2px solid var(--vip);
}

.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.vvip-badge {
  background: var(--vip);
}

.plan-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.plan-price {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.plan-price span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
}

.plan-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.plan-features {
  list-style: none;
  margin-bottom: 28px;
}

.plan-features li {
  padding: 8px 0;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.plan-features li::before {
  content: "✓";
  color: var(--success);
  font-weight: 700;
}

.product-options {
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.product-options-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

.product-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.product-option:last-child {
  border-bottom: none;
}

.product-option-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.product-option-label {
  font-size: 0.9rem;
  font-weight: 600;
}

.product-option-price {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.product-option .btn {
  padding: 8px 14px;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.pricing-note {
  text-align: center;
  color: var(--text-muted);
  margin: -32px 0 48px;
  font-size: 0.95rem;
}

.pricing-subsection {
  margin-bottom: 16px;
}

.pricing-subsection h3 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.pricing-subsection.onetime h3 {
  color: var(--text);
}

/* Footer */
.footer {
  background: #1a1f2e;
  color: #adb5bd;
  padding: 48px 0 32px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer h4 {
  color: white;
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.footer ul {
  list-style: none;
}

.footer li {
  margin-bottom: 10px;
  font-size: 0.85rem;
}

.footer a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid #2d3548;
  padding-top: 24px;
  font-size: 0.8rem;
  line-height: 1.8;
}

.business-info {
  margin-top: 12px;
  color: #868e96;
}

/* Auth pages */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
}

.auth-card h1 {
  font-size: 1.5rem;
  margin-bottom: 8px;
  text-align: center;
}

.auth-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 32px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
}

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

.auth-footer a {
  color: var(--primary);
  font-weight: 600;
}

/* Checkout */
.checkout-page {
  padding: 40px 0 80px;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 32px;
  align-items: start;
}

.checkout-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.checkout-form h2 {
  font-size: 1.25rem;
  margin-bottom: 24px;
}

.order-summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  position: sticky;
  top: 88px;
}

.order-summary h2 {
  font-size: 1.25rem;
  margin-bottom: 24px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  font-size: 0.95rem;
}

.summary-row.total {
  border-top: 2px solid var(--text);
  margin-top: 12px;
  padding-top: 16px;
  font-weight: 700;
  font-size: 1.1rem;
}

/* Legal pages */
.legal-page {
  padding: 60px 0 80px;
}

.legal-page h1 {
  font-size: 2rem;
  margin-bottom: 32px;
}

.legal-page h2 {
  font-size: 1.25rem;
  margin: 32px 0 12px;
}

.legal-page p,
.legal-page li {
  color: var(--text-muted);
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.legal-page ul {
  padding-left: 20px;
  margin-bottom: 16px;
}

/* Success page */
.success-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: #e6faf3;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  margin: 0 auto 24px;
}

.success-page h1 {
  font-size: 1.75rem;
  margin-bottom: 12px;
}

.success-page p {
  color: var(--text-muted);
  margin-bottom: 32px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1a1f2e;
  color: white;
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 0.9rem;
  z-index: 1000;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 900px) {
  .feature-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

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

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

  .nav {
    display: none;
  }

  .hero h1 {
    font-size: 2rem;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* Card Register */
.card-register-page {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px 80px;
  background: #f2f4f6;
}

.card-register-modal {
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.card-register-header {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  padding: 16px 12px;
  border-bottom: 1px solid var(--border);
}

.card-register-header h1 {
  font-size: 1.05rem;
  font-weight: 700;
  text-align: center;
}

.card-register-back,
.card-register-close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 1.25rem;
  cursor: pointer;
  border-radius: 10px;
}

.card-register-back:hover,
.card-register-close:hover {
  background: var(--bg);
}

.card-register-body {
  padding: 24px 20px 28px;
}

.plan-summary-box {
  background: #f2f4f6;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 28px;
}

.plan-summary-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.plan-tag {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.plan-tag-dot {
  color: #d1d6db;
}

.plan-summary-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.plan-summary-price {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.plan-summary-price span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
}

.plan-summary-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.card-form-group {
  margin-bottom: 22px;
}

.card-form-group label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.card-char-count {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

.card-form-group input[type="text"] {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.card-form-group input:focus {
  outline: none;
  border-color: var(--primary);
}

.card-number-wrap {
  position: relative;
}

.card-brands {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.card-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 22px;
  padding: 0 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-muted);
  background: white;
}

.card-brand.visa { color: #1a1f71; }
.card-brand.bc { color: #e83e2e; }
.card-brand.jcb { color: #0b6e4f; }
.card-brand.amex { color: #006fcf; }

.card-info-notice {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 20px 0 24px;
  padding: 14px;
  background: #e8f3ff;
  border-radius: 12px;
  font-size: 0.82rem;
  color: #1b64da;
  line-height: 1.5;
}

.card-info-notice .icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.card-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.card-checkbox-group {
  margin-bottom: 16px;
}

.card-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.card-checkbox-label input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--primary);
}

.card-checkbox-text strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.card-checkbox-text p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.card-checkbox-text a {
  color: var(--primary);
  text-decoration: underline;
}

.card-register-submit {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.2s;
}

.card-register-submit:disabled {
  background: #e5e8eb;
  color: #adb5bd;
  cursor: not-allowed;
}

.card-register-submit:not(:disabled) {
  background: var(--primary);
  color: white;
}

.card-register-submit:not(:disabled):hover {
  background: var(--primary-dark);
}
