/* Hyper-Gap Talent Master Architecture & Transparent Growth Engine Styles */
:root {
  --primary: #1B365D;
  --primary-dark: #0F2341;
  --primary-light: #2A528A;
  --accent: #E67E22;
  --accent-light: #F39C12;
  --secondary: #34495E;
  --bg-main: #F8FAFC;
  --bg-card: #FFFFFF;
  --text-main: #1E293B;
  --text-muted: #64748B;
  --border-color: #E2E8F0;
  --border-focus: #3B82F6;
  
  --cat-cv: #3B82F6; /* 공유가치 Blue */
  --cat-fc: #10B981; /* 기초역량 Emerald */
  --cat-bc: #8B5CF6; /* 직무역량 Purple */
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Pretendard', '맑은 고딕', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Header & Navigation */
.app-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: white;
  padding: 1.25rem 2rem;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-badge {
  background: linear-gradient(135deg, #F39C12, #E67E22);
  color: white;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.logo-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.logo-subtitle {
  font-size: 0.8rem;
  opacity: 0.8;
  font-weight: 400;
}

/* Navigation Tabs */
.nav-tabs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.nav-tab-btn {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-tab-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  transform: translateY(-1px);
}

.nav-tab-btn.active {
  background: white;
  color: var(--primary-dark);
  border-color: white;
  box-shadow: var(--shadow-sm);
}

/* Container */
.main-container {
  max-width: 1440px;
  margin: 1.5rem auto;
  padding: 0 1.5rem;
}

/* Section Card */
.content-section {
  display: none;
  animation: fadeIn 0.3s ease;
}

.content-section.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.card {
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.card-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: var(--bg-main);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

/* Hero / Vision Banner */
.hero-banner {
  background: linear-gradient(135deg, #1B365D 0%, #2A528A 50%, #16A085 100%);
  color: white;
  border-radius: 16px;
  padding: 2.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.hero-banner::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
  border-radius: 50%;
}

.hero-title {
  font-size: 1.85rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  letter-spacing: -0.5px;
}

.hero-subtitle {
  font-size: 1.05rem;
  opacity: 0.9;
  max-width: 800px;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.formula-box {
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 1.25rem 1.75rem;
  display: inline-block;
}

.formula-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: #F1C40F;
  margin-bottom: 0.35rem;
}

.formula-sub {
  font-size: 0.85rem;
  opacity: 0.85;
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .grid-2, .grid-4 { grid-template-columns: 1fr; }
}

/* Periodic Table of 42 Competencies */
.periodic-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.periodic-card {
  border-radius: 10px;
  padding: 0.85rem;
  border: 1px solid var(--border-color);
  background: white;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 120px;
  position: relative;
  overflow: hidden;
}

.periodic-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: currentColor;
}

.periodic-card.cat-cv {
  border-left: 4px solid var(--cat-cv);
}
.periodic-card.cat-fc {
  border-left: 4px solid var(--cat-fc);
}
.periodic-card.cat-bc {
  border-left: 4px solid var(--cat-bc);
}

.p-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.p-code {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--text-muted);
}

.p-via {
  font-size: 0.65rem;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  background: var(--bg-main);
  color: var(--text-muted);
}

.p-name {
  font-size: 1rem;
  font-weight: 700;
  margin: 0.4rem 0 0.2rem 0;
  color: var(--text-main);
}

.p-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Assessment Survey Form */
.survey-card {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  background: white;
  transition: background 0.15s ease;
}

.survey-card:hover {
  background: #FAFCFF;
}

.survey-q-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.likert-group {
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
  align-items: center;
  max-width: 600px;
}

.likert-btn {
  flex: 1;
  text-align: center;
  padding: 0.5rem 0.25rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-main);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.likert-btn:hover {
  background: #E2E8F0;
  border-color: #CBD5E1;
}

.likert-btn.selected {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(27, 54, 93, 0.2);
}

/* 9-Box Matrix Styles */
.ninebox-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 0.75rem;
  min-height: 480px;
}

.ninebox-cell {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ninebox-cell:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: scale(1.01);
}

.ninebox-cell.star {
  background: #EFF6FF;
  border-color: #93C5FD;
}

.ninebox-header {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.ninebox-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.ninebox-badge {
  display: inline-block;
  align-self: flex-start;
  margin-top: 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: rgba(27, 54, 93, 0.1);
  color: var(--primary);
}

/* Match-Up Simulator */
.match-card {
  background: white;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.score-circle {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: conic-gradient(var(--accent) var(--match-deg, 270deg), #E2E8F0 0deg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem auto;
}

.score-inner {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
}

/* Table Styles */
.custom-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.custom-table th {
  background: #F1F5F9;
  color: var(--primary);
  font-weight: 700;
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 2px solid var(--border-color);
}

.custom-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.custom-table tr:hover td {
  background: #F8FAFC;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover {
  background: var(--primary-light);
}

.btn-accent {
  background: var(--accent);
  color: white;
}
.btn-accent:hover {
  background: var(--accent-light);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}
.btn-outline:hover {
  background: #EFF6FF;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1.5rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 16px;
  max-width: 680px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 2rem;
  box-shadow: var(--shadow-xl);
  animation: modalPop 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* Footer */
.app-footer {
  background: #0F2341;
  color: #94A3B8;
  padding: 2rem;
  margin-top: 4rem;
  font-size: 0.85rem;
  text-align: center;
}

/* 9x9 Heatmap Matrix Styles */
.heatmap-container {
  overflow-x: auto;
  margin-top: 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.heatmap-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
}

.heatmap-table th, .heatmap-table td {
  padding: 0.6rem 0.4rem;
  border: 1px solid var(--border-color);
  font-size: 0.8rem;
}

.heatmap-cell {
  cursor: pointer;
  transition: all 0.15s ease;
  font-weight: 700;
}

.heatmap-cell:hover {
  transform: scale(1.08);
  box-shadow: var(--shadow-md);
  z-index: 5;
  position: relative;
}

.heatmap-cell.optimal { background: #DCFCE7; color: #15803D; }
.heatmap-cell.good { background: #DBEAFE; color: #1E40AF; }
.heatmap-cell.fair { background: #FEF3C7; color: #B45309; }
.heatmap-cell.caution { background: #FFEDD5; color: #C2410C; }
.heatmap-cell.risk { background: #FEE2E2; color: #B91C1C; }

.hm-text { display: block; font-size: 0.75rem; }
.hm-score { display: block; font-size: 0.65rem; opacity: 0.8; font-weight: normal; }
