:root {
  --bg: #0a0a0a;
  --surface: #111111;
  --card: #1a1a1a;
  --accent: #e8ff47;
  --accent2: #ff4747;
  --text: #f0f0f0;
  --muted: #888;
  --border: #2a2a2a;
  --shadow-glow: rgba(232,255,71,0.2);
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Noto Sans KR', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* HEADER */
header {
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(10,10,10,0.9);
  backdrop-filter: blur(15px);
  z-index: 1000;
}

.lang-switcher {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 13px;
  outline: none;
  cursor: pointer;
}

.logo {
  font-family: 'Black Han Sans', sans-serif;
  font-size: 26px;
  letter-spacing: 2px;
  color: var(--accent);
  text-decoration: none;
}

/* GUIDE SECTION */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 20px;
}

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

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

.guide-card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 24px;
  border-radius: 16px;
  transition: transform 0.3s ease;
}

.guide-card:hover { transform: translateY(-5px); border-color: var(--accent); }

.guide-card h3 { font-size: 16px; margin-bottom: 12px; color: var(--text); }

.logo span { color: var(--text); }

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  margin-left: 20px;
  transition: color 0.2s;
}

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

/* MAIN LAYOUT */
.main-container {
  display: grid;
  grid-template-columns: 1fr 400px;
  max-width: 1400px;
  margin: 0 auto;
  min-height: calc(100vh - 70px);
}

/* GUIDE SECTION (AdSense Content) */
.guide-content {
  padding: 40px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(to bottom, var(--surface), var(--bg));
}

.guide-title {
  font-family: 'Black Han Sans', sans-serif;
  font-size: 24px;
  margin-bottom: 16px;
  color: var(--text);
}

.guide-text {
  font-size: 14px;
  color: var(--muted);
  max-width: 800px;
}

/* BODY SECTION */
.body-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  position: relative;
  border-right: 1px solid var(--border);
}

.section-label {
  font-size: 12px;
  letter-spacing: 4px;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 40px;
}

.body-container {
  position: relative;
  width: 300px;
  height: 500px;
}

.body-svg { width: 100%; height: 100%; }

/* Hotspot buttons */
.hotspot {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: rgba(232,255,71,0.05);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translate(-50%, -50%);
  z-index: 10;
}

.hotspot:hover, .hotspot.active {
  background: var(--accent);
  color: var(--bg);
  box-shadow: 0 0 25px var(--shadow-glow);
  transform: translate(-50%, -50%) scale(1.2);
}

.hotspot.filled {
  border-color: #47ff8a;
  background: rgba(71,255,138,0.1);
  color: #47ff8a;
}

.hotspot.filled:hover { background: #47ff8a; color: var(--bg); }

/* SIDE PANEL */
.panel {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-left: 1px solid var(--border);
}

.panel-header { padding: 32px; border-bottom: 1px solid var(--border); }
.panel-title { font-family: 'Black Han Sans', sans-serif; font-size: 22px; margin-bottom: 8px; }
.panel-subtitle { font-size: 13px; color: var(--muted); }

.input-area { flex: 1; padding: 32px; overflow-y: auto; }

.input-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 250px;
  border: 2px dashed var(--border);
  border-radius: 16px;
  color: var(--muted);
  text-align: center;
}

.measurement-form { display: none; animation: fadeIn 0.4s ease; }
.measurement-form.visible { display: block; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* FORM ELEMENTS */
.form-title { font-family: 'Black Han Sans', sans-serif; font-size: 18px; color: var(--accent); margin-bottom: 8px; }
.form-desc { font-size: 13px; color: var(--muted); margin-bottom: 24px; }

.input-group { margin-bottom: 20px; }
.input-label { font-size: 11px; color: var(--muted); text-transform: uppercase; margin-bottom: 8px; display: block; letter-spacing: 1px; }
.input-field {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: all 0.2s;
}
.input-field:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232,255,71,0.1); }

/* BUTTONS */
.btn {
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  font-family: 'Black Han Sans', sans-serif;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { background: #f5ff80; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(232,255,71,0.3); }

.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--text); background: rgba(255,255,255,0.05); }

.btn-accent2 { background: var(--accent2); color: white; }
.btn-accent2:hover { background: #ff6666; box-shadow: 0 5px 15px rgba(255,71,71,0.3); }

/* ANALYSIS RESULT */
.analysis-card {
  background: var(--card);
  border: 1px solid var(--accent);
  border-radius: 16px;
  padding: 24px;
  margin-top: 20px;
  display: none;
}

.analysis-card.visible { display: block; animation: slideUp 0.5s ease; }

@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* FOOTER */
footer {
  background: var(--surface);
  padding: 60px 32px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-links { display: flex; justify-content: center; gap: 30px; margin-bottom: 24px; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: 13px; }
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 12px; color: #444; }

/* TOAST */
.toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--accent);
  color: var(--bg);
  padding: 14px 28px;
  border-radius: 50px;
  font-weight: 700;
  transition: transform 0.3s;
  z-index: 2000;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* MOBILE */
@media (max-width: 900px) {
  .main-container { grid-template-columns: 1fr; }
  .body-section { border-right: none; border-bottom: 1px solid var(--border); }
}
