:root {
  --game-bg: radial-gradient(circle at 50% 30%, #1e2875 0%, #121852 55%, #080b26 100%);
}

.globe-field {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 12px 16px 20px;
  box-sizing: border-box;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.globe-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  touch-action: none;
}

.globe-glass {
  position: relative;
  width: min(78vw, 320px);
  height: min(78vw, 320px);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.08) 35%, rgba(10, 25, 75, 0.6) 100%);
  border: 4px solid rgba(255, 255, 255, 0.85);
  box-shadow: inset 0 -16px 32px rgba(0, 0, 0, 0.35), 0 16px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  padding: 0;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  outline: none;
}

.globe-glass:hover {
  transform: scale(1.02);
}

.globe-glass:active {
  transform: scale(0.98);
}

.globe-glass:focus-visible {
  outline: 4px solid #ffee58;
  outline-offset: 4px;
}

/* Northern Lights / Aurora Shimmer */
.aurora-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 55%;
  background: radial-gradient(ellipse at 50% 20%, rgba(128, 222, 234, 0.3) 0%, rgba(186, 104, 200, 0.2) 50%, transparent 80%);
  pointer-events: none;
  animation: aurora-shift 6s infinite ease-in-out alternate;
}

@keyframes aurora-shift {
  0% { opacity: 0.4; transform: scaleY(0.9); }
  100% { opacity: 0.8; transform: scaleY(1.15) rotate(3deg); }
}

/* Glass Reflection Curvature */
.glass-reflection {
  position: absolute;
  top: 14px;
  left: 24px;
  width: 55px;
  height: 32px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  transform: rotate(-35deg);
  filter: blur(2px);
  pointer-events: none;
  z-index: 20;
}

/* Fairy Tale Scene inside Globe */
.globe-scene {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 140px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
  padding-bottom: 26px;
  z-index: 5;
}

.scene-item {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  outline: none;
  z-index: 6;
}

.scene-item:hover,
.scene-item:active {
  transform: scale(1.18) translateY(-4px);
}

.scene-item:focus-visible {
  outline: 3px solid #ffee58;
  border-radius: 16px;
}

.item-icon {
  font-size: 64px;
  line-height: 1;
  display: inline-block;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.25));
}

.scene-center .item-icon {
  font-size: 72px;
}

.chimney-smoke {
  position: absolute;
  top: -24px;
  right: 6px;
  font-size: 24px;
  line-height: 1;
  animation: smoke-float 1.2s ease-out forwards;
}

@keyframes smoke-float {
  0% { transform: translateY(0) scale(0.6); opacity: 0.9; }
  100% { transform: translateY(-30px) scale(1.3); opacity: 0; }
}

.snow-ground {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 38px;
  background: linear-gradient(180deg, #ffffff 0%, #e0f7fa 100%);
  border-radius: 50% 50% 0 0;
  box-shadow: 0 -3px 8px rgba(0, 0, 0, 0.15);
  pointer-events: none;
}

/* Wood Pedestal */
.globe-pedestal {
  width: min(60vw, 240px);
  height: 40px;
  background: linear-gradient(180deg, #6d4c41 0%, #4e342e 50%, #2b1d19 100%);
  border-radius: 8px 8px 24px 24px;
  border-top: 3px solid #bcaaa4;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
  margin-top: -14px;
  z-index: 4;
}

/* Snow Container & Flakes */
.snow-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

.snowflake {
  position: absolute;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.95);
  pointer-events: none;
}

.special-flake {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  box-shadow: none;
  font-size: 14px;
  line-height: 1;
}

/* Controls */
.globe-controls {
  display: flex;
  gap: 14px;
  margin-top: 20px;
  flex-wrap: wrap;
  justify-content: center;
  z-index: 15;
}

.control-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  border: none;
  border-radius: 28px;
  padding: 10px 22px;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s;
  outline: none;
}

.control-btn:hover {
  transform: translateY(-2px) scale(1.04);
}

.control-btn:active {
  transform: scale(0.96);
}

.control-btn:focus-visible {
  outline: 3px solid #ffee58;
  outline-offset: 3px;
}

.shake-btn {
  background: linear-gradient(135deg, #0288d1 0%, #01579b 100%);
  border: 2px solid #81d4fa;
}

.scene-switch-btn {
  background: linear-gradient(135deg, #7b1fa2 0%, #4a148c 100%);
  border: 2px solid #ce93d8;
}

/* Sparkles Container */
.sparks-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 40;
}

.spark-fly {
  position: absolute;
  font-size: 24px;
  pointer-events: none;
  animation: spark-drift 0.9s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes spark-drift {
  0% { transform: translate(0, 0) scale(0.5); opacity: 1; }
  100% { transform: translate(var(--tx, 0px), var(--ty, -60px)) scale(1.2) rotate(var(--rot, 30deg)); opacity: 0; }
}

@media (max-height: 600px) {
  .globe-glass { width: 220px; height: 220px; }
  .globe-pedestal { width: 170px; height: 30px; margin-top: -10px; }
  .globe-scene { height: 100px; padding-bottom: 18px; gap: 8px; }
  .item-icon { font-size: 48px; }
  .scene-center .item-icon { font-size: 56px; }
  .control-btn { font-size: 15px; padding: 7px 16px; margin-top: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .aurora-glow,
  .scene-item,
  .chimney-smoke,
  .spark-fly {
    animation: none !important;
    transition: none !important;
  }
}
