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

:root {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --primary-light: #dbeafe;
  --text: #1e293b;
  --text-secondary: #64748b;
  --bg: #ffffff;
  --bg-secondary: #f8fafc;
  --border: #e2e8f0;
  --success: #10b981;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius); font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all 0.2s; border: none; text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-white { background: #fff; color: var(--primary); }
.btn-lg { padding: 16px 36px; font-size: 17px; }
.btn-block { display: flex; width: 100%; }

.badge {
  display: inline-block; padding: 4px 12px; border-radius: 100px;
  font-size: 12px; font-weight: 600; background: var(--success); color: #fff;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 100;
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.site-logo { font-size: 22px; font-weight: 800; color: var(--primary); }
.site-logo:hover { text-decoration: none; }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { color: var(--text-secondary); font-size: 14px; font-weight: 500; }
.nav-links a:hover { color: var(--primary); text-decoration: none; }
.nav-links .btn { padding: 8px 20px; font-size: 14px; }

.mobile-menu-btn { display: none; background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text); }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff; padding: 80px 0 100px; text-align: center;
}
.hero h1 { font-size: 40px; font-weight: 800; margin-bottom: 12px; line-height: 1.2; }
.hero p { font-size: 17px; opacity: 0.9; margin-bottom: 32px; }
.hero .btn-group { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Sections */
.section { padding: 80px 0; }
.section-title { text-align: center; font-size: 28px; font-weight: 700; margin-bottom: 12px; }
.section-sub { text-align: center; color: var(--text-secondary); margin-bottom: 48px; font-size: 16px; }
.section-bg { background: var(--bg-secondary); }

/* Feature Cards */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 24px; text-align: center; transition: all 0.2s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
.feature-icon { font-size: 36px; margin-bottom: 16px; }
.feature-card h3 { font-size: 17px; margin-bottom: 8px; }
.feature-card p { color: var(--text-secondary); font-size: 14px; }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; max-width: 700px; margin: 0 auto; }
.pricing-card {
  background: #fff; border: 2px solid var(--border); border-radius: 12px;
  padding: 36px 28px; text-align: center; transition: all 0.2s;
  position: relative;
}
.pricing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.pricing-card.popular { border-color: var(--primary); }
.pricing-card .badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); }
.pricing-name { font-size: 18px; font-weight: 600; margin-bottom: 12px; }
.pricing-price { font-size: 36px; font-weight: 800; color: var(--primary); margin-bottom: 4px; }
.pricing-price .won { font-size: 20px; }
.pricing-price .original { font-size: 16px; color: var(--text-secondary); text-decoration: line-through; margin-left: 8px; }
.pricing-meta { font-size: 13px; color: var(--text-secondary); margin-bottom: 20px; }
.pricing-features { list-style: none; text-align: left; margin-bottom: 24px; }
.pricing-features li { padding: 6px 0; font-size: 14px; color: var(--text-secondary); }
.pricing-features li::before { content: '✓ '; color: var(--success); font-weight: 700; }

/* Product page */
.product-hero { padding: 60px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.product-hero-img {
  background: linear-gradient(135deg, #667eea, #764ba2); border-radius: 16px; min-height: 320px;
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 48px;
}
.product-hero-info h1 { font-size: 32px; margin-bottom: 12px; }
.product-hero-info .version { color: var(--text-secondary); font-size: 14px; margin-bottom: 16px; }
.product-hero-info .desc { color: var(--text-secondary); font-size: 16px; margin-bottom: 24px; line-height: 1.7; }
.product-hero-info .meta { font-size: 14px; color: var(--text-secondary); }
.product-hero-info .meta strong { color: var(--text); }

/* Buy page */
.buy-section { max-width: 700px; margin: 0 auto; padding: 60px 0; }
.buy-step { display: flex; gap: 16px; align-items: center; margin-bottom: 32px; }
.buy-step-num {
  width: 32px; height: 32px; border-radius: 50%; background: var(--primary);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.buy-step-text { font-size: 18px; font-weight: 600; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.form-control {
  width: 100%; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 15px; transition: border-color 0.2s; font-family: inherit;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.plan-select { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.plan-option { display: none; }
.plan-option-label {
  display: block; border: 2px solid var(--border); border-radius: 12px;
  padding: 24px; cursor: pointer; transition: all 0.2s; text-align: center;
}
.plan-option:checked + .plan-option-label { border-color: var(--primary); background: var(--primary-light); }
.plan-option-label h3 { font-size: 16px; margin-bottom: 8px; }
.plan-option-label .price { font-size: 24px; font-weight: 800; color: var(--primary); }
.plan-option-label .meta { font-size: 13px; color: var(--text-secondary); }

/* Terms / Policy pages */
.content-page { max-width: 800px; margin: 0 auto; padding: 60px 0; }
.content-page h1 { font-size: 28px; margin-bottom: 8px; }
.content-page .updated { color: var(--text-secondary); font-size: 14px; margin-bottom: 32px; }
.content-page h2 { font-size: 20px; margin: 28px 0 12px; }
.content-page p { margin-bottom: 12px; color: var(--text-secondary); }
.content-page ul { padding-left: 24px; margin-bottom: 16px; }
.content-page li { color: var(--text-secondary); margin-bottom: 6px; }

/* FAQ */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); padding: 20px 0; }
.faq-q { font-size: 17px; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.faq-q:hover { color: var(--primary); }
.faq-a { padding-top: 12px; color: var(--text-secondary); display: none; }
.faq-item.open .faq-a { display: block; }

/* Contact */
.contact-section { max-width: 800px; margin: 0 auto; padding: 60px 0; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.contact-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; text-align: center; }
.contact-card h3 { margin-bottom: 8px; }
.contact-card p { color: var(--text-secondary); font-size: 14px; }

/* Footer */
.site-footer {
  background: var(--text); color: rgba(255,255,255,0.7);
  padding: 40px 0; font-size: 13px;
}
.site-footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
.site-footer a { color: rgba(255,255,255,0.7); }
.site-footer a:hover { color: #fff; }
.footer-info { line-height: 1.8; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }

/* Success page */
.success-section { text-align: center; padding: 80px 0; }
.success-icon { font-size: 64px; margin-bottom: 20px; }
.success-section h1 { font-size: 28px; margin-bottom: 8px; }
.success-section p { color: var(--text-secondary); margin-bottom: 24px; }
.license-box {
  background: var(--bg-secondary); border: 2px dashed var(--border); border-radius: 12px;
  padding: 24px; display: inline-block; text-align: left;
  margin-bottom: 24px; min-width: 360px;
}
.license-box .key { font-size: 20px; font-weight: 700; font-family: 'Courier New', monospace; color: var(--primary); }
.license-box .meta { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }

/* Admin */
.admin-body { background: var(--bg-secondary); }
.admin-header {
  background: var(--text); color: #fff; padding: 0 24px; height: 56px;
  display: flex; align-items: center; justify-content: space-between; font-size: 14px;
}
.admin-header a { color: #fff; }
.admin-title { font-weight: 700; font-size: 16px; }
.admin-sidebar {
  width: 220px; background: #1e293b; color: #fff; padding: 20px 0;
  position: fixed; top: 56px; bottom: 0; left: 0; font-size: 14px;
}
.admin-sidebar a {
  display: block; padding: 12px 24px; color: rgba(255,255,255,0.7); transition: all 0.2s;
}
.admin-sidebar a:hover, .admin-sidebar a.active {
  background: rgba(255,255,255,0.08); color: #fff; text-decoration: none;
}
.admin-main { margin-left: 220px; padding: 32px; min-height: calc(100vh - 56px); }
.admin-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 28px; margin-bottom: 24px;
}
.admin-card h2 { font-size: 20px; margin-bottom: 20px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { text-align: left; padding: 12px; border-bottom: 2px solid var(--border); color: var(--text-secondary); font-weight: 600; }
.admin-table td { padding: 12px; border-bottom: 1px solid var(--border); }

/* Toast */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  padding: 14px 24px; border-radius: var(--radius); color: #fff; font-size: 14px;
  box-shadow: var(--shadow-lg); animation: slideIn 0.3s ease;
  display: none;
}
.toast.success { background: var(--success); }
.toast.error { background: #ef4444; }
@keyframes slideIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Responsive */
@media (max-width: 768px) {
  .nav-links { display: none; position: fixed; top: 64px; left: 0; right: 0; background: #fff; flex-direction: column; padding: 20px; border-bottom: 1px solid var(--border); gap: 16px; z-index: 99; }
  .nav-links.open { display: flex; }
  .mobile-menu-btn { display: block; }
  .hero { padding: 50px 0 60px; }
  .hero h1 { font-size: 26px; }
  .features-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; }
  .product-hero { grid-template-columns: 1fr; gap: 32px; }
  .product-hero-img { min-height: 200px; }
  .form-row { grid-template-columns: 1fr; }
  .plan-select { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .site-footer .container { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
  .admin-sidebar { display: none; }
  .admin-main { margin-left: 0; }
  .license-box { min-width: auto; width: 100%; }
}
