:root {
  --bg-color: #F8FAFC;
  --card-bg: #FFFFFF;
  --text-dark: #1E293B;
  --text-light: #64748B;
  --primary: #3B82F6; /* Cobalt Blue */
  --accent-lime: #A3E635; /* Neon Lime Green */
  --accent-pink: #EC4899; /* Magenta Pink */
  --accent-peach: #FFDAB9; /* Soft Peach */
  --accent-orange: #F59E0B;
  --sh-color: rgba(0, 0, 0, 0.08);
  --glass-border: #E2E8F0;
}

body.dark-mode {
  --bg-color: #0F172A;
  --card-bg: #1E293B;
  --text-dark: #F8FAFC;
  --text-light: #94A3B8;
  --sh-color: rgba(0, 0, 0, 0.5);
  --glass-border: #334155;
}

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

body {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-dark);
  height: 100vh;
  overflow: hidden;
  position: relative;
  transition: background-color 0.5s ease, color 0.5s ease;
}

/* Background Decorative Elements */
.bg-circle {
  position: absolute;
  border-radius: 50%;
  z-index: -1;
  filter: blur(80px);
  opacity: 0.5;
}
.bg-circle-1 {
  width: 600px; height: 600px;
  background: var(--accent-lime);
  top: -200px; left: -100px;
}
.bg-circle-2 {
  width: 800px; height: 800px;
  background: var(--accent-pink);
  bottom: -300px; right: -200px;
  opacity: 0.3;
}
.bg-circle-3 {
  width: 400px; height: 400px;
  background: var(--primary);
  top: 40%; left: 40%;
  opacity: 0.2;
}

/* Layout */
.app-container {
  display: flex;
  height: 100vh;
  padding: 2rem;
  gap: 2rem;
  max-width: 1800px;
  margin: 0 auto;
}

.card {
  background-color: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 2rem;
  padding: 2rem;
  transition: transform 0.3s ease, background-color 0.5s ease, box-shadow 0.5s ease, border-color 0.5s ease;
}

.floating {
  box-shadow: 0 20px 50px var(--sh-color);
}

.control-panel {
  flex-basis: 380px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  z-index: 10;
}

.visualization-panel {
  flex-grow: 1;
  border-radius: 3rem;
  overflow: hidden;
  position: relative;
  display: flex;
}

#network-container {
  width: 100%;
  height: 100%;
  border-radius: 2rem;
  border: 4px dashed #E2E8F0;
  background-color: #FAFAFA;
}
/* When initialized, remove styles */
#network-container.initialized {
  border: none;
  background-color: transparent;
}

#placeholder {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--text-light);
  text-align: center;
  line-height: 1.5;
  pointer-events: none;
}

/* Typography & Headers */
h1 {
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.05em;
  position: relative;
}

.highlight {
  background-color: var(--accent-lime);
  padding: 0 0.5rem;
  border-radius: 0.5rem;
  display: inline-block;
  transform: skewX(-10deg);
}

.header { position: relative; }
.quote-icon {
  position: absolute;
  right: 0; top: -20px;
  font-size: 5rem;
  font-weight: 900;
  color: var(--primary);
  opacity: 0.2;
  font-family: serif;
}

.group-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

/* Forms & Inputs */
.form-group {
  display: flex;
  flex-direction: column;
}

.btn {
  font-family: inherit;
  font-weight: 800;
  font-size: 1.1rem;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.pill {
  border-radius: 999px;
  padding: 1rem 2rem;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
  box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  background-color: #2563EB;
}

.file-name {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-light);
  text-align: center;
  font-weight: 600;
}

/* Custom Radio Pills */
.radio-group.row {
  display: flex;
  gap: 0.5rem;
}

.radio-pill input[type="radio"] {
  display: none;
}

.pill-btn {
  display: block;
  padding: 0.75rem 1rem;
  background-color: #F1F5F9;
  color: var(--text-light);
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  flex-grow: 1;
}

.radio-pill input:checked + .pill-btn {
  background-color: var(--accent-pink);
  color: white;
  box-shadow: 0 8px 15px rgba(236, 72, 153, 0.3);
  transform: scale(1.05);
}

/* Custom Switch for Anonymize */
.switch-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
}

.switch-container input { opacity: 0; width: 0; height: 0; }

.slider {
  position: relative;
  display: inline-block;
  width: 60px; height: 34px;
  background-color: #CBD5E1;
  border-radius: 34px;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px; width: 26px;
  left: 4px; bottom: 4px;
  background-color: white;
  border-radius: 50%;
  transition: .4s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .slider { background-color: var(--primary); }
input:checked + .slider:before { transform: translateX(26px); }

.switch-label {
  font-weight: 800;
  font-size: 1.1rem;
}

/* Legend */
.sub-card {
  background-color: var(--card-bg);
  border: 1px solid var(--glass-border);
  box-shadow: none;
  margin-top: auto;
  padding: 1.5rem;
  border-radius: 1.5rem;
}

.legend-list {
  list-style: none;
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.legend-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.9rem;
}

.color-dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Vis.js network specific focus outline removal */
.vis-network {
  outline: none;
}

/* Info Panel (클릭 팝업) */
.info-panel {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 340px;
  background: var(--card-bg);
  border-radius: 1.5rem;
  padding: 1.5rem;
  box-shadow: 0 10px 40px var(--sh-color);
  z-index: 100;
  transition: all 0.3s ease;
  border: 1px solid var(--glass-border);
}
.info-panel.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-20px);
}
.info-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #F1F5F9;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}
.info-section { margin-bottom: 1.25rem; }
.info-section h4 {
  font-size: 0.95rem; margin-bottom: 0.5rem; color: var(--text-light); border-bottom: 1px dotted #e2e8f0; padding-bottom: 0.3rem;
}
.badge-list {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
}
.badge {
  background: var(--bg-color); padding: 0.4rem 0.8rem;
  border-radius: 999px; font-size: 0.85rem; font-weight: 700; color: var(--text-dark);
}
