/* ===== BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #060b1a; --bg2: #0d1530; --bg3: #111d3a;
  --card: rgba(255,255,255,0.05); --card-hover: rgba(255,255,255,0.09);
  --border: rgba(255,255,255,0.1);
  --red: #cd2e3a; --red2: #e84057;
  --blue: #1a56db; --blue2: #3b82f6;
  --text: #f0f4ff; --text2: #9aa5c4; --text3: #6b7a99;
  --radius: 16px; --shadow: 0 8px 32px rgba(0,0,0,0.5);
  --glow: 0 0 30px rgba(26,86,219,0.3);
}
html { scroll-behavior: smooth; }
body { font-family:'Inter','Noto Sans KR',sans-serif; background:var(--bg); color:var(--text); overflow-x:hidden; }
a { color:inherit; text-decoration:none; }
button { cursor:pointer; border:none; font-family:inherit; }

/* ===== HEADER ===== */
.header {
  position:fixed; top:0; left:0; right:0; z-index:100;
  background:rgba(6,11,26,0.85); backdrop-filter:blur(20px);
  border-bottom:1px solid var(--border); transition:all 0.3s;
}
.header.scrolled { background:rgba(6,11,26,0.97); }
.header-inner {
  max-width:1400px; margin:0 auto;
  display:flex; align-items:center; gap:16px;
  padding:0 24px; height:64px;
}
.logo { display:flex; align-items:center; gap:8px; font-size:20px; font-weight:700; white-space:nowrap; }
.logo-flag { font-size:24px; }
.logo-text strong { color:var(--red2); }
.nav { display:flex; gap:2px; margin-left:auto; overflow-x:auto; }
.nav-btn {
  background:transparent; color:var(--text2);
  padding:6px 11px; border-radius:7px; font-size:13px; font-weight:500;
  transition:all 0.2s; white-space:nowrap;
}
.nav-btn:hover, .nav-btn.active { background:var(--card-hover); color:var(--text); }
.ai-btn {
  background:var(--red); color:white; padding:8px 16px; border-radius:8px;
  font-size:13px; font-weight:700; transition:all 0.2s; white-space:nowrap; flex-shrink:0;
}
.ai-btn:hover { background:var(--red2); }

/* ===== HERO ===== */
.hero {
  min-height:100vh; display:flex; align-items:center;
  padding:80px 24px 40px; max-width:1400px; margin:0 auto; gap:60px;
}
.hero-left { flex:1; min-width:0; }
.hero-badge {
  display:inline-flex; align-items:center; gap:8px;
  background:rgba(205,46,58,0.15); border:1px solid rgba(205,46,58,0.3);
  color:#ff6b7a; padding:6px 14px; border-radius:100px;
  font-size:13px; font-weight:600; margin-bottom:20px;
}
.hero-title {
  font-size:clamp(48px,7vw,88px); font-weight:900;
  line-height:1.05; letter-spacing:-2px; margin-bottom:20px;
}
.hero-title .red { color:var(--red2); text-shadow:0 0 40px rgba(232,64,87,0.5); }
.hero-sub { font-size:17px; color:var(--text2); line-height:1.6; margin-bottom:32px; }
.hero-btns { display:flex; gap:12px; flex-wrap:wrap; margin-bottom:40px; }
.hero-cta {
  background:var(--red); color:white; padding:13px 26px; border-radius:10px;
  font-size:15px; font-weight:700; transition:all 0.2s;
  box-shadow:0 4px 20px rgba(205,46,58,0.4);
}
.hero-cta:hover { background:var(--red2); transform:translateY(-2px); }
.hero-cta.outline { background:transparent; border:1.5px solid var(--border); color:var(--text); box-shadow:none; }
.hero-cta.outline:hover { border-color:var(--blue2); background:rgba(59,130,246,0.1); }
.hero-stats { display:flex; gap:32px; }
.stat { display:flex; flex-direction:column; gap:2px; }
.stat strong { font-size:28px; font-weight:800; }
.stat span { font-size:13px; color:var(--text3); }

/* ===== 3D MAP ===== */
.hero-right { flex:1.1; min-width:0; display:flex; justify-content:center; }
.map-wrap {
  position:relative; width:100%; max-width:580px; height:580px;
  border-radius:24px; overflow:hidden;
  background:radial-gradient(ellipse at center,#0d2045 0%,#060b1a 70%);
  border:1px solid rgba(59,130,246,0.2);
  box-shadow:var(--glow),var(--shadow),inset 0 0 60px rgba(26,86,219,0.05);
}
#korea-canvas { width:100%; height:100%; display:block; }
.map-overlay-labels { position:absolute; top:0; left:0; right:0; bottom:0; pointer-events:none; }
.city-label { position:absolute; transform:translate(-50%,-50%); display:flex; flex-direction:column; align-items:center; gap:3px; pointer-events:none; }
.city-dot { width:9px; height:9px; border-radius:50%; border:2px solid white; box-shadow:0 0 8px currentColor; }
.city-name { background:rgba(6,11,26,0.85); color:white; font-size:11px; font-weight:600; padding:2px 7px; border-radius:4px; white-space:nowrap; }
.map-hint { position:absolute; bottom:14px; left:50%; transform:translateX(-50%); background:rgba(0,0,0,0.5); color:var(--text2); font-size:12px; padding:5px 14px; border-radius:100px; border:1px solid var(--border); }

/* ===== CATEGORIES ===== */
.categories-section { padding:80px 24px; max-width:1400px; margin:0 auto; }
.section-header { text-align:center; margin-bottom:40px; }
.section-header h2 { font-size:40px; font-weight:800; margin-bottom:8px; }
.section-header p { color:var(--text2); font-size:17px; }
.cat-tabs { display:flex; gap:8px; justify-content:center; flex-wrap:wrap; margin-bottom:40px; }
.cat-tab {
  display:flex; flex-direction:column; align-items:center; gap:3px;
  background:var(--card); border:1px solid var(--border);
  padding:12px 20px; border-radius:12px; color:var(--text2);
  font-size:13px; transition:all 0.2s; min-width:100px;
}
.cat-tab:hover { background:var(--card-hover); color:var(--text); }
.cat-tab.active { background:rgba(26,86,219,0.2); border-color:var(--blue2); color:var(--text); box-shadow:0 0 20px rgba(26,86,219,0.15); }
.tab-icon { font-size:24px; }
.tab-en { font-weight:700; font-size:13px; }
.tab-kr { font-size:11px; color:var(--text3); }
.cat-tab.active .tab-kr { color:var(--text2); }

/* ===== CONTENT GRID ===== */
.content-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(270px,1fr)); gap:18px; animation:fadeIn 0.35s ease; }
@keyframes fadeIn { from{opacity:0;transform:translateY(14px)} to{opacity:1;transform:translateY(0)} }
.content-card { background:var(--card); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; transition:all 0.25s; }
.content-card:hover { transform:translateY(-4px); box-shadow:var(--shadow); border-color:rgba(255,255,255,0.2); background:var(--card-hover); }
.card-emoji { font-size:44px; text-align:center; padding:28px 24px 14px; background:linear-gradient(135deg,rgba(26,86,219,0.1),rgba(205,46,58,0.1)); }
.card-body { padding:0 18px 18px; }
.card-name { font-size:17px; font-weight:700; margin-bottom:3px; }
.card-kr { font-size:12px; color:var(--text3); margin-bottom:7px; }
.card-desc { font-size:13px; color:var(--text2); line-height:1.6; }
.card-tags { display:flex; flex-wrap:wrap; gap:5px; margin-top:10px; }
.card-tag { background:rgba(255,255,255,0.07); border-radius:100px; padding:3px 9px; font-size:11px; color:var(--text3); }
.card-map-btn {
  display:flex; align-items:center; gap:6px; margin-top:12px;
  background:rgba(59,130,246,0.15); border:1px solid rgba(59,130,246,0.3);
  color:#93bbfc; padding:7px 12px; border-radius:8px; font-size:12px; font-weight:600;
  width:100%; justify-content:center; transition:all 0.2s;
}
.card-map-btn:hover { background:rgba(59,130,246,0.25); color:white; }

/* ===== GOOGLE MAPS PANEL ===== */
.map-panel-backdrop {
  display:none; position:fixed; inset:0; background:rgba(0,0,0,0.5);
  z-index:299; backdrop-filter:blur(4px);
}
.map-panel-backdrop.open { display:block; }
.map-panel {
  position:fixed; top:0; right:0; bottom:0; width:480px; max-width:100vw;
  background:var(--bg2); border-left:1px solid var(--border);
  z-index:300; transform:translateX(100%); transition:transform 0.35s cubic-bezier(0.4,0,0.2,1);
  display:flex; flex-direction:column; overflow:hidden;
}
.map-panel.open { transform:translateX(0); }
.mp-header {
  display:flex; align-items:flex-start; justify-content:space-between;
  padding:20px; border-bottom:1px solid var(--border); background:var(--bg3); flex-shrink:0;
}
.mp-header h3 { font-size:18px; font-weight:700; }
.mp-kr { font-size:13px; color:var(--text3); }
.mp-close { background:var(--card); color:var(--text2); width:32px; height:32px; border-radius:50%; font-size:14px; flex-shrink:0; transition:all 0.2s; }
.mp-close:hover { background:var(--red); color:white; }
.gmap-frame { width:100%; height:300px; flex-shrink:0; background:var(--bg3); overflow:hidden; }
.gmap-frame iframe { width:100%; height:100%; border:none; }
.gmap-frame .gmap-loading { display:flex; align-items:center; justify-content:center; height:100%; color:var(--text3); font-size:14px; }
.mp-body { flex:1; overflow-y:auto; padding:20px; }
.mp-rating { display:flex; align-items:center; gap:10px; margin-bottom:16px; }
.mp-stars { color:#f39c12; font-size:18px; }
.mp-score { font-size:20px; font-weight:700; }
.mp-count { font-size:13px; color:var(--text3); }
.mp-reviews { display:flex; flex-direction:column; gap:12px; margin-bottom:20px; }
.mp-review { background:var(--card); border:1px solid var(--border); border-radius:12px; padding:12px; }
.mp-review-header { display:flex; align-items:center; gap:8px; margin-bottom:6px; }
.mp-reviewer { font-size:13px; font-weight:600; }
.mp-review-stars { font-size:12px; color:#f39c12; }
.mp-review-text { font-size:12px; color:var(--text2); line-height:1.5; }
.mp-review-time { font-size:11px; color:var(--text3); margin-top:4px; }
.mp-no-reviews { color:var(--text3); font-size:13px; text-align:center; padding:20px; }
.mp-actions { display:flex; flex-direction:column; gap:8px; }
.mp-btn {
  display:flex; align-items:center; justify-content:center; gap:8px;
  padding:12px; border-radius:10px; font-size:14px; font-weight:600;
  transition:all 0.2s; text-align:center;
}
.mp-btn.primary { background:var(--red); color:white; }
.mp-btn.primary:hover { background:var(--red2); }
.mp-btn:not(.primary) { background:var(--card); border:1px solid var(--border); color:var(--text2); }
.mp-btn:not(.primary):hover { background:var(--card-hover); color:var(--text); }

/* ===== AI CHATBOT ===== */
.chatbot {
  position:fixed; bottom:90px; right:24px; z-index:200; width:380px; max-height:580px;
  background:var(--bg2); border:1px solid var(--border); border-radius:20px;
  box-shadow:0 20px 60px rgba(0,0,0,0.7); display:flex; flex-direction:column;
  transform:scale(0.9) translateY(20px); opacity:0; pointer-events:none;
  transition:all 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
.chatbot.open { transform:scale(1) translateY(0); opacity:1; pointer-events:all; }
.chat-header { display:flex; align-items:center; justify-content:space-between; padding:16px 20px; border-bottom:1px solid var(--border); background:var(--bg3); border-radius:20px 20px 0 0; }
.chat-title { display:flex; align-items:center; gap:10px; }
.chat-avatar { font-size:26px; }
.chat-title strong { display:block; font-size:15px; }
.chat-status { font-size:12px; color:#4ade80; }
.chat-close { background:var(--card); color:var(--text2); width:30px; height:30px; border-radius:50%; font-size:14px; transition:all 0.2s; }
.chat-close:hover { background:var(--red); color:white; }
.chat-messages { flex:1; overflow-y:auto; padding:14px; display:flex; flex-direction:column; gap:8px; min-height:180px; max-height:320px; }
.chat-msg { display:flex; }
.chat-msg.assistant { justify-content:flex-start; }
.chat-msg.user { justify-content:flex-end; }
.msg-bubble { max-width:82%; padding:9px 13px; border-radius:14px; font-size:13px; line-height:1.6; }
.chat-msg.assistant .msg-bubble { background:var(--bg3); border:1px solid var(--border); border-radius:4px 14px 14px 14px; }
.chat-msg.user .msg-bubble { background:var(--blue); color:white; border-radius:14px 4px 14px 14px; }
.chat-msg.typing .msg-bubble { color:var(--text3); }
.chat-quick { display:flex; flex-wrap:wrap; gap:5px; padding:0 14px 8px; }
.chat-quick button { background:var(--card); border:1px solid var(--border); color:var(--text2); font-size:11px; padding:4px 9px; border-radius:100px; transition:all 0.2s; }
.chat-quick button:hover { background:var(--card-hover); color:var(--text); }
.chat-input-row { display:flex; gap:8px; padding:10px 14px; border-top:1px solid var(--border); }
#chat-input { flex:1; background:var(--bg3); border:1px solid var(--border); color:var(--text); border-radius:10px; padding:9px 12px; font-size:13px; font-family:inherit; outline:none; transition:border-color 0.2s; }
#chat-input:focus { border-color:var(--blue2); }
#chat-input::placeholder { color:var(--text3); }
#chat-send { background:var(--red); color:white; width:40px; height:40px; border-radius:9px; font-size:17px; display:flex; align-items:center; justify-content:center; transition:all 0.2s; }
#chat-send:hover { background:var(--red2); }

/* ===== FAB ===== */
.chat-fab { position:fixed; bottom:24px; right:24px; z-index:201; background:var(--red); color:white; display:flex; align-items:center; gap:8px; padding:13px 20px; border-radius:100px; font-size:14px; font-weight:700; box-shadow:0 4px 20px rgba(205,46,58,0.5); transition:all 0.2s; }
.chat-fab:hover { background:var(--red2); transform:translateY(-2px); }
.fab-icon { font-size:18px; }

/* ===== FOOTER ===== */
.footer { background:#040810; padding:36px 24px; border-top:1px solid var(--border); }
.footer-inner { max-width:1400px; margin:0 auto; text-align:center; }
.footer-brand { display:flex; align-items:center; justify-content:center; gap:8px; font-size:17px; font-weight:700; margin-bottom:6px; }
.footer p { color:var(--text3); font-size:13px; margin-bottom:14px; }
.footer-links { display:flex; gap:18px; justify-content:center; }
.footer-links a { color:var(--text3); font-size:13px; transition:color 0.2s; }
.footer-links a:hover { color:var(--text); }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width:5px; }
::-webkit-scrollbar-thumb { background:var(--border); border-radius:3px; }

/* ===== RESPONSIVE ===== */
@media(max-width:1100px) {
  .hero { flex-direction:column; padding-top:90px; gap:36px; }
  .hero-right { width:100%; }
  .map-wrap { max-width:100%; height:440px; }
}
@media(max-width:768px) {
  .nav { display:none; }
  .hero-title { font-size:52px; }
  .map-panel { width:100vw; }
  .chatbot { width:calc(100vw - 32px); right:16px; }
  .chat-fab { right:16px; bottom:16px; }
}
