/* ===================================================================
   AZIN Solar System Observatory — Single-Screen 2-Column Dashboard
   =================================================================== */
.solar-system {
  background: radial-gradient(circle at 30% 50%, rgba(18, 15, 52, 0.55) 0%, transparent 72%);
  min-height: 100vh;
  padding: 78px var(--pad) 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.observatory-frame {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  border-radius: var(--radius-xl);
  padding: clamp(20px, 2.2vw, 32px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.65);
}

.solar-dashboard-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.solar-head-title {
  font: 800 clamp(22px, 2.6vw, 36px)/1.08 var(--font-display);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-top: 6px;
}
.solar-head-title em {
  font-style: normal;
  background: linear-gradient(120deg, #ffd66b 0%, #ff7ab8 55%, #5ce1ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.solar-head-desc {
  color: var(--color-text-muted);
  font-size: 14px;
  word-break: keep-all;
}

.solar-wrapper {
  width: 100%;
}

.solar-main-grid {
  display: grid;
  grid-template-columns: minmax(380px, 0.92fr) minmax(420px, 1.08fr);
  gap: clamp(20px, 2.6vw, 36px);
  align-items: center;
}

.solar-left-col {
  display: flex;
  align-items: center;
  justify-content: center;
}

.solar-right-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

/* Quick-select Planet Bar (Placed at Top of Right Column) */
.solar-quickbar {
  display: flex;
  gap: 7px;
  width: 100%;
  flex-wrap: wrap;
  align-items: center;
}

.quick-planet-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(20, 17, 48, 0.78);
  border: 1px solid rgba(160, 140, 255, 0.22);
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--color-text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.22s;
  white-space: nowrap;
}

.quick-planet-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-size: 200% 100%;
  background-position: 30% 50%;
  box-shadow: inset -3px -3px 6px rgba(0, 0, 0, 0.8), inset 1px 1px 3px rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}
.quick-planet-thumb.is-sun {
  box-shadow: 0 0 8px #ffaa00, inset 0 0 4px #fff6cc;
}

.quick-planet-btn:hover {
  transform: translateY(-2px);
  border-color: var(--color-accent);
  background: rgba(255, 255, 255, 0.12);
}

.quick-planet-btn.active {
  background: rgba(92, 225, 255, 0.22);
  border-color: var(--color-accent);
  box-shadow: 0 0 14px rgba(92, 225, 255, 0.45);
  color: #fff;
}

.quick-planet-btn.sun-btn.active {
  background: rgba(255, 170, 0, 0.25);
  border-color: #ffaa00;
  box-shadow: 0 0 18px rgba(255, 170, 0, 0.55);
}

.quick-planet-btn.quiz-trigger-btn {
  background: linear-gradient(135deg, #ffd66b, #ff8c42);
  border-color: transparent;
  color: #160d00;
  font-weight: 800;
  margin-left: auto;
  box-shadow: 0 0 16px rgba(255, 214, 107, 0.35);
}
.quick-planet-btn.quiz-trigger-btn:hover {
  transform: translateY(-2px) scale(1.03);
}

@keyframes tex-spin {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* Orbit Simulation Container */
.solar-container {
  position: relative;
  width: min(500px, 42vw);
  height: min(500px, 42vw);
  margin: 0 auto;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 180, 60, 0.06) 0%, rgba(16, 12, 44, 0.35) 55%, transparent 72%);
}

/* Sun at center */
.sun {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 54px;
  height: 54px;
  z-index: 25;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s;
}
.sun:hover {
  transform: translate(-50%, -50%) scale(1.18);
}
.sun-core {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-image: url('../assets/textures/sun.jpg');
  background-size: 200% 100%;
  animation: tex-spin 22s linear infinite;
  z-index: 3;
  box-shadow: 0 0 22px #ffaa00, 0 0 42px rgba(255, 120, 0, 0.65), inset 0 0 10px rgba(255, 250, 200, 0.65);
}
.sun-glow {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 170, 0, 0.5) 0%, transparent 75%);
  animation: sun-radiate 4s ease-in-out infinite alternate;
  z-index: 1;
}
.sun-flare {
  position: absolute;
  inset: -24px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 100, 0, 0.3) 0%, transparent 80%);
  animation: sun-radiate 6s ease-in-out infinite alternate-reverse;
  z-index: 0;
}
@keyframes sun-radiate {
  0% { transform: scale(0.9); opacity: 0.6; }
  100% { transform: scale(1.2); opacity: 0.9; }
}

/* Orbits */
.orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.orbit.active {
  border-color: rgba(92, 225, 255, 0.5);
  box-shadow: 0 0 18px rgba(92, 225, 255, 0.2);
}

/* Planets on orbits */
.planet {
  position: absolute;
  top: 0;
  left: 0;
  cursor: pointer;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: filter 0.3s, z-index 0.2s;
  will-change: transform;
}
.planet:hover,
.planet.active {
  z-index: 35;
  filter: drop-shadow(0 0 14px #5ce1ff);
}
.planet-visual {
  border-radius: 50%;
  position: relative;
  background-size: 210% 100%;
  animation: tex-spin 16s linear infinite;
  transition: transform 0.25s;
}
.planet:hover .planet-visual,
.planet.active .planet-visual {
  transform: scale(1.38);
}

/* Saturn Rings */
.planet-rings {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotateX(72deg) rotateY(15deg);
  border: 3px solid rgba(235, 205, 145, 0.85);
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 0 8px rgba(235, 205, 145, 0.45);
}

/* Earth Moon */
.planet-moon {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-image: url('../assets/textures/moon.jpg');
  background-size: 200% 100%;
  box-shadow: inset -1.5px -1.5px 3px rgba(0,0,0,0.8), 0 0 4px rgba(255,255,255,0.6);
  animation: moon-spin 3s linear infinite;
}
@keyframes moon-spin {
  0% { transform: rotate(0deg) translateX(11px) rotate(0deg); }
  100% { transform: rotate(360deg) translateX(11px) rotate(-360deg); }
}

/* Floating name tag on hover */
.planet-tag {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  color: #fff;
  background: rgba(5, 5, 20, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 2px 7px;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.planet:hover .planet-tag,
.planet.active .planet-tag {
  opacity: 1;
  transform: translateX(-50%) translateY(2px);
}

/* Planet Detail Card Showcase (Right Column) */
.planet-info {
  width: 100%;
}
.planet-info-inner {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  padding: 22px 24px;
  box-shadow: var(--glass-shadow);
  position: relative;
  overflow: hidden;
}

.planet-top-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
}

.planet-showcase {
  flex: none;
  width: 92px;
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.planet-3d-ball {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  position: relative;
  background-repeat: repeat-x;
  background-size: 210% 100%;
  animation: tex-spin 16s linear infinite;
  box-shadow:
    0 0 28px var(--accent-glow, #5ce1ff),
    inset -12px -10px 22px rgba(0, 0, 0, 0.88),
    inset 4px 4px 10px rgba(255, 255, 255, 0.32);
}
.planet-3d-ball.sun-3d {
  box-shadow:
    0 0 36px #ffaa00,
    0 0 64px rgba(255, 110, 0, 0.55),
    inset 0 0 16px rgba(255, 245, 190, 0.65);
}
.planet-3d-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 132px;
  height: 38px;
  transform: translate(-50%, -50%) rotate(-14deg);
  border: 5px solid rgba(238, 212, 162, 0.85);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(238, 212, 162, 0.45);
  pointer-events: none;
}

.planet-titles {
  flex: 1 1 auto;
  min-width: 0;
}
.planet-badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--color-gold);
  background: rgba(255, 214, 107, 0.12);
  border: 1px solid rgba(255, 214, 107, 0.32);
  padding: 3px 12px;
  border-radius: 999px;
  margin-bottom: 6px;
  word-break: keep-all;
}
.planet-name-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.planet-name-en {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.planet-name-ko {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-accent);
}
.planet-speak-icon {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: #0b0920;
  background: var(--color-gold);
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
.planet-speak-icon:hover {
  transform: scale(1.06);
  box-shadow: 0 0 14px rgba(255, 214, 107, 0.6);
}

.planet-desc {
  color: var(--color-text);
  font-size: 14px;
  line-height: 1.65;
  margin-bottom: 12px;
  word-break: keep-all;
}

.planet-funfact {
  background: rgba(255, 214, 107, 0.07);
  border: 1px dashed rgba(255, 214, 107, 0.35);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 14px;
}
.funfact-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  color: var(--color-gold);
  margin-bottom: 3px;
}
.funfact-text {
  font-size: 13.5px;
  color: #f7e6a6;
  line-height: 1.55;
  word-break: keep-all;
}

.planet-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.stat-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  padding: 10px 8px;
  text-align: center;
  min-width: 0;
}
.stat-val {
  display: block;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 800;
  color: var(--color-accent);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stat-lbl {
  display: block;
  font-size: 11px;
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* Quiz UI inside planet panel */
.quiz-active {
  text-align: center;
  padding: 32px 24px;
}
.quiz-question {
  font-family: var(--font-kr);
  font-size: 20px;
  font-weight: 800;
  margin: 14px 0 8px;
  color: #fff;
  word-break: keep-all;
}
.quiz-instruction {
  color: var(--color-text-muted);
  font-size: 13.5px;
  margin-bottom: 18px;
}
.quiz-options {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.quiz-opt-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: #fff;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s;
  white-space: nowrap;
}
.quiz-opt-btn:hover {
  background: var(--color-primary);
  border-color: var(--color-accent);
  transform: scale(1.05);
}
.quiz-feedback {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  word-break: keep-all;
}
.quiz-feedback.correct {
  background: rgba(46, 204, 113, 0.15);
  border: 1px solid rgba(46, 204, 113, 0.4);
  color: #2ecc71;
}
.quiz-feedback.wrong {
  background: rgba(231, 76, 60, 0.15);
  border: 1px solid rgba(231, 76, 60, 0.4);
  color: #e74c3c;
}

@media (max-width: 1024px) {
  .solar-main-grid {
    grid-template-columns: 1fr;
  }
  .solar-container {
    width: min(440px, 88vw);
    height: min(440px, 88vw);
  }
  .solar-dashboard-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
@media (max-width: 640px) {
  .planet-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .planet-top-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .planet-speak-icon {
    margin-left: 0;
  }
}
