:root {
  --bg: #050505;
  --surface: #121214;
  --primary: #6366f1;
  --primary-strong: #4f46e5;
  --text: #f8fafc;
  --muted: #94a3b8;
  --border: #27272a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
  background: var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
  line-height: 1.6;
}

img { max-width: 100%; display: block; }
.container { width: min(1110px, calc(100% - 2rem)); margin: 0 auto; }

/* 헤더 */
.site-header {
  background: rgba(5, 5, 5, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
}
.header-inner { display: flex; gap: 1rem; align-items: center; justify-content: space-between; padding: 1rem 0; }
.brand { font-size: 1.5rem; font-weight: 800; background: linear-gradient(to right, #818cf8, #c084fc); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* ★ 문제의 흰색 버튼 기본적으로 완전 숨김! ★ */
.menu-toggle {
  display: none; 
  background: transparent;
  border: none;
  color: white;
  font-size: 1.8rem;
  cursor: pointer;
  padding: 0;
}

.main-nav { display: flex; gap: 2rem; }
.main-nav a { color: var(--muted); text-decoration: none; font-weight: 500; transition: color 0.2s ease; }
.main-nav a:hover { color: var(--text); }

/* 버튼 */
.cart-button, .primary-btn {
  border: none; background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
  color: white; padding: 0.8rem 1.8rem; border-radius: 50px; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block;
}

/* 섹션 간격 */
main > section { padding: 6rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.hero { min-height: 80vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 2rem; }
.hero-image img { width: 100%; max-width: 300px; border-radius: 2rem; box-shadow: 0 20px 40px rgba(0,0,0,0.8); }
.hero-copy h1 { font-size: 3.2rem; font-weight: 800; margin: 1rem 0; }
.hero-copy p { font-size: 1.1rem; color: var(--muted); max-width: 600px; margin: 0 auto 2rem auto; }

.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-header h2 { font-size: 2.5rem; margin: 0 0 1rem 0; }

/* AI 카드 그리드 */
.category-section { grid-column: 1 / -1; padding: 2rem 0 1rem; border-bottom: 1px solid var(--border); }
.category-section h2 { font-size: 1.5rem; margin: 0 0 0.5rem 0; }
#ai-services-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }

.product-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border-radius: 1.5rem; border: 1px solid rgba(255,255,255,0.08); display: flex; flex-direction: column; transition: transform 0.3s;
}
.product-card:hover { transform: translateY(-5px); border-color: rgba(99,102,241,0.5); }
.image-container { height: 120px; background: radial-gradient(circle at top, #1f1f2e, #0a0a0f); display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.service-image { max-height: 100%; max-width: 60%; object-fit: contain; }
.product-card .card-content { padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; flex-grow: 1; }
.service-header { display: flex; justify-content: space-between; align-items: center; }
.service-header h3 { margin: 0; font-size: 1.2rem; }
.rating { background: rgba(234, 179, 8, 0.15); color: #fbbf24; padding: 0.3rem 0.6rem; border-radius: 20px; font-size: 0.8rem; font-weight: 700; }
.product-card p { margin: 0; color: var(--muted); font-size: 0.9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.features { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.feature-tag { background: rgba(255,255,255,0.08); color: #e2e8f0; padding: 0.3rem 0.6rem; border-radius: 50px; font-size: 0.75rem; border: 1px solid rgba(255,255,255,0.05); }
.service-info { margin-top: auto; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.08); display: flex; flex-direction: column; gap: 0.4rem; }
.strengths { color: #34d399; font-size: 0.85rem; }
.pricing { color: #f87171; font-weight: 700; }
.subscribe-btn { background: rgba(99,102,241,0.1); color: #818cf8; border: 1px solid rgba(99,102,241,0.3); padding: 0.8rem; border-radius: 12px; cursor: pointer; width: 100%; font-weight: 600; margin-top: 0.5rem; }
.subscribe-btn:hover { background: var(--primary-strong); color: white; }

/* 비교 UI 디자인 */
.compare-ui-container {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.5rem;
  padding: 2.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.compare-slots {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.5rem;
  align-items: end;
  margin-top: 1.5rem;
}

.select-group { display: flex; flex-direction: column; gap: 0.8rem; }
.select-group.full-width { margin-bottom: 2rem; border-bottom: 1px solid var(--border); padding-bottom: 2rem; }
.select-group label { color: var(--muted); font-weight: 600; font-size: 0.95rem; }

.select-wrapper { position: relative; }
.select-wrapper::after { content: "▼"; position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; font-size: 0.8rem; }
.custom-select { appearance: none; -webkit-appearance: none; background: #18181b; color: white; border: 1px solid rgba(255,255,255,0.15); padding: 1rem 1.5rem; border-radius: 12px; width: 100%; font-size: 1rem; font-family: inherit; cursor: pointer; outline: none; transition: border-color 0.2s; }
.custom-select:focus { border-color: var(--primary); }

.vs-badge {
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: white; font-weight: 800; font-size: 1.2rem;
  width: 50px; height: 50px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 0.5rem; box-shadow: 0 10px 20px rgba(239, 68, 68, 0.3);
}

.compare-result-container { margin-top: 3rem; padding-top: 3rem; border-top: 1px dashed rgba(255,255,255,0.1); }
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.compare-box { background: #121214; border: 1px solid rgba(255,255,255,0.1); border-radius: 1rem; padding: 2rem; display: flex; flex-direction: column; gap: 1.5rem; }
.compare-box img { height: 40px; object-fit: contain; margin-bottom: 1rem; }
.compare-box h3 { margin: 0; font-size: 1.5rem; }
.compare-section h4 { color: var(--muted); font-size: 0.9rem; margin: 0 0 0.5rem 0; border-bottom: 1px solid var(--border); padding-bottom: 0.5rem;}
.compare-section p { margin: 0; font-size: 0.95rem; color: #e2e8f0; line-height: 1.6;}
.compare-price { font-size: 1.3rem; font-weight: 700; color: #f87171; }
.compare-pro { color: #34d399; font-weight: 600;}
.compare-con { color: #fbbf24; font-weight: 600;}

/* 추천 및 푸터 */
.recommendation-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.rec-card { background: rgba(255,255,255,0.02); padding: 2rem; border-radius: 1.5rem; border: 1px solid rgba(255,255,255,0.05); cursor: pointer; transition: 0.3s; }
.rec-card:hover { border-color: var(--primary); transform: translateY(-3px); }
.rec-card h4 { margin: 0 0 0.5rem 0; font-size: 1.1rem; }
.rec-card p { color: var(--muted); font-size: 0.95rem; margin: 0 0 1rem 0; }
.rec-card small { color: var(--primary); }

.site-footer { text-align: center; padding: 2rem 0; border-top: 1px solid var(--border); color: var(--muted); }

/* 모달 */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); backdrop-filter: blur(8px); display: flex; justify-content: center; align-items: center; z-index: 1000; opacity: 0; visibility: hidden; transition: 0.3s; }
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal-window { background: #121214; width: 90%; max-width: 420px; border-radius: 1.5rem; border: 1px solid rgba(255,255,255,0.1); padding: 1.5rem; transform: scale(0.95); transition: 0.3s; }
.modal-overlay.open .modal-window { transform: scale(1); }
.subscription-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); padding-bottom: 1rem; margin-bottom: 1rem;}
.close-btn { background: none; border: none; color: white; cursor: pointer; }

/* 모바일 화면일 때만 메뉴 토글 버튼 표시 */
@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .compare-slots { grid-template-columns: 1fr; text-align: center; }
  .vs-badge { margin: 1rem auto; }
  .compare-grid { grid-template-columns: 1fr; }
  .header-inner { flex-wrap: wrap; }
  .main-nav { display: none; width: 100%; flex-direction: column; text-align: center; margin-top: 1rem; }
  .main-nav.open { display: flex; }
}