/**
 * EAE University - Pentagon Constellation
 * Award-Winning Forest & Gold Design
 * "숲 속의 별자리 - 오각형 생태계"
 */

/* ============================================
   PENTAGON SECTION
   ============================================ */
.pentagon-section {
  position: relative;
  padding: var(--space-24) 0 var(--space-16);
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg-primary) 0%, rgba(26, 77, 46, 0.08) 50%, var(--bg-primary) 100%);
}

.pentagon-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.pentagon-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 50%, rgba(245, 197, 66, 0.06), transparent 70%),
    radial-gradient(ellipse 60% 40% at 20% 30%, rgba(26, 92, 56, 0.08), transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 70%, rgba(26, 77, 46, 0.08), transparent 50%);
}

/* Firefly particles */
.pentagon-fireflies {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.firefly {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--color-accent-400);
  border-radius: 50%;
  opacity: 0;
  animation: firefly-float 8s ease-in-out infinite;
  box-shadow: 0 0 10px var(--color-accent-400), 0 0 20px var(--color-accent-500);
}

.firefly:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; }
.firefly:nth-child(2) { left: 20%; top: 60%; animation-delay: 1s; }
.firefly:nth-child(3) { left: 80%; top: 30%; animation-delay: 2s; }
.firefly:nth-child(4) { left: 70%; top: 70%; animation-delay: 3s; }
.firefly:nth-child(5) { left: 50%; top: 10%; animation-delay: 4s; }
.firefly:nth-child(6) { left: 30%; top: 80%; animation-delay: 5s; }
.firefly:nth-child(7) { left: 90%; top: 50%; animation-delay: 6s; }
.firefly:nth-child(8) { left: 5%; top: 45%; animation-delay: 7s; }

@keyframes firefly-float {
  0%, 100% {
    opacity: 0;
    transform: translateY(0) scale(0.5);
  }
  10% {
    opacity: 0.8;
  }
  50% {
    opacity: 0.4;
    transform: translateY(-30px) scale(1);
  }
  90% {
    opacity: 0.8;
  }
}

/* Section Header */
.pentagon-header {
  text-align: center;
  margin-bottom: var(--space-12);
  position: relative;
  z-index: 1;
}

.pentagon-header .section-label {
  color: var(--color-accent-500);
}

.pentagon-header .section-title {
  margin-bottom: var(--space-3);
}

.pentagon-subtitle {
  font-size: var(--text-base);
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
  line-height: var(--leading-relaxed);
}

/* ============================================
   PENTAGON CONSTELLATION CONTAINER
   ============================================ */
.pentagon-constellation {
  position: relative;
  width: 100%;
  max-width: 700px;
  aspect-ratio: 1;
  margin: 0 auto;
  z-index: 1;
}

/* SVG Connections */
.pentagon-connections {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.pentagon-connections svg {
  width: 100%;
  height: 100%;
}

.connection-line {
  stroke: url(#connectionGradient);
  stroke-width: 2;
  fill: none;
  opacity: 0.4;
  transition: opacity 0.4s ease, stroke-width 0.4s ease;
}

.connection-line.active {
  opacity: 0.8;
  stroke-width: 3;
}

/* Connection pulse animation */
.connection-pulse {
  fill: var(--color-accent-500);
  opacity: 0;
}

.connection-pulse.active {
  animation: pulse-along-path 2s ease-in-out infinite;
}

@keyframes pulse-along-path {
  0% { opacity: 0; offset-distance: 0%; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { opacity: 0; offset-distance: 100%; }
}

/* ============================================
   CENTER NODE (PARKSY)
   ============================================ */
.pentagon-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
}

.center-node {
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.center-node:hover {
  transform: scale(1.08);
}

/* Center glow rings */
.center-glow {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 197, 66, 0.2) 0%, transparent 70%);
  animation: center-pulse 3s ease-in-out infinite;
}

.center-glow::before {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 1px solid rgba(245, 197, 66, 0.3);
  animation: center-ring-pulse 3s ease-in-out infinite 0.5s;
}

.center-glow::after {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1px solid rgba(245, 197, 66, 0.15);
  animation: center-ring-pulse 3s ease-in-out infinite 1s;
}

@keyframes center-pulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.15); opacity: 1; }
}

@keyframes center-ring-pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

/* Center circle */
.center-circle {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-accent-400) 0%, var(--color-accent-600) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 8px 32px rgba(245, 197, 66, 0.4),
    0 0 60px rgba(245, 197, 66, 0.2),
    inset 0 2px 4px rgba(255, 255, 255, 0.3);
  z-index: 2;
}

.center-circle::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 15%;
  right: 15%;
  height: 30%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.4), transparent);
  border-radius: 50% 50% 0 0;
}

.center-star {
  font-size: 14px;
  margin-bottom: 2px;
}

.center-label {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--color-primary-900);
  letter-spacing: -0.02em;
}

.center-role {
  font-size: 9px;
  font-weight: 600;
  color: var(--color-primary-800);
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.8;
}

/* ============================================
   SLOT NODES
   ============================================ */
.pentagon-slot {
  position: absolute;
  z-index: 5;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), z-index 0s;
}

.pentagon-slot:hover {
  transform: scale(1.1);
  z-index: 15;
}

/* Slot positions (pentagon layout) */
.slot-1 { top: 5%; left: 50%; transform: translateX(-50%); }
.slot-2 { top: 35%; left: 5%; }
.slot-3 { top: 35%; right: 5%; }
.slot-4 { bottom: 10%; left: 50%; transform: translateX(-50%); }

.slot-1:hover { transform: translateX(-50%) scale(1.1); }
.slot-4:hover { transform: translateX(-50%) scale(1.1); }

/* Slot card */
.slot-card {
  position: relative;
  width: 130px;
  padding: 16px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.4s ease;
  overflow: hidden;
}

.slot-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(245, 197, 66, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.slot-card:hover::before {
  opacity: 1;
}

.slot-card:hover {
  border-color: var(--color-accent-500);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.3),
    0 0 30px rgba(245, 197, 66, 0.15);
}

/* Slot status colors */
.slot-card[data-status="confirmed"] {
  border-color: rgba(34, 197, 94, 0.4);
}
.slot-card[data-status="confirmed"]:hover {
  border-color: #22c55e;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(34, 197, 94, 0.2);
}

.slot-card[data-status="reserved"] {
  border-color: rgba(245, 158, 11, 0.3);
}
.slot-card[data-status="reserved"]:hover {
  border-color: #f59e0b;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(245, 158, 11, 0.2);
}

.slot-card[data-status="candidate"] {
  border-color: rgba(20, 184, 166, 0.4);
}
.slot-card[data-status="candidate"]:hover {
  border-color: #14b8a6;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(20, 184, 166, 0.2);
}

.slot-card[data-status="open"] {
  border-style: dashed;
  border-color: rgba(59, 130, 246, 0.4);
  background: transparent;
}
.slot-card[data-status="open"]:hover {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.05);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(59, 130, 246, 0.15);
}

/* Slot icon */
.slot-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 10px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  position: relative;
}

.slot-icon::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 16px;
  opacity: 0.4;
  animation: slot-glow 3s ease-in-out infinite;
}

/* Icon colors by status */
.slot-card[data-status="confirmed"] .slot-icon {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(26, 77, 46, 0.3));
}
.slot-card[data-status="confirmed"] .slot-icon::after {
  background: radial-gradient(circle, rgba(34, 197, 94, 0.3), transparent 70%);
}

.slot-card[data-status="reserved"] .slot-icon {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(180, 120, 0, 0.2));
}
.slot-card[data-status="reserved"] .slot-icon::after {
  background: radial-gradient(circle, rgba(245, 158, 11, 0.3), transparent 70%);
}

.slot-card[data-status="candidate"] .slot-icon {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.2), rgba(15, 120, 110, 0.2));
}
.slot-card[data-status="candidate"] .slot-icon::after {
  background: radial-gradient(circle, rgba(20, 184, 166, 0.3), transparent 70%);
}

.slot-card[data-status="open"] .slot-icon {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(30, 70, 150, 0.15));
  border: 1px dashed rgba(59, 130, 246, 0.4);
}
.slot-card[data-status="open"] .slot-icon::after {
  background: radial-gradient(circle, rgba(59, 130, 246, 0.2), transparent 70%);
}

@keyframes slot-glow {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.1); opacity: 0.6; }
}

/* Slot text */
.slot-category {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-accent-500);
  margin-bottom: 4px;
}

.slot-name {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slot-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.slot-card[data-status="confirmed"] .slot-status {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.slot-card[data-status="reserved"] .slot-status {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.slot-card[data-status="candidate"] .slot-status {
  background: rgba(20, 184, 166, 0.15);
  color: #14b8a6;
}

.slot-card[data-status="open"] .slot-status {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

/* Hover CTA */
.slot-cta {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 12px;
  background: var(--color-accent-500);
  color: var(--color-primary-900);
  font-size: 10px;
  font-weight: 700;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}

.slot-card:hover .slot-cta {
  bottom: -32px;
  opacity: 1;
}

/* ============================================
   LEGEND
   ============================================ */
.pentagon-legend {
  display: flex;
  justify-content: center;
  gap: var(--space-6);
  margin-top: var(--space-10);
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-dot.confirmed { background: #22c55e; }
.legend-dot.reserved { background: #f59e0b; }
.legend-dot.candidate { background: #14b8a6; }
.legend-dot.open {
  background: transparent;
  border: 2px dashed #3b82f6;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .pentagon-constellation {
    max-width: 500px;
  }

  .center-node {
    width: 110px;
    height: 110px;
  }

  .center-circle {
    width: 80px;
    height: 80px;
  }

  .center-label {
    font-size: 18px;
  }

  .slot-card {
    width: 100px;
    padding: 12px 8px;
  }

  .slot-icon {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .slot-category {
    font-size: 8px;
  }

  .slot-name {
    font-size: 12px;
  }

  .slot-status {
    font-size: 8px;
    padding: 2px 6px;
  }

  .slot-2 { left: 0; }
  .slot-3 { right: 0; }
}

@media (max-width: 480px) {
  .pentagon-section {
    padding: var(--space-16) 0 var(--space-12);
  }

  .pentagon-constellation {
    max-width: 320px;
  }

  .center-node {
    width: 90px;
    height: 90px;
  }

  .center-circle {
    width: 65px;
    height: 65px;
  }

  .center-label {
    font-size: 15px;
  }

  .center-role {
    font-size: 7px;
  }

  .slot-card {
    width: 80px;
    padding: 10px 6px;
    border-radius: 12px;
  }

  .slot-icon {
    width: 30px;
    height: 30px;
    font-size: 14px;
    margin-bottom: 6px;
  }

  .slot-category {
    font-size: 7px;
    letter-spacing: 1px;
  }

  .slot-name {
    font-size: 10px;
  }

  .slot-status {
    font-size: 7px;
    padding: 2px 5px;
  }

  .slot-cta {
    display: none;
  }

  .pentagon-legend {
    gap: var(--space-4);
  }

  .legend-item {
    font-size: 10px;
  }
}
