﻿/* ==========================================================================
   🪐 ISOLA DELLO SPAZIO & PIANETI (COSMIC THEME & RESPONSIVE VIEWPORT)
   ========================================================================== */

.planets-mode-tab-btn {
  padding: 8px 16px;
  font-size: 0.95rem;
  font-weight: 800;
  border-radius: 50px;
  cursor: pointer;
  border: 2px solid #cbd5e1;
  transition: all 0.2s ease;
}

.planets-stage-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 3px solid #8b5cf6;
  box-shadow: 0 10px 25px rgba(139, 92, 246, 0.12);
}

/* Solar System Track with Glowing Sun */
.solar-system-track-wrapper {
  background: radial-gradient(circle at 10% 50%, #1e1b4b 0%, #0f172a 100%);
  border-radius: 16px;
  padding: 12px 10px;
  margin: 10px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5), 0 4px 15px rgba(15, 23, 42, 0.25);
  border: 2px solid #334155;
  position: relative;
  overflow: hidden;
}

.solar-system-track-wrapper::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: radial-gradient(#ffffff 1px, transparent 1px), radial-gradient(#93c5fd 0.8px, transparent 0.8px);
  background-size: 40px 40px, 70px 70px;
  background-position: 0 0, 20px 20px;
  opacity: 0.35;
  pointer-events: none;
}

.sun-station-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 2;
  padding: 4px;
}

.sun-glow-core {
  font-size: 2.4rem;
  line-height: 1;
  filter: drop-shadow(0 0 12px #facc15) drop-shadow(0 0 24px #ea580c);
  animation: pulse-sun 3s infinite ease-in-out;
}

@keyframes pulse-sun {
  0% { transform: scale(1); filter: drop-shadow(0 0 8px #facc15) drop-shadow(0 0 16px #ea580c); }
  50% { transform: scale(1.1); filter: drop-shadow(0 0 16px #fef08a) drop-shadow(0 0 30px #f97316); }
  100% { transform: scale(1); filter: drop-shadow(0 0 8px #facc15) drop-shadow(0 0 16px #ea580c); }
}

.sun-label {
  font-size: 0.7rem;
  font-weight: 900;
  color: #fde047;
  letter-spacing: 1px;
  margin-top: 2px;
  text-shadow: 0 0 6px rgba(250, 204, 21, 0.8);
}

/* Orbit Slots Grid */
.orbit-slots-grid {
  display: grid;
  flex: 1;
  gap: 6px;
  z-index: 2;
}

.orbit-slots-grid.orbit-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.orbit-slots-grid.orbit-cols-8 {
  grid-template-columns: repeat(8, 1fr);
}

.orbit-target-slot {
  background: rgba(30, 41, 59, 0.7);
  border: 2px dashed #64748b;
  border-radius: 12px;
  min-height: 78px;
  max-height: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.2s ease;
  cursor: pointer;
  backdrop-filter: blur(4px);
  padding: 4px;
}

.orbit-target-slot:hover, .orbit-target-slot.drag-over {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.2);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.6);
  transform: scale(1.04);
}

.orbit-target-slot.filled {
  border: 2px solid #22c55e;
  background: rgba(34, 197, 94, 0.15);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.35);
}

.orbit-number-badge {
  position: absolute;
  top: 3px;
  left: 4px;
  font-size: 0.65rem;
  font-weight: 900;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.85);
  padding: 1px 4px;
  border-radius: 4px;
  border: 1px solid #475569;
}

.orbit-target-slot.filled .orbit-number-badge {
  color: #4ade80;
  border-color: #22c55e;
}

.orbit-slot-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #94a3b8;
}

.orbit-slot-placeholder span {
  font-size: 0.72rem;
  font-weight: 700;
}

.orbit-slot-placeholder small {
  font-size: 0.58rem;
  opacity: 0.7;
}

.orbit-planet-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: grab;
  animation: pop-in 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.orbit-planet-emoji {
  font-size: 1.65rem;
  line-height: 1;
}

.orbit-planet-name {
  font-size: 0.7rem;
  font-weight: 800;
  margin-top: 2px;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
}

/* Draggable Planet Cards */
.planets-tray-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.planet-drag-card {
  min-width: 60px;
  max-width: 84px;
  padding: 5px 6px;
  border-radius: 12px;
}

.planet-card-subinfo {
  font-size: 0.55rem;
  font-weight: 700;
  color: #64748b;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 72px;
}

/* Cosmic Baskets Grid */
.cosmic-baskets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  width: 100%;
}

.cosmic-basket-card {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Names Matching Grid */
.planet-names-matching-grid {
  display: grid;
  gap: 6px;
  width: 100%;
  margin-bottom: 6px;
}

.planet-names-matching-grid.names-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.planet-names-matching-grid.names-cols-8 {
  grid-template-columns: repeat(4, 1fr);
}

@media (min-width: 900px) {
  .planet-names-matching-grid.names-cols-8 {
    grid-template-columns: repeat(8, 1fr);
  }
}

.planet-name-target-card {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  padding: 4px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  min-height: 74px;
}

.planet-name-target-card:hover, .planet-name-target-card.drag-over {
  border-color: #ec4899;
  background: #fdf2f8;
  transform: translateY(-2px);
}

.planet-name-target-card.filled-correct {
  border-color: #22c55e;
  background: #f0fdf4;
}

.planet-name-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  margin-bottom: 2px;
}

.planet-name-text {
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.planet-speak-btn {
  width: 20px;
  height: 20px;
  min-width: 20px;
  font-size: 0.7rem;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.planet-syllables-badge {
  font-size: 0.58rem;
  font-weight: 800;
  color: #6366f1;
  background: #e0e7ff;
  padding: 1px 4px;
  border-radius: 12px;
  margin-bottom: 3px;
  letter-spacing: 0.3px;
  white-space: nowrap;
  line-height: 1.1;
  text-align: center;
}

.planet-name-dropzone {
  width: 100%;
  min-height: 36px;
  max-height: 44px;
  border: 1.5px dashed #cbd5e1;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  padding: 2px;
}

.planet-drop-prompt {
  font-size: 0.6rem;
  color: #94a3b8;
  font-weight: 700;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.placed-planet-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  animation: pop-in 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.placed-emoji {
  font-size: 1.35rem;
  line-height: 1;
}

.placed-check {
  font-size: 0.7rem;
  line-height: 1;
}
