/* Energy Empire - UI Components */

/* Settings Modal Enhancements */
.settings-content {
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  text-align: left;
}

.settings-category {
  color: var(--accent-yellow);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 15px 0 10px 0;
  text-align: center;
}

.volume-row {
  display: grid;
  grid-template-columns: 120px 1fr 60px;
  gap: 10px;
  align-items: center;
}

.volume-row label {
  font-size: 13px;
}

.volume-row input[type="range"] {
  width: 100%;
}

.volume-row span {
  text-align: right;
  font-size: 13px;
  color: var(--accent-blue);
  font-weight: 600;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: var(--bg-panel-active);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: var(--accent-blue);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  background: var(--accent-cyan);
  transform: scale(1.2);
  box-shadow: 0 0 10px var(--glow-blue);
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: var(--accent-blue);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

input[type="range"]::-moz-range-thumb:hover {
  background: var(--accent-cyan);
  transform: scale(1.2);
  box-shadow: 0 0 10px var(--glow-blue);
}

/* Theme Selector */
#theme-select {
  flex: 1;
}

#theme-select option:disabled {
  color: var(--text-muted);
  font-style: italic;
}

/* Buy Mode Toggle */
.buy-toggle {
  display: flex;
  padding: 10px;
  gap: 5px;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--border-color);
}

.buy-btn {
  flex: 1;
  padding: 8px 0;
  background: var(--bg-panel-hover);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.buy-btn:hover {
  background: rgba(0, 191, 255, 0.1);
  border-color: var(--accent-blue);
  color: var(--text-primary);
}

.buy-btn.active {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: white;
}

/* Building Item */
.building-item {
  background: var(--bg-panel-hover);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 12px;
}

.building-item:hover {
  border-color: var(--accent-blue);
  background: rgba(0, 191, 255, 0.05);
}

.building-item.affordable {
  border-color: var(--accent-green);
}

.building-item.affordable:hover {
  background: rgba(0, 255, 136, 0.1);
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.2);
}

.building-item.locked {
  opacity: 0.5;
  cursor: not-allowed;
}

.building-icon {
  width: 48px;
  height: 48px;
  background: var(--bg-dark);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.building-info {
  flex: 1;
  min-width: 0;
}

.building-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.building-stats {
  font-size: 11px;
  color: var(--text-secondary);
}

.building-count {
  font-size: 20px;
  font-weight: bold;
  color: var(--accent-yellow);
  min-width: 40px;
  text-align: right;
}

.building-cost {
  font-size: 13px;
  color: var(--text-muted);
  text-align: right;
}

.building-cost.affordable {
  color: var(--accent-green);
}

.building-cost.expensive {
  color: var(--accent-red);
}

/* Upgrade Item */
.upgrade-item {
  background: var(--bg-panel-hover);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.upgrade-item:hover {
  border-color: var(--accent-yellow);
  background: rgba(255, 215, 0, 0.05);
}

.upgrade-item.affordable {
  border-color: var(--accent-green);
}

.upgrade-item.affordable:hover {
  background: rgba(0, 255, 136, 0.1);
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.2);
}

.upgrade-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.upgrade-icon {
  font-size: 20px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 215, 0, 0.1);
  border-radius: 6px;
  flex-shrink: 0;
}

.upgrade-item.affordable .upgrade-icon {
  background: rgba(0, 255, 136, 0.15);
  box-shadow: 0 0 8px rgba(0, 255, 136, 0.3);
}

.upgrade-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-yellow);
}

.upgrade-description {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  margin-left: 36px;
}

.upgrade-cost {
  font-size: 13px;
  color: var(--text-muted);
  margin-left: 36px;
}

.upgrade-cost.affordable {
  color: var(--accent-green);
}

.upgrade-cost.expensive {
  color: var(--accent-red);
}

/* Floating Click Numbers */
.click-number {
  position: absolute;
  font-size: 20px;
  font-weight: bold;
  color: var(--accent-yellow);
  text-shadow: 0 0 10px var(--glow-color), 2px 2px 4px rgba(0, 0, 0, 0.8);
  pointer-events: none;
  animation: floatUp 1s ease-out forwards;
  z-index: 50;
}

@keyframes floatUp {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-60px) scale(0.8);
  }
}

/* Save Indicator */
.save-indicator {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--bg-panel);
  border: 1px solid var(--accent-green);
  color: var(--accent-green);
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 13px;
  z-index: 100;
  pointer-events: none;
  animation: fadeInOut 2s ease-in-out forwards;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translateY(20px); }
  15% { opacity: 1; transform: translateY(0); }
  85% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-10px); }
}

/* Building Icons - icons are rendered from JS via building.icon property */

/* Tooltip */
.tooltip {
  position: absolute;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 12px 16px;
  max-width: 300px;
  z-index: 200;
  pointer-events: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.tooltip-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-yellow);
  margin-bottom: 6px;
}

.tooltip-description {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-style: italic;
}

.tooltip-stats {
  font-size: 12px;
  color: var(--text-primary);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state-text {
  font-size: 14px;
}

/* Synergy Indicator */
.synergy-badge {
  display: inline-block;
  background: rgba(0, 255, 136, 0.2);
  border: 1px solid var(--accent-green);
  color: var(--accent-green);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  margin-left: 8px;
}

/* Loading Screen */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-dark);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.loading-title {
  font-size: 48px;
  font-weight: bold;
  color: var(--accent-yellow);
  text-shadow: 0 0 20px var(--glow-color);
  margin-bottom: 30px;
}

.loading-bar-container {
  width: 300px;
  height: 20px;
  background: var(--bg-panel);
  border: 2px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
}

.loading-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-yellow), var(--accent-orange));
  width: 0%;
  transition: width 0.3s ease;
}

.loading-text {
  margin-top: 15px;
  font-size: 14px;
  color: var(--text-secondary);
}

/* Pulse Animation for Important Elements */
.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Shake Animation for Errors */
.shake {
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

/* Glow Effect */
.glow {
  box-shadow: 0 0 15px var(--glow-color);
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
  #main-content {
    grid-template-columns: 240px 1fr 280px;
  }
}

@media (max-width: 1024px) {
  #main-content {
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: fixed;
    width: 100%;
    height: 40vh;
    bottom: 0;
    left: 0;
    z-index: 20;
    transform: translateY(100%);
    transition: transform 0.3s ease;
  }

  .side-panel.open {
    transform: translateY(0);
  }
}

/* ================================================
   POWER SURGE STYLES
   ================================================ */

/* Active Effects Container */
#active-effects {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* Effect Indicator */
.effect-indicator {
  background: var(--bg-panel);
  border: 2px solid var(--accent-yellow);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  animation: effectPulse 1s ease-in-out infinite;
}

.effect-indicator.fading {
  animation: effectFadeOut 0.3s ease-out forwards;
}

.effect-icon {
  font-size: 16px;
}

.effect-name {
  color: var(--text-primary);
  font-weight: 600;
}

.effect-timer {
  color: var(--accent-yellow);
  font-weight: bold;
  min-width: 24px;
}

@keyframes effectPulse {
  0%, 100% { box-shadow: 0 0 5px rgba(255, 215, 0, 0.3); }
  50% { box-shadow: 0 0 15px rgba(255, 215, 0, 0.6); }
}

@keyframes effectFadeOut {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(0.8); }
}

/* Combo Notification */
.combo-notification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, rgba(255, 100, 0, 0.95), rgba(255, 50, 0, 0.95));
  border: 3px solid var(--accent-yellow);
  padding: 20px 40px;
  border-radius: 12px;
  text-align: center;
  z-index: 300;
  animation: comboAppear 2s ease-out forwards;
  box-shadow: 0 0 40px rgba(255, 100, 0, 0.8);
}

.combo-count {
  font-size: 36px;
  font-weight: bold;
  color: var(--accent-yellow);
  text-shadow: 0 0 20px var(--accent-yellow);
}

.combo-name {
  font-size: 18px;
  color: white;
  margin-top: 8px;
}

@keyframes comboAppear {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
  20% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
  30% { transform: translate(-50%, -50%) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -60%) scale(0.9); }
}

/* Surge Notification (Collection Feedback) */
.surge-notification {
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-panel);
  border: 2px solid var(--accent-yellow);
  padding: 15px 25px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 250;
  animation: surgeNotif 3s ease-out forwards;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.surge-icon {
  font-size: 32px;
}

.surge-name {
  font-size: 18px;
  font-weight: bold;
  color: var(--accent-yellow);
}

.surge-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

@keyframes surgeNotif {
  0% { opacity: 0; transform: translateX(-50%) translateY(20px); }
  15% { opacity: 1; transform: translateX(-50%) translateY(0); }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
}

/* ================================================
   PRESTIGE STYLES
   ================================================ */

/* Voltage Display */
#voltage-display {
  background: linear-gradient(135deg, rgba(138, 43, 226, 0.2), rgba(75, 0, 130, 0.3));
  border: 1px solid #8a2be2;
  border-radius: 6px;
  padding: 6px 12px;
}

#voltage-display .stat-label {
  color: #a855f7;
}

#voltage-display .stat-value {
  color: #c084fc;
}

/* Prestige Button */
.header-btn.prestige {
  background: linear-gradient(135deg, rgba(138, 43, 226, 0.3), rgba(75, 0, 130, 0.4));
  border-color: #8a2be2;
  color: #c084fc;
}

.header-btn.prestige:hover {
  background: linear-gradient(135deg, rgba(138, 43, 226, 0.5), rgba(75, 0, 130, 0.6));
  box-shadow: 0 0 15px rgba(138, 43, 226, 0.5);
}

.header-btn.prestige:not(.hidden) {
  animation: prestigeGlow 2s ease-in-out infinite;
}

@keyframes prestigeGlow {
  0%, 100% { box-shadow: 0 0 5px rgba(138, 43, 226, 0.5); }
  50% { box-shadow: 0 0 20px rgba(138, 43, 226, 0.8); }
}

/* Forge Button */
.header-btn.forge {
  background: linear-gradient(135deg, rgba(255, 100, 0, 0.2), rgba(255, 50, 0, 0.3));
  border-color: var(--accent-orange);
  color: var(--accent-orange);
}

.header-btn.forge:hover {
  background: linear-gradient(135deg, rgba(255, 100, 0, 0.4), rgba(255, 50, 0, 0.5));
  box-shadow: 0 0 15px rgba(255, 100, 0, 0.5);
}

/* Prestige Modal */
.prestige-content {
  background: linear-gradient(180deg, #1a1a2e 0%, #2a1a3e 100%);
  border-color: #8a2be2 !important;
  text-align: center;
}

.prestige-content h2 {
  color: #c084fc;
  font-size: 28px;
  text-shadow: 0 0 20px rgba(138, 43, 226, 0.8);
  margin-bottom: 15px;
}

.prestige-rewards {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin: 25px 0;
  padding: 20px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
}

.reward-item {
  text-align: center;
}

.reward-value {
  display: block;
  font-size: 36px;
  color: var(--accent-yellow);
  font-weight: bold;
  text-shadow: 0 0 15px var(--glow-color);
}

.reward-label {
  display: block;
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 5px;
}

.prestige-warning {
  color: var(--accent-red);
  font-size: 13px;
  margin: 15px 0;
}

.modal-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
}

.prestige-confirm-btn {
  background: linear-gradient(135deg, #8a2be2, #4b0082);
  color: white;
  font-weight: bold;
  padding: 14px 30px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s ease;
}

.prestige-confirm-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(138, 43, 226, 0.8);
}

/* Prestige Complete Notification */
.prestige-complete-notification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(180deg, #1a1a2e 0%, #2a1a3e 100%);
  border: 3px solid #8a2be2;
  padding: 30px 50px;
  border-radius: 12px;
  text-align: center;
  z-index: 400;
  animation: prestigeComplete 4s ease-out forwards;
  box-shadow: 0 0 50px rgba(138, 43, 226, 0.8);
}

.prestige-title {
  font-size: 32px;
  font-weight: bold;
  color: #c084fc;
  text-shadow: 0 0 20px rgba(138, 43, 226, 0.8);
  margin-bottom: 20px;
}

.prestige-gains {
  font-size: 20px;
  color: var(--accent-yellow);
}

.prestige-gains div {
  margin: 8px 0;
}

@keyframes prestigeComplete {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
  20% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
  30% { transform: translate(-50%, -50%) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
}

/* ================================================
   PLASMA FORGE STYLES
   ================================================ */

.forge-content {
  max-width: 600px;
  width: 90vw;
}

.forge-content h2 {
  color: var(--accent-orange);
  text-shadow: 0 0 15px rgba(255, 100, 0, 0.5);
}

.forge-cores-display {
  font-size: 18px;
  color: var(--text-primary);
  margin-bottom: 20px;
  padding: 10px;
  background: rgba(255, 100, 0, 0.1);
  border: 1px solid var(--accent-orange);
  border-radius: 6px;
}

.forge-cores-display span {
  color: var(--accent-orange);
  font-weight: bold;
  font-size: 22px;
}

/* Plasma Upgrades Container */
.plasma-upgrades {
  max-height: 400px;
  overflow-y: auto;
  padding-right: 10px;
}

/* Plasma Upgrade Item */
.plasma-upgrade-item {
  background: var(--bg-panel-hover);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 12px 15px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.plasma-upgrade-item:hover:not(.purchased):not(.locked) {
  border-color: var(--accent-orange);
  background: rgba(255, 100, 0, 0.1);
}

.plasma-upgrade-item.affordable {
  border-color: var(--accent-green);
}

.plasma-upgrade-item.affordable:hover {
  background: rgba(0, 255, 136, 0.1);
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.plasma-upgrade-item.purchased {
  border-color: var(--accent-yellow);
  background: rgba(255, 215, 0, 0.1);
  cursor: default;
}

.plasma-upgrade-item.locked {
  opacity: 0.4;
  cursor: not-allowed;
}

.plasma-upgrade-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.plasma-upgrade-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-orange);
}

.plasma-upgrade-item.purchased .plasma-upgrade-name {
  color: var(--accent-yellow);
}

.plasma-upgrade-cost {
  font-size: 13px;
  color: var(--text-muted);
}

.plasma-upgrade-item.affordable .plasma-upgrade-cost {
  color: var(--accent-green);
}

.plasma-upgrade-item.purchased .plasma-upgrade-cost {
  color: var(--accent-green);
}

.plasma-upgrade-description {
  font-size: 12px;
  color: var(--text-secondary);
}

.plasma-upgrade-requires {
  font-size: 11px;
  color: var(--accent-red);
  margin-top: 6px;
  font-style: italic;
}

/* ================================================
   ADDITIONAL UTILITY STYLES
   ================================================ */

/* Hidden utility class (for JS toggle) */
.hidden {
  display: none !important;
}

/* Screen Flash Effect (Phaser handles this, but backup) */
.screen-flash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
  animation: flashFade 0.2s ease-out forwards;
}

@keyframes flashFade {
  from { opacity: 0.3; }
  to { opacity: 0; }
}

/* ================================================
   ACHIEVEMENT STYLES
   ================================================ */

/* Achievement Button */
.header-btn.achievements {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 165, 0, 0.3));
  border-color: var(--accent-yellow);
  color: var(--accent-yellow);
}

.header-btn.achievements:hover {
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

/* Achievement Modal */
.achievements-content {
  max-width: 700px;
  width: 95vw;
}

.achievement-summary {
  text-align: center;
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 15px;
}

.achievement-summary span {
  color: var(--accent-yellow);
  font-weight: bold;
}

.achievement-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
  justify-content: center;
}

.achievement-category-btn {
  padding: 6px 12px;
  background: var(--bg-panel-hover);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
}

.achievement-category-btn:hover {
  border-color: var(--accent-yellow);
  color: var(--accent-yellow);
}

.achievement-category-btn.active {
  background: var(--accent-yellow);
  border-color: var(--accent-yellow);
  color: var(--bg-dark);
}

/* Achievement List */
.achievement-list {
  max-height: 400px;
  overflow-y: auto;
  padding-right: 10px;
}

.achievement-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-panel-hover);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  margin-bottom: 8px;
  transition: all 0.2s ease;
}

.achievement-item:hover {
  border-color: var(--accent-yellow);
}

.achievement-item.unlocked {
  border-color: var(--accent-green);
  background: rgba(0, 255, 136, 0.05);
}

.achievement-item.secret {
  opacity: 0.5;
}

.achievement-icon {
  font-size: 28px;
  width: 40px;
  text-align: center;
}

.achievement-info {
  flex: 1;
}

.achievement-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.achievement-item.unlocked .achievement-name {
  color: var(--accent-green);
}

.achievement-description {
  font-size: 12px;
  color: var(--text-secondary);
}

.achievement-progress-bar {
  width: 100%;
  height: 4px;
  background: var(--bg-dark);
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}

.achievement-progress-bar .fill {
  height: 100%;
  background: var(--accent-yellow);
  transition: width 0.3s ease;
}

.achievement-reward {
  font-size: 12px;
  color: var(--accent-yellow);
  font-weight: bold;
}

/* Achievement Tier Badges */
.achievement-tier-badge {
  font-size: 14px;
  margin-left: 6px;
}

.achievement-item.tier-bronze {
  border-left: 3px solid #cd7f32;
}

.achievement-item.tier-silver {
  border-left: 3px solid #c0c0c0;
}

.achievement-item.tier-gold {
  border-left: 3px solid #ffd700;
}

.achievement-item.tier-diamond {
  border-left: 3px solid #b9f2ff;
}

.achievement-item.tier-bronze.unlocked {
  background: linear-gradient(90deg, rgba(205, 127, 50, 0.1), transparent);
}

.achievement-item.tier-silver.unlocked {
  background: linear-gradient(90deg, rgba(192, 192, 192, 0.1), transparent);
}

.achievement-item.tier-gold.unlocked {
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.1), transparent);
}

.achievement-item.tier-diamond.unlocked {
  background: linear-gradient(90deg, rgba(185, 242, 255, 0.15), transparent);
}

/* Achievement Notification */
#notification-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.achievement-notification {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 20px;
  background: linear-gradient(135deg, rgba(0, 40, 0, 0.95), rgba(0, 60, 0, 0.95));
  border: 2px solid var(--accent-green);
  border-radius: 8px;
  animation: notifSlideIn 0.3s ease-out;
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
}

.achievement-notification.fade-out {
  animation: notifSlideOut 0.5s ease-out forwards;
}

.notification-icon {
  font-size: 32px;
}

.notification-title {
  font-size: 12px;
  color: var(--accent-green);
  text-transform: uppercase;
}

.notification-name {
  font-size: 16px;
  font-weight: bold;
  color: var(--text-primary);
}

@keyframes notifSlideIn {
  from { transform: translateX(100px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes notifSlideOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100px); opacity: 0; }
}

/* ================================================
   PET STYLES
   ================================================ */

/* Pet Button */
.header-btn.pet {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 200, 0, 0.3));
  border-color: var(--accent-yellow);
  color: var(--accent-yellow);
}

.header-btn.pet:hover {
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

/* Pet Modal */
.pet-content {
  max-width: 500px;
  width: 90vw;
}

.pet-content h2 {
  color: var(--accent-yellow);
  text-shadow: 0 0 15px var(--glow-color);
}

.pet-content h3 {
  color: var(--text-primary);
  font-size: 16px;
  margin: 20px 0 10px 0;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 5px;
}

.pet-stats {
  background: var(--bg-panel-hover);
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
}

.pet-level-display {
  font-size: 18px;
  font-weight: bold;
  color: var(--accent-yellow);
  margin-bottom: 10px;
}

.pet-xp-bar-container {
  width: 100%;
  height: 10px;
  background: var(--bg-dark);
  border-radius: 5px;
  overflow: hidden;
}

.pet-xp-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-yellow), var(--accent-orange));
  transition: width 0.3s ease;
}

.pet-xp-text {
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 5px;
}

/* Pet Aura List */
.pet-aura-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pet-aura-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-panel-hover);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pet-aura-item:hover:not(.locked) {
  border-color: var(--accent-yellow);
}

.pet-aura-item.active {
  border-color: var(--accent-green);
  background: rgba(0, 255, 136, 0.1);
}

.pet-aura-item.locked {
  opacity: 0.4;
  cursor: not-allowed;
}

.aura-icon {
  font-size: 24px;
}

.aura-info {
  flex: 1;
}

.aura-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.aura-description {
  font-size: 12px;
  color: var(--text-secondary);
}

.aura-unlock {
  font-size: 11px;
  color: var(--accent-red);
}

/* Pet Appearance List */
.pet-appearance-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.pet-appearance-item {
  padding: 10px;
  background: var(--bg-panel-hover);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.pet-appearance-item:hover:not(.locked) {
  border-color: var(--accent-yellow);
}

.pet-appearance-item.active {
  border-color: var(--accent-green);
  background: rgba(0, 255, 136, 0.1);
}

.pet-appearance-item.locked {
  opacity: 0.4;
  cursor: not-allowed;
}

.pet-appearance-item.can-unlock {
  border-color: var(--accent-yellow);
  animation: pulse 2s infinite;
}

.appearance-preview {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin: 0 auto 8px auto;
  box-shadow: 0 0 10px currentColor;
}

.appearance-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.appearance-description {
  font-size: 10px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.appearance-unlock {
  font-size: 10px;
  color: var(--accent-red);
  margin-top: 5px;
}

/* Pet Notification */
.pet-notification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px 30px;
  background: linear-gradient(135deg, rgba(40, 40, 0, 0.95), rgba(60, 50, 0, 0.95));
  border: 2px solid var(--accent-yellow);
  border-radius: 10px;
  z-index: 400;
  animation: petNotifAppear 4s ease-out forwards;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
}

.pet-notification.level-up {
  background: linear-gradient(135deg, rgba(0, 40, 40, 0.95), rgba(0, 60, 60, 0.95));
  border-color: var(--accent-blue);
  box-shadow: 0 0 30px rgba(0, 191, 255, 0.6);
}

.pet-notif-icon {
  font-size: 40px;
}

.pet-notif-title {
  font-size: 14px;
  color: var(--accent-yellow);
  text-transform: uppercase;
}

.pet-notif-text {
  font-size: 18px;
  font-weight: bold;
  color: var(--text-primary);
}

@keyframes petNotifAppear {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
  25% { transform: translate(-50%, -50%) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

/* ================================================
   SINGULARITY STYLES
   ================================================ */

/* Singularity Button */
.header-btn.singularity {
  background: linear-gradient(135deg, rgba(102, 0, 153, 0.3), rgba(51, 0, 102, 0.4));
  border-color: #9933ff;
  color: #cc66ff;
}

.header-btn.singularity:hover {
  box-shadow: 0 0 20px rgba(153, 51, 255, 0.6);
}

.header-btn.singularity:not(.hidden) {
  animation: singularityPulse 2s ease-in-out infinite;
}

@keyframes singularityPulse {
  0%, 100% { box-shadow: 0 0 5px rgba(153, 51, 255, 0.5); }
  50% { box-shadow: 0 0 25px rgba(153, 51, 255, 0.9); }
}

/* Dark Forge Button */
.header-btn.dark-forge {
  background: linear-gradient(135deg, rgba(102, 0, 153, 0.2), rgba(51, 0, 102, 0.3));
  border-color: #9933ff;
  color: #cc66ff;
}

.header-btn.dark-forge:hover {
  box-shadow: 0 0 15px rgba(153, 51, 255, 0.5);
}

/* Dark Energy Display */
#dark-energy-display {
  background: linear-gradient(135deg, rgba(102, 0, 153, 0.2), rgba(51, 0, 102, 0.3));
  border: 1px solid #9933ff;
  border-radius: 6px;
  padding: 6px 12px;
}

#dark-energy-display .stat-label {
  color: #cc66ff;
}

#dark-energy-display .stat-value {
  color: #e699ff;
}

/* Singularity Modal */
.singularity-content {
  background: linear-gradient(180deg, #1a0a2e 0%, #2a1a4e 100%);
  border-color: #9933ff !important;
  text-align: center;
}

.singularity-content h2 {
  color: #cc66ff;
  font-size: 32px;
  text-shadow: 0 0 30px rgba(153, 51, 255, 0.8);
}

.singularity-rewards {
  display: flex;
  justify-content: center;
  margin: 25px 0;
  padding: 20px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
}

.singularity-info {
  font-size: 14px;
  color: var(--text-secondary);
}

.singularity-warning {
  color: #ff6666;
  font-size: 14px;
  font-weight: bold;
  margin: 15px 0;
}

.singularity-confirm-btn {
  background: linear-gradient(135deg, #9933ff, #6600cc);
  color: white;
  font-weight: bold;
  padding: 14px 30px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 18px;
  transition: all 0.2s ease;
}

.singularity-confirm-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(153, 51, 255, 0.9);
}

/* Singularity Complete Notification */
.singularity-complete-notification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(180deg, #1a0a2e 0%, #2a1a4e 100%);
  border: 3px solid #9933ff;
  padding: 40px 60px;
  border-radius: 12px;
  text-align: center;
  z-index: 500;
  animation: singularityComplete 5s ease-out forwards;
  box-shadow: 0 0 80px rgba(153, 51, 255, 0.9);
}

.singularity-title {
  font-size: 40px;
  font-weight: bold;
  color: #cc66ff;
  text-shadow: 0 0 30px rgba(153, 51, 255, 0.8);
  margin-bottom: 20px;
}

.singularity-info div {
  font-size: 22px;
  color: var(--accent-yellow);
  margin: 10px 0;
}

@keyframes singularityComplete {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }
  20% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
  35% { transform: translate(-50%, -50%) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
}

/* Transcendence Modal */
.transcendence-content {
  background: linear-gradient(180deg, #0a1a2e 0%, #1a3a5e 100%);
  border-color: #00d4ff !important;
  text-align: center;
}

.transcendence-content h2 {
  color: #00d4ff;
  font-size: 32px;
  text-shadow: 0 0 30px rgba(0, 212, 255, 0.8);
}

.transcendence-requirements {
  margin: 20px 0;
  padding: 15px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
}

.transcendence-requirements h3 {
  color: #00d4ff;
  font-size: 14px;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.transcendence-req-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.transcendence-req {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  font-size: 14px;
}

.transcendence-req .req-icon {
  font-size: 16px;
  color: #ff6666;
}

.transcendence-req.met .req-icon {
  color: #4caf50;
}

.transcendence-rewards {
  display: flex;
  justify-content: center;
  margin: 25px 0;
  padding: 20px;
  background: rgba(0, 212, 255, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(0, 212, 255, 0.3);
}

.transcendence-info {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 10px 0;
}

.transcendence-warning {
  color: #ff6666;
  font-size: 14px;
  font-weight: bold;
  margin: 15px 0;
}

.transcendence-confirm-btn {
  background: linear-gradient(135deg, #00d4ff, #0088ff);
  color: white;
  font-weight: bold;
  padding: 14px 30px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 18px;
  transition: all 0.2s ease;
}

.transcendence-confirm-btn:hover:not([disabled]) {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.9);
}

.transcendence-confirm-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.transcendence-upgrades-btn {
  background: linear-gradient(135deg, #4a90d9, #357abd);
  color: white;
  font-weight: bold;
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  margin: 0 10px;
  transition: all 0.2s ease;
}

.transcendence-upgrades-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(74, 144, 217, 0.7);
}

/* Transcendence Upgrades Modal */
.transcendence-upgrades-content {
  max-width: 700px;
  width: 90vw;
  background: linear-gradient(180deg, #0a1a2e 0%, #1a3a5e 100%);
  border-color: #00d4ff !important;
}

.transcendence-upgrades-content h2 {
  color: #00d4ff;
  text-shadow: 0 0 20px rgba(0, 212, 255, 0.6);
}

.tp-display {
  font-size: 18px;
  color: var(--text-primary);
  margin-bottom: 20px;
  padding: 10px;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid #00d4ff;
  border-radius: 6px;
  text-align: center;
}

.tp-display span {
  color: #00d4ff;
  font-weight: bold;
  font-size: 24px;
}

.transcendence-tier-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
  justify-content: center;
}

.transcendence-tier-tab {
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 13px;
}

.transcendence-tier-tab:hover {
  background: rgba(0, 212, 255, 0.2);
  color: #fff;
}

.transcendence-tier-tab.active {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.4), rgba(0, 136, 255, 0.3));
  border-color: #00d4ff;
  color: #fff;
}

.transcendence-upgrades-list {
  max-height: 400px;
  overflow-y: auto;
  padding-right: 10px;
}

.transcendence-upgrade-item {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.transcendence-upgrade-item:hover:not(.maxed) {
  border-color: #00d4ff;
  background: rgba(0, 212, 255, 0.1);
}

.transcendence-upgrade-item.available {
  border-color: var(--accent-green);
}

.transcendence-upgrade-item.maxed {
  opacity: 0.7;
  border-color: #4caf50;
}

.transcendence-upgrade-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.transcendence-upgrade-icon {
  font-size: 24px;
}

.transcendence-upgrade-name {
  font-weight: bold;
  color: #00d4ff;
  flex: 1;
}

.transcendence-upgrade-level {
  font-size: 12px;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.3);
  padding: 3px 8px;
  border-radius: 4px;
}

.transcendence-upgrade-description {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.transcendence-upgrade-btn {
  background: linear-gradient(135deg, #00d4ff, #0088ff);
  color: white;
  font-weight: bold;
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s ease;
}

.transcendence-upgrade-btn:hover:not([disabled]) {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.7);
}

.transcendence-upgrade-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  background: #666;
}

.transcendence-maxed {
  color: #4caf50;
  font-weight: bold;
  font-size: 13px;
}

/* Dark Forge Modal */
.dark-forge-content {
  max-width: 600px;
  width: 90vw;
  background: linear-gradient(180deg, #1a0a2e 0%, #2a1a4e 100%);
  border-color: #9933ff !important;
}

.dark-forge-content h2 {
  color: #cc66ff;
  text-shadow: 0 0 20px rgba(153, 51, 255, 0.6);
}

.dark-energy-display {
  font-size: 18px;
  color: var(--text-primary);
  margin-bottom: 20px;
  padding: 10px;
  background: rgba(153, 51, 255, 0.1);
  border: 1px solid #9933ff;
  border-radius: 6px;
  text-align: center;
}

.dark-energy-display span {
  color: #cc66ff;
  font-weight: bold;
  font-size: 24px;
}

/* Singularity Upgrades */
.singularity-upgrades {
  max-height: 400px;
  overflow-y: auto;
  padding-right: 10px;
}

.singularity-upgrade-item {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 12px 15px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.singularity-upgrade-item:hover:not(.purchased):not(.locked) {
  border-color: #9933ff;
  background: rgba(153, 51, 255, 0.1);
}

.singularity-upgrade-item.affordable {
  border-color: var(--accent-green);
}

.singularity-upgrade-item.affordable:hover {
  background: rgba(0, 255, 136, 0.1);
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.singularity-upgrade-item.purchased {
  border-color: #cc66ff;
  background: rgba(153, 51, 255, 0.15);
  cursor: default;
}

.singularity-upgrade-item.locked {
  opacity: 0.4;
  cursor: not-allowed;
}

.singularity-upgrade-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.singularity-upgrade-name {
  font-size: 14px;
  font-weight: 600;
  color: #cc66ff;
}

.singularity-upgrade-item.purchased .singularity-upgrade-name {
  color: #e699ff;
}

.singularity-upgrade-cost {
  font-size: 13px;
  color: var(--text-muted);
}

.singularity-upgrade-item.affordable .singularity-upgrade-cost {
  color: var(--accent-green);
}

.singularity-upgrade-item.purchased .singularity-upgrade-cost {
  color: var(--accent-green);
}

.singularity-upgrade-description {
  font-size: 12px;
  color: var(--text-secondary);
}

.singularity-upgrade-requires {
  font-size: 11px;
  color: var(--accent-red);
  margin-top: 6px;
  font-style: italic;
}

/* ================================================
   MINIGAME STYLES
   ================================================ */

/* Minigames Button */
.header-btn.minigames {
  background: linear-gradient(135deg, rgba(0, 191, 255, 0.2), rgba(0, 150, 200, 0.3));
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

.header-btn.minigames:hover {
  box-shadow: 0 0 15px rgba(0, 191, 255, 0.5);
}

/* Minigame Bonus Indicator */
.bonus-indicator {
  background: rgba(0, 255, 136, 0.2);
  border: 1px solid var(--accent-green);
  color: var(--accent-green);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  animation: bonusPulse 1s ease-in-out infinite;
}

@keyframes bonusPulse {
  0%, 100% { box-shadow: 0 0 5px rgba(0, 255, 136, 0.3); }
  50% { box-shadow: 0 0 15px rgba(0, 255, 136, 0.6); }
}

/* Minigames Modal */
.minigames-content {
  max-width: 500px;
  width: 90vw;
}

.minigames-content h2 {
  color: var(--accent-blue);
  text-shadow: 0 0 15px rgba(0, 191, 255, 0.5);
}

.minigames-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0;
}

.minigame-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: var(--bg-panel-hover);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.minigame-item.available:hover {
  border-color: var(--accent-blue);
  background: rgba(0, 191, 255, 0.1);
}

.minigame-item.locked {
  opacity: 0.4;
}

.minigame-item.cooldown {
  opacity: 0.6;
}

.minigame-icon {
  font-size: 36px;
}

.minigame-info {
  flex: 1;
}

.minigame-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.minigame-description {
  font-size: 12px;
  color: var(--text-secondary);
}

.minigame-play-btn {
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
}

.minigame-play-btn.available {
  background: var(--accent-blue);
  border: none;
  color: white;
}

.minigame-play-btn.available:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(0, 191, 255, 0.5);
}

.minigame-play-btn.locked,
.minigame-play-btn.cooldown {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: not-allowed;
}

/* Difficulty Select Modal */
.difficulty-select-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 600;
}

.difficulty-options {
  display: flex;
  gap: 15px;
  margin: 20px 0;
}

.difficulty-btn {
  padding: 20px 30px;
  background: var(--bg-panel-hover);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.difficulty-btn:hover {
  border-color: var(--accent-blue);
  background: rgba(0, 191, 255, 0.1);
}

.difficulty-name {
  font-size: 18px;
  font-weight: bold;
  color: var(--text-primary);
  margin-bottom: 5px;
}

.difficulty-info {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Minigame Modal (In-game) */
.minigame-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 700;
}

.minigame-content {
  background: var(--bg-panel);
  border: 2px solid var(--accent-blue);
  border-radius: 12px;
  padding: 25px;
  min-width: 400px;
}

.minigame-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.minigame-header h2 {
  color: var(--accent-blue);
  margin: 0;
}

.minigame-timer {
  font-size: 20px;
  font-weight: bold;
  color: var(--accent-yellow);
}

.minigame-instructions {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 14px;
}

.minigame-status {
  text-align: center;
  color: var(--text-primary);
  margin: 15px 0;
  font-size: 14px;
}

.minigame-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
}

.minigame-footer {
  margin-top: 20px;
  text-align: center;
}

.minigame-result {
  text-align: center;
  padding: 30px;
}

.minigame-result h3 {
  font-size: 28px;
  margin-bottom: 15px;
}

.minigame-result.win h3 {
  color: var(--accent-green);
  text-shadow: 0 0 20px rgba(0, 255, 136, 0.6);
}

.minigame-result.lose h3 {
  color: var(--accent-red);
}

.minigame-result p {
  margin: 10px 0;
  color: var(--text-secondary);
}

/* Power Grid Puzzle */
.grid-container {
  display: grid;
  gap: 2px;
  background: var(--bg-dark);
  padding: 10px;
  border-radius: 8px;
  justify-content: center;
}

.grid-cell {
  width: 50px;
  height: 50px;
  background: var(--bg-panel-hover);
  border: 1px solid var(--border-color);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 28px;
  transition: all 0.2s ease;
}

.grid-cell:hover {
  background: rgba(0, 191, 255, 0.1);
  border-color: var(--accent-blue);
}

.grid-cell.powered {
  background: rgba(0, 255, 136, 0.2);
  border-color: var(--accent-green);
  box-shadow: inset 0 0 10px rgba(0, 255, 136, 0.3);
}

/* Energy Market Game */
.market-content {
  min-width: 500px;
}

.market-stats {
  display: flex;
  justify-content: space-around;
  margin-bottom: 20px;
  padding: 15px;
  background: var(--bg-dark);
  border-radius: 8px;
}

.market-stat {
  text-align: center;
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  display: block;
}

.stat-value {
  font-size: 20px;
  font-weight: bold;
  color: var(--accent-yellow);
}

.market-price-container {
  margin-bottom: 20px;
}

.market-current-price {
  text-align: center;
  margin-bottom: 10px;
}

.price-label {
  color: var(--text-secondary);
  margin-right: 10px;
}

.price-value {
  font-size: 28px;
  font-weight: bold;
  color: var(--accent-yellow);
}

#market-chart {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.market-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.market-actions .btn-success {
  background: var(--accent-green);
  border: none;
  color: var(--bg-dark);
  padding: 10px 15px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

.market-actions .btn-success:hover {
  opacity: 0.9;
}

.market-actions .btn-danger {
  background: var(--accent-red);
  border: none;
  color: white;
  padding: 10px 15px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

.market-actions .btn-danger:hover {
  opacity: 0.9;
}

/* Market Trend Indicator */
.market-trend {
  display: inline-block;
  margin-left: 15px;
  font-size: 14px;
  font-weight: bold;
}

/* Market Event Banner */
.market-event-banner {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 165, 0, 0.3));
  border: 2px solid var(--accent-yellow);
  border-radius: 8px;
  padding: 10px 15px;
  margin: 10px 0;
  text-align: center;
  font-weight: bold;
  color: var(--accent-yellow);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes slideIn {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Trading History */
.market-history {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid var(--border-color);
}

.market-history h4 {
  margin: 0 0 10px 0;
  color: var(--text-primary);
  font-size: 14px;
}

.trading-history-list {
  max-height: 120px;
  overflow-y: auto;
  background: var(--bg-dark);
  border-radius: 6px;
  padding: 8px;
}

.trade-entry {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.trade-entry:last-child {
  border-bottom: none;
}

.trade-type {
  font-weight: bold;
  min-width: 50px;
}

.trade-amount {
  flex: 1;
  text-align: center;
  color: var(--text-secondary);
}

.trade-total {
  font-weight: bold;
  min-width: 70px;
  text-align: right;
}

/* ================================================
   CONDUCTIVITY DISPLAY
   ================================================ */

#conductivity-display {
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.1), rgba(0, 200, 100, 0.2));
  border: 1px solid var(--accent-green);
  border-radius: 6px;
  padding: 6px 12px;
}

#conductivity-display .stat-label {
  color: var(--accent-green);
}

#conductivity-display .stat-value {
  color: #66ffaa;
}

/* ================================================
   SKILL TREE STYLES
   ================================================ */

/* Skill Tree Button */
.header-btn.skill-tree {
  background: linear-gradient(135deg, rgba(0, 128, 255, 0.2), rgba(0, 100, 200, 0.3));
  border-color: #0080ff;
  color: #4da6ff;
}

.header-btn.skill-tree:hover {
  box-shadow: 0 0 15px rgba(0, 128, 255, 0.5);
}

/* Research Points Display */
#rp-display {
  background: linear-gradient(135deg, rgba(0, 128, 255, 0.1), rgba(0, 100, 200, 0.2));
  border: 1px solid #0080ff;
  border-radius: 6px;
  padding: 6px 12px;
}

#rp-display .stat-label {
  color: #4da6ff;
}

#rp-display .stat-value {
  color: #80c4ff;
}

/* Skill Tree Modal */
.skill-tree-content {
  max-width: 700px;
  width: 95vw;
  background: linear-gradient(180deg, #0a1a2e 0%, #1a2a3e 100%);
  border-color: #0080ff !important;
}

.skill-tree-content h2 {
  color: #4da6ff;
  text-shadow: 0 0 15px rgba(0, 128, 255, 0.5);
}

.rp-display-modal {
  text-align: center;
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 15px;
  padding: 10px;
  background: rgba(0, 128, 255, 0.1);
  border: 1px solid #0080ff;
  border-radius: 6px;
}

.rp-display-modal span {
  color: #4da6ff;
  font-weight: bold;
}

/* Skill Branch Tabs */
.skill-branch-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 15px;
  flex-wrap: wrap;
  justify-content: center;
}

.skill-branch-btn {
  padding: 8px 16px;
  background: var(--bg-panel-hover);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s ease;
}

.skill-branch-btn:hover {
  border-color: #0080ff;
  color: #4da6ff;
}

.skill-branch-btn.active {
  background: #0080ff;
  border-color: #0080ff;
  color: white;
}

/* Skill Tree Container */
.skill-tree-container {
  max-height: 400px;
  overflow-y: auto;
  padding-right: 10px;
}

/* Skill Item */
.skill-item {
  background: var(--bg-panel-hover);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.skill-item:hover:not(.locked):not(.maxed) {
  border-color: #0080ff;
  background: rgba(0, 128, 255, 0.1);
}

.skill-item.affordable {
  border-color: var(--accent-green);
}

.skill-item.affordable:hover {
  background: rgba(0, 255, 136, 0.1);
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.skill-item.purchased {
  border-color: #4da6ff;
  background: rgba(0, 128, 255, 0.15);
}

.skill-item.maxed {
  border-color: var(--accent-yellow);
  background: rgba(255, 215, 0, 0.1);
  cursor: default;
}

.skill-item.locked {
  opacity: 0.4;
  cursor: not-allowed;
}

.skill-icon {
  font-size: 28px;
  width: 40px;
  text-align: center;
}

.skill-info {
  flex: 1;
}

.skill-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.skill-name {
  font-size: 15px;
  font-weight: 600;
  color: #4da6ff;
}

.skill-item.maxed .skill-name {
  color: var(--accent-yellow);
}

.skill-level {
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-dark);
  padding: 2px 8px;
  border-radius: 10px;
}

.skill-description {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.skill-effect {
  font-size: 13px;
  color: var(--accent-green);
  margin-bottom: 6px;
}

.skill-cost {
  font-size: 12px;
  color: var(--text-muted);
}

.skill-item.affordable .skill-cost {
  color: var(--accent-green);
}

.skill-requires {
  font-size: 11px;
  color: var(--accent-red);
  margin-top: 6px;
  font-style: italic;
}

/* Skill Tree Actions */
.skill-tree-actions {
  margin-top: 15px;
  text-align: center;
}

/* Skill Notification */
.skill-notification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px 30px;
  background: linear-gradient(135deg, rgba(0, 40, 80, 0.95), rgba(0, 60, 120, 0.95));
  border: 2px solid #0080ff;
  border-radius: 10px;
  z-index: 400;
  animation: skillNotifAppear 3s ease-out forwards;
  box-shadow: 0 0 30px rgba(0, 128, 255, 0.6);
}

.skill-notif-icon {
  font-size: 36px;
}

.skill-notif-title {
  font-size: 14px;
  color: #4da6ff;
  text-transform: uppercase;
}

.skill-notif-name {
  font-size: 18px;
  font-weight: bold;
  color: var(--text-primary);
}

@keyframes skillNotifAppear {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
  25% { transform: translate(-50%, -50%) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

/* ================================================
   MANAGER STYLES
   ================================================ */

/* Managers Button */
.header-btn.managers {
  background: linear-gradient(135deg, rgba(255, 165, 0, 0.2), rgba(255, 140, 0, 0.3));
  border-color: #ffa500;
  color: #ffb84d;
}

.header-btn.managers:hover {
  box-shadow: 0 0 15px rgba(255, 165, 0, 0.5);
}

/* Managers Modal */
.managers-content {
  max-width: 600px;
  width: 95vw;
  background: linear-gradient(180deg, #2a1a0a 0%, #3a2a1a 100%);
  border-color: #ffa500 !important;
}

.managers-content h2 {
  color: #ffb84d;
  text-shadow: 0 0 15px rgba(255, 165, 0, 0.5);
}

.managers-description {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* Managers List */
.managers-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-height: 450px;
  overflow-y: auto;
  padding-right: 10px;
}

/* Manager Item */
.manager-item {
  background: var(--bg-panel-hover);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 15px;
  transition: all 0.2s ease;
}

.manager-item.unlocked {
  border-color: #ffa500;
}

.manager-item.locked {
  opacity: 0.4;
}

.manager-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.manager-icon {
  font-size: 32px;
}

.manager-title {
  flex: 1;
}

.manager-name {
  font-size: 16px;
  font-weight: 600;
  color: #ffb84d;
}

.manager-description {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Manager Toggle */
.manager-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toggle-switch {
  position: relative;
  width: 50px;
  height: 26px;
  background: var(--bg-dark);
  border-radius: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.toggle-switch.enabled {
  background: var(--accent-green);
}

.toggle-switch::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  background: white;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: all 0.3s ease;
}

.toggle-switch.enabled::after {
  left: 26px;
}

.toggle-label {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Manager Stats */
.manager-stats {
  display: flex;
  gap: 15px;
  margin-bottom: 10px;
  padding: 10px;
  background: var(--bg-dark);
  border-radius: 6px;
}

.manager-stat {
  flex: 1;
  text-align: center;
}

.manager-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
}

.manager-stat-value {
  font-size: 14px;
  font-weight: bold;
  color: var(--accent-yellow);
}

/* Manager Upgrades */
.manager-upgrades {
  margin-top: 10px;
}

.manager-upgrade-btn {
  padding: 8px 15px;
  background: var(--bg-panel-hover);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
  margin-right: 8px;
  margin-bottom: 8px;
}

.manager-upgrade-btn:hover:not(:disabled) {
  border-color: #ffa500;
  color: #ffb84d;
}

.manager-upgrade-btn.affordable {
  border-color: var(--accent-green);
  color: var(--accent-green);
}

.manager-upgrade-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.manager-unlock-req {
  font-size: 12px;
  color: var(--accent-red);
  text-align: center;
  font-style: italic;
}

/* Manager Notification */
.manager-notification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px 30px;
  background: linear-gradient(135deg, rgba(80, 50, 0, 0.95), rgba(100, 60, 0, 0.95));
  border: 2px solid #ffa500;
  border-radius: 10px;
  z-index: 400;
  animation: managerNotifAppear 4s ease-out forwards;
  box-shadow: 0 0 30px rgba(255, 165, 0, 0.6);
}

.manager-notif-icon {
  font-size: 36px;
}

.manager-notif-title {
  font-size: 14px;
  color: #ffb84d;
  text-transform: uppercase;
}

.manager-notif-name {
  font-size: 18px;
  font-weight: bold;
  color: var(--text-primary);
}

@keyframes managerNotifAppear {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
  25% { transform: translate(-50%, -50%) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

/* ================================================
   SEASONS & EVENTS STYLES
   ================================================ */

/* Seasons Button */
.header-btn.seasons {
  background: linear-gradient(135deg, rgba(100, 200, 100, 0.2), rgba(80, 180, 80, 0.3));
  border-color: #66cc66;
  color: #88dd88;
}

.header-btn.seasons:hover {
  box-shadow: 0 0 15px rgba(100, 200, 100, 0.5);
}

/* Season Display (Header) */
#season-display {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(100, 200, 100, 0.1), rgba(80, 180, 80, 0.2));
  border: 1px solid #66cc66;
  border-radius: 6px;
  padding: 6px 12px;
}

.season-icon {
  font-size: 18px;
}

.season-name {
  font-size: 13px;
  color: #88dd88;
  font-weight: 600;
}

/* Event Banner */
.event-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(255, 100, 100, 0.2), rgba(200, 50, 50, 0.3));
  border: 1px solid #ff6666;
  border-radius: 6px;
  padding: 6px 12px;
  animation: eventBannerPulse 2s ease-in-out infinite;
}

.event-banner .event-icon {
  font-size: 16px;
}

.event-banner .event-name {
  font-size: 12px;
  color: #ff8888;
  font-weight: 600;
}

.event-banner .event-timer {
  font-size: 11px;
  color: var(--accent-yellow);
  font-weight: bold;
}

@keyframes eventBannerPulse {
  0%, 100% { box-shadow: 0 0 5px rgba(255, 100, 100, 0.3); }
  50% { box-shadow: 0 0 15px rgba(255, 100, 100, 0.6); }
}

/* Seasons Modal */
.seasons-content {
  max-width: 650px;
  width: 95vw;
  background: linear-gradient(180deg, #0a2a1a 0%, #1a3a2a 100%);
  border-color: #66cc66 !important;
}

.seasons-content h2 {
  color: #88dd88;
  text-shadow: 0 0 15px rgba(100, 200, 100, 0.5);
}

.seasons-content h3 {
  color: var(--text-primary);
  font-size: 16px;
  margin: 20px 0 10px 0;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 5px;
}

/* Current Season Info */
.current-season-info {
  background: var(--bg-panel-hover);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
}

.season-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.season-icon-large {
  font-size: 48px;
}

.season-details h3 {
  margin: 0 0 5px 0;
  border: none;
  padding: 0;
  font-size: 20px;
  color: #88dd88;
}

.season-details p {
  margin: 0;
  font-size: 14px;
  color: var(--accent-green);
}

/* Season Progress */
.season-progress {
  margin-bottom: 10px;
}

.season-progress-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-dark);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 5px;
}

.season-progress-bar .progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #66cc66, #88dd88);
  transition: width 0.3s ease;
}

#season-days-remaining {
  font-size: 12px;
  color: var(--text-secondary);
}

.season-points-display {
  font-size: 16px;
  color: var(--text-primary);
  text-align: center;
  margin-top: 10px;
}

.season-points-display span {
  color: var(--accent-yellow);
  font-weight: bold;
}

/* Season Shop Tabs */
.season-shop-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  justify-content: center;
}

.season-shop-tab {
  padding: 8px 20px;
  background: var(--bg-panel-hover);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s ease;
}

.season-shop-tab:hover {
  border-color: #66cc66;
  color: #88dd88;
}

.season-shop-tab.active {
  background: #66cc66;
  border-color: #66cc66;
  color: var(--bg-dark);
}

/* Season Shop Container */
.season-shop-container {
  max-height: 250px;
  overflow-y: auto;
  padding-right: 10px;
}

/* Shop Item */
.shop-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-panel-hover);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.shop-item:hover:not(.purchased):not(.locked) {
  border-color: #66cc66;
  background: rgba(100, 200, 100, 0.1);
}

.shop-item.affordable {
  border-color: var(--accent-green);
}

.shop-item.affordable:hover {
  background: rgba(0, 255, 136, 0.1);
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.shop-item.purchased {
  border-color: var(--accent-yellow);
  background: rgba(255, 215, 0, 0.1);
  cursor: default;
}

.shop-item.locked {
  opacity: 0.4;
  cursor: not-allowed;
}

.shop-item-icon {
  font-size: 24px;
}

.shop-item-info {
  flex: 1;
}

.shop-item-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.shop-item-description {
  font-size: 12px;
  color: var(--text-secondary);
}

.shop-item-cost {
  font-size: 14px;
  color: var(--accent-yellow);
  font-weight: bold;
}

.shop-item.affordable .shop-item-cost {
  color: var(--accent-green);
}

/* Active Event Section */
.active-event-section {
  margin-top: 20px;
}

.active-event-display {
  background: var(--bg-panel-hover);
  border-radius: 8px;
  padding: 15px;
}

.active-event-display .no-event {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
}

.event-info {
  display: flex;
  gap: 15px;
  align-items: center;
}

.event-info-icon {
  font-size: 36px;
}

.event-info-details {
  flex: 1;
}

.event-info-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.event-info-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.event-progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-dark);
  border-radius: 3px;
  overflow: hidden;
}

.event-progress-bar .fill {
  height: 100%;
  background: var(--accent-yellow);
  transition: width 0.3s ease;
}

.event-info-timer {
  font-size: 14px;
  color: var(--accent-yellow);
  font-weight: bold;
  text-align: right;
}

/* Season Notification */
.season-notification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 25px 40px;
  background: linear-gradient(135deg, rgba(20, 60, 40, 0.95), rgba(30, 80, 50, 0.95));
  border: 2px solid #66cc66;
  border-radius: 12px;
  z-index: 400;
  animation: seasonNotifAppear 5s ease-out forwards;
  box-shadow: 0 0 40px rgba(100, 200, 100, 0.6);
}

.season-notif-icon {
  font-size: 48px;
}

.season-notif-title {
  font-size: 24px;
  font-weight: bold;
  color: #88dd88;
  margin-bottom: 5px;
}

.season-notif-bonus {
  font-size: 14px;
  color: var(--text-secondary);
}

@keyframes seasonNotifAppear {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
  25% { transform: translate(-50%, -50%) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

/* Event Notification */
.event-notification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px 30px;
  background: linear-gradient(135deg, rgba(80, 20, 20, 0.95), rgba(100, 30, 30, 0.95));
  border: 2px solid #ff6666;
  border-radius: 10px;
  z-index: 400;
  animation: eventNotifAppear 5s ease-out forwards;
  box-shadow: 0 0 30px rgba(255, 100, 100, 0.6);
}

.event-notification.complete {
  background: linear-gradient(135deg, rgba(20, 60, 20, 0.95), rgba(30, 80, 30, 0.95));
  border-color: var(--accent-green);
  box-shadow: 0 0 30px rgba(0, 255, 136, 0.6);
}

.event-notif-icon {
  font-size: 36px;
}

.event-notif-title {
  font-size: 14px;
  color: #ff8888;
  text-transform: uppercase;
}

.event-notification.complete .event-notif-title {
  color: var(--accent-green);
}

.event-notif-name {
  font-size: 18px;
  font-weight: bold;
  color: var(--text-primary);
}

.event-notif-desc {
  font-size: 12px;
  color: var(--text-secondary);
}

.event-notif-rewards {
  font-size: 14px;
  color: var(--accent-yellow);
  margin-top: 5px;
}

@keyframes eventNotifAppear {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
  25% { transform: translate(-50%, -50%) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

/* Generic Notification */
.generic-notification {
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  padding: 15px 25px;
  background: var(--bg-panel);
  border: 2px solid var(--accent-yellow);
  border-radius: 8px;
  z-index: 400;
  animation: genericNotifAppear 3s ease-out forwards;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
  text-align: center;
}

.notif-title {
  font-size: 14px;
  font-weight: bold;
  color: var(--accent-yellow);
  margin-bottom: 5px;
}

.notif-text {
  font-size: 13px;
  color: var(--text-secondary);
}

@keyframes genericNotifAppear {
  0% { opacity: 0; transform: translateX(-50%) translateY(20px); }
  15% { opacity: 1; transform: translateX(-50%) translateY(0); }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
}

/* ========================================
   ENHANCED UI ANIMATIONS
   ======================================== */

/* Button Hover Enhancements */
.header-btn {
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
  border-radius: 50%;
  pointer-events: none;
}

.header-btn:hover::before {
  width: 200%;
  height: 200%;
}

.header-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 191, 255, 0.3);
}

.header-btn:active {
  transform: translateY(0);
  transition-duration: 0.1s;
}

/* Building Item Hover Enhancement */
.building-item {
  position: relative;
  overflow: hidden;
}

.building-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  transition: left 0.5s ease;
  pointer-events: none;
}

.building-item:hover::after {
  left: 100%;
}

.building-item.affordable {
  animation: affordablePulse 2s ease-in-out infinite;
}

@keyframes affordablePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 255, 136, 0); }
  50% { box-shadow: 0 0 15px 2px rgba(0, 255, 136, 0.3); }
}

/* Upgrade Item Hover Enhancement */
.upgrade-item {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.upgrade-item:hover {
  transform: translateX(4px);
}

.upgrade-item.affordable:hover {
  box-shadow: 0 4px 20px rgba(0, 255, 136, 0.25);
}

/* ===== UNIVERSAL AFFORDABLE GLOW ===== */
/* Subtle green glow for all affordable/purchasable items */
.upgrade-item.affordable,
.plasma-upgrade-item.affordable,
.singularity-upgrade-item.affordable,
.skill-item.affordable,
.shop-item.affordable,
.minion-card.affordable,
.perk-item.affordable,
.research-item.affordable,
.contract-item.affordable,
.quest-item.affordable,
.cosmic-upgrade-item.affordable {
  animation: affordableGlow 2.5s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(0, 255, 136, 0.2);
}

@keyframes affordableGlow {
  0%, 100% {
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.2);
    border-color: var(--accent-green);
  }
  50% {
    box-shadow: 0 0 18px rgba(0, 255, 136, 0.4), 0 0 4px rgba(0, 255, 136, 0.6) inset;
    border-color: #00ff88;
  }
}

/* Enhanced glow on hover for affordable items */
.upgrade-item.affordable:hover,
.plasma-upgrade-item.affordable:hover,
.singularity-upgrade-item.affordable:hover,
.skill-item.affordable:hover,
.shop-item.affordable:hover,
.minion-card.affordable:hover,
.perk-item.affordable:hover,
.research-item.affordable:hover,
.contract-item.affordable:hover,
.quest-item.affordable:hover,
.cosmic-upgrade-item.affordable:hover {
  animation: none;
  box-shadow: 0 0 25px rgba(0, 255, 136, 0.5), 0 0 8px rgba(0, 255, 136, 0.8) inset;
  border-color: #00ff88;
}

/* Progress Bar Animations */
.progress-fill {
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  animation: progressShimmer 2s ease-in-out infinite;
}

@keyframes progressShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Tab Transitions */
.tab-btn, .skill-branch-tab {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.tab-btn::after, .skill-branch-tab::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent-blue);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.tab-btn:hover::after, .skill-branch-tab:hover::after {
  width: 80%;
}

.tab-btn.active::after, .skill-branch-tab.active::after {
  width: 100%;
  background: var(--accent-yellow);
}

/* Skill Item Animations */
.skill-item {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-item.available {
  animation: skillAvailable 2s ease-in-out infinite;
}

.skill-item.available:hover {
  transform: scale(1.02);
  animation: none;
  box-shadow: 0 4px 20px rgba(0, 191, 255, 0.3);
}

@keyframes skillAvailable {
  0%, 100% { border-color: var(--accent-blue); }
  50% { border-color: var(--accent-yellow); box-shadow: 0 0 15px rgba(255, 215, 0, 0.2); }
}

/* Manager Card Hover */
.manager-card {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.manager-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

/* Stat Value Counter Animation */
.stat-value {
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.stat-value.updating {
  color: var(--accent-yellow);
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* Notification Slide Enhancements */
.notification-item {
  animation: notifEnter 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes notifEnter {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Season Shop Item Hover */
.seasonal-shop-item {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.seasonal-shop-item.available:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 20px rgba(0, 255, 136, 0.25);
}

/* Singularity Upgrade Hover */
.singularity-upgrade {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.singularity-upgrade.available:hover {
  transform: scale(1.02);
  box-shadow: 0 0 30px rgba(142, 68, 173, 0.4);
}

/* Tooltip Fade In */
.tooltip {
  animation: tooltipFadeIn 0.2s ease-out;
}

@keyframes tooltipFadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================================================
   STATISTICS STYLES
   ================================================ */

/* Statistics Button */
.header-btn.statistics {
  background: linear-gradient(135deg, rgba(0, 191, 255, 0.2), rgba(0, 150, 200, 0.3));
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

.header-btn.statistics:hover {
  box-shadow: 0 0 15px rgba(0, 191, 255, 0.5);
}

/* Statistics Modal */
.statistics-content {
  max-width: 600px;
  width: 95vw;
  background: linear-gradient(180deg, #0a1520 0%, #152030 100%);
  border-color: var(--accent-blue) !important;
}

.statistics-content h2 {
  color: var(--accent-blue);
  text-shadow: 0 0 15px rgba(0, 191, 255, 0.5);
}

/* Stats Tabs */
.stats-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.stats-tab {
  padding: 8px 16px;
  background: var(--bg-panel-hover);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s ease;
}

.stats-tab:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

.stats-tab.active {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: white;
}

/* Statistics Container */
.statistics-container {
  max-height: 450px;
  overflow-y: auto;
  padding-right: 10px;
}

.statistics-container .stats-section {
  background: var(--bg-panel-hover);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
}

.statistics-container .stats-section h3 {
  font-size: 14px;
  color: var(--accent-blue);
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.statistics-container .stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.statistics-container .stat-row:last-child {
  border-bottom: none;
}

.statistics-container .stat-row span:first-child {
  color: var(--text-secondary);
  font-size: 13px;
}

.statistics-container .stat-row span:last-child {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 13px;
}

.statistics-container .no-stats {
  color: var(--text-muted);
  text-align: center;
  font-style: italic;
  padding: 10px;
}

/* ================================================
   CHALLENGES STYLES
   ================================================ */

/* Challenges Button */
.header-btn.challenges {
  background: linear-gradient(135deg, rgba(255, 100, 100, 0.2), rgba(200, 50, 50, 0.3));
  border-color: #ff6666;
  color: #ff8888;
}

.header-btn.challenges:hover {
  box-shadow: 0 0 15px rgba(255, 100, 100, 0.5);
}

/* Challenges Modal */
.challenges-content {
  max-width: 650px;
  width: 95vw;
  background: linear-gradient(180deg, #1a0a0a 0%, #2a1a1a 100%);
  border-color: #ff6666 !important;
}

.challenges-content h2 {
  color: #ff8888;
  text-shadow: 0 0 15px rgba(255, 100, 100, 0.5);
}

.challenges-summary {
  text-align: center;
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 15px;
}

.challenges-summary span {
  color: #ff8888;
  font-weight: bold;
}

/* Active Challenge Banner */
.active-challenge-banner {
  background: linear-gradient(135deg, rgba(255, 100, 100, 0.2), rgba(200, 50, 50, 0.3));
  border: 2px solid #ff6666;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  animation: activeChallengeGlow 2s ease-in-out infinite;
}

@keyframes activeChallengeGlow {
  0%, 100% { box-shadow: 0 0 10px rgba(255, 100, 100, 0.3); }
  50% { box-shadow: 0 0 25px rgba(255, 100, 100, 0.6); }
}

.active-challenge-banner h3 {
  color: #ff8888;
  margin: 0 0 10px 0;
  font-size: 16px;
}

.active-challenge-banner .challenge-progress {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.active-challenge-banner .challenge-progress span {
  color: var(--text-secondary);
  font-size: 14px;
}

.challenge-timer {
  color: var(--accent-yellow) !important;
  font-weight: bold;
}

.danger-btn {
  background: #ff4444;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
}

.danger-btn:hover {
  background: #ff6666;
  box-shadow: 0 0 15px rgba(255, 68, 68, 0.5);
}

/* Challenge Tier Tabs */
.challenge-tiers-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.challenge-tier-tab {
  padding: 8px 16px;
  background: var(--bg-panel-hover);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s ease;
}

.challenge-tier-tab:hover {
  border-color: #ff6666;
  color: #ff8888;
}

.challenge-tier-tab.active {
  background: #ff6666;
  border-color: #ff6666;
  color: white;
}

/* Challenges List */
.challenges-list {
  max-height: 400px;
  overflow-y: auto;
  padding-right: 10px;
}

.tier-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.tier-header h3 {
  margin: 0;
  font-size: 18px;
}

.tier-unlock {
  font-size: 12px;
  color: var(--text-muted);
}

/* Challenge Item */
.challenge-item {
  background: var(--bg-panel-hover);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.challenge-item.locked {
  opacity: 0.4;
}

.challenge-item.available {
  border-color: var(--accent-yellow);
}

.challenge-item.available:hover {
  background: rgba(255, 215, 0, 0.1);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

.challenge-item.active {
  border-color: #ff6666;
  background: rgba(255, 100, 100, 0.1);
  animation: activeChallengeItem 2s ease-in-out infinite;
}

@keyframes activeChallengeItem {
  0%, 100% { box-shadow: 0 0 5px rgba(255, 100, 100, 0.3); }
  50% { box-shadow: 0 0 15px rgba(255, 100, 100, 0.5); }
}

.challenge-item.completed {
  border-color: var(--accent-green);
  background: rgba(0, 255, 136, 0.05);
}

.challenge-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.challenge-icon {
  font-size: 24px;
}

.challenge-name {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.challenge-item.completed .challenge-name {
  color: var(--accent-green);
}

.challenge-status {
  font-size: 18px;
}

.challenge-description {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 10px 0;
}

.challenge-time-limit {
  font-size: 12px;
  color: var(--accent-yellow);
  margin: 0 0 8px 0;
}

.challenge-reward {
  display: flex;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 8px;
}

.challenge-reward .reward-label {
  color: var(--text-muted);
}

.challenge-reward .reward-value {
  color: var(--accent-green);
  font-weight: 600;
}

.challenge-tips {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
  margin: 0 0 10px 0;
}

.start-challenge-btn {
  width: 100%;
  padding: 10px;
  background: linear-gradient(135deg, #ff6666, #cc4444);
  border: none;
  border-radius: 6px;
  color: white;
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.start-challenge-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 0 20px rgba(255, 100, 100, 0.5);
}

/* ================================================
   MILESTONES STYLES
   ================================================ */

/* Milestones Button */
.header-btn.milestones {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(200, 170, 0, 0.3));
  border-color: var(--accent-yellow);
  color: var(--accent-yellow);
}

.header-btn.milestones:hover {
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

/* Milestones Modal */
.milestones-content {
  max-width: 600px;
  width: 95vw;
  background: linear-gradient(180deg, #1a1a0a 0%, #2a2a1a 100%);
  border-color: var(--accent-yellow) !important;
}

.milestones-content h2 {
  color: var(--accent-yellow);
  text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.milestones-summary {
  text-align: center;
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 15px;
}

.milestones-summary span {
  color: var(--accent-yellow);
  font-weight: bold;
}

/* Milestone Type Tabs */
.milestone-type-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.milestone-type-tab {
  padding: 6px 12px;
  background: var(--bg-panel-hover);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
}

.milestone-type-tab:hover {
  border-color: var(--accent-yellow);
  color: var(--accent-yellow);
}

.milestone-type-tab.active {
  background: var(--accent-yellow);
  border-color: var(--accent-yellow);
  color: var(--bg-dark);
}

/* Milestones List */
.milestones-list {
  max-height: 400px;
  overflow-y: auto;
  padding-right: 10px;
}

/* Milestone Item */
.milestone-item {
  background: var(--bg-panel-hover);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 10px;
  transition: all 0.2s ease;
}

.milestone-item:hover {
  border-color: var(--accent-yellow);
}

.milestone-item.unlocked {
  border-color: var(--accent-green);
  background: rgba(0, 255, 136, 0.05);
}

.milestone-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.milestone-type-icon {
  font-size: 20px;
}

.milestone-name {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.milestone-item.unlocked .milestone-name {
  color: var(--accent-green);
}

.milestone-check {
  color: var(--accent-green);
  font-size: 18px;
  font-weight: bold;
}

.milestone-description {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0 0 10px 0;
}

/* Milestone Progress Bar */
.milestone-progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-dark);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}

.milestone-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-yellow), #ffdd66);
  transition: width 0.3s ease;
}

.milestone-progress-text {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 8px;
}

/* Milestone Reward */
.milestone-reward {
  display: flex;
  gap: 8px;
  font-size: 13px;
  padding: 8px;
  background: var(--bg-dark);
  border-radius: 4px;
}

.milestone-reward .reward-label {
  color: var(--text-muted);
}

.milestone-reward .reward-value {
  color: var(--accent-yellow);
  font-weight: 600;
}

.milestone-reward.earned {
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid var(--accent-green);
}

.milestone-reward.earned .reward-label {
  color: var(--accent-green);
}

.milestone-reward.earned .reward-value {
  color: var(--accent-green);
}

.no-milestones {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  padding: 20px;
}

/* Milestone Notification */
.milestone-notification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px 30px;
  background: linear-gradient(135deg, rgba(50, 40, 0, 0.95), rgba(70, 55, 0, 0.95));
  border: 2px solid var(--accent-yellow);
  border-radius: 10px;
  z-index: 400;
  animation: milestoneNotifAppear 4s ease-out forwards;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
}

.milestone-notif-icon {
  font-size: 36px;
}

.milestone-notif-title {
  font-size: 14px;
  color: var(--accent-yellow);
  text-transform: uppercase;
}

.milestone-notif-name {
  font-size: 18px;
  font-weight: bold;
  color: var(--text-primary);
}

.milestone-notif-reward {
  font-size: 13px;
  color: var(--accent-green);
  margin-top: 4px;
}

@keyframes milestoneNotifAppear {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
  25% { transform: translate(-50%, -50%) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

/* Challenge Notification */
.challenge-notification {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 20px;
  background: linear-gradient(135deg, rgba(50, 10, 10, 0.95), rgba(70, 20, 20, 0.95));
  border: 2px solid #ff6666;
  border-radius: 10px;
  margin-bottom: 10px;
  animation: challengeNotifSlide 0.5s ease-out;
  box-shadow: 0 0 20px rgba(255, 100, 100, 0.5);
}

.challenge-notification .notification-icon {
  font-size: 32px;
}

.challenge-notification .notification-title {
  font-size: 12px;
  color: #ff6666;
  text-transform: uppercase;
}

.challenge-notification .notification-name {
  font-size: 16px;
  font-weight: bold;
  color: var(--text-primary);
}

.challenge-notification .notification-reward {
  font-size: 13px;
  color: var(--accent-green);
  margin-top: 4px;
}

@keyframes challengeNotifSlide {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ================================================
   QUESTS STYLES
   ================================================ */

/* Quests Button */
.header-btn.quests {
  background: linear-gradient(135deg, rgba(0, 200, 150, 0.2), rgba(0, 150, 100, 0.3));
  border-color: #00c896;
  color: #00ffb9;
}

.header-btn.quests:hover {
  box-shadow: 0 0 15px rgba(0, 200, 150, 0.5);
}

/* Quests Modal */
.quests-content {
  max-width: 600px;
  width: 95vw;
  background: linear-gradient(180deg, #0a1a15 0%, #1a2a25 100%);
  border-color: #00c896 !important;
}

.quests-content h2 {
  color: #00ffb9;
  text-shadow: 0 0 15px rgba(0, 200, 150, 0.5);
}

/* Quest Type Tabs */
.quest-type-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  justify-content: center;
}

.quest-type-tab {
  padding: 10px 24px;
  background: var(--bg-panel-hover);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.quest-type-tab:hover {
  border-color: #00c896;
  color: #00ffb9;
}

.quest-type-tab.active {
  background: #00c896;
  border-color: #00c896;
  color: var(--bg-dark);
}

.quest-type-tab span {
  font-size: 12px;
  opacity: 0.8;
}

/* Quest Refresh Timer */
.quest-refresh-timer {
  text-align: center;
  padding: 8px;
  background: var(--bg-panel-hover);
  border-radius: 6px;
  margin-bottom: 15px;
  font-size: 13px;
  color: var(--text-secondary);
}

.quest-refresh-timer span:last-child {
  color: var(--accent-yellow);
  font-weight: bold;
  margin-left: 8px;
}

/* Quests List */
.quests-list {
  max-height: 400px;
  overflow-y: auto;
  padding-right: 10px;
}

/* Quest Item */
.quest-item {
  background: var(--bg-panel-hover);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.quest-item:hover {
  border-color: #00c896;
}

.quest-item.completed {
  border-color: var(--accent-green);
  background: rgba(0, 255, 136, 0.05);
}

.quest-item.completed.claimed {
  opacity: 0.5;
}

.quest-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.quest-difficulty {
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 10px;
}

.quest-difficulty.easy {
  background: rgba(0, 255, 136, 0.2);
  color: var(--accent-green);
}

.quest-difficulty.medium {
  background: rgba(255, 215, 0, 0.2);
  color: var(--accent-yellow);
}

.quest-difficulty.hard {
  background: rgba(255, 100, 100, 0.2);
  color: #ff8888;
}

.quest-name {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.quest-item.completed .quest-name {
  color: var(--accent-green);
}

.quest-status {
  font-size: 18px;
}

.quest-description {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 10px 0;
}

/* Quest Progress Bar */
.quest-progress-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-dark);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}

.quest-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #00c896, #00ffb9);
  transition: width 0.3s ease;
}

.quest-item.completed .quest-progress-fill {
  background: linear-gradient(90deg, var(--accent-green), #66ffaa);
}

.quest-progress-text {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

/* Quest Reward */
.quest-reward {
  display: flex;
  gap: 15px;
  font-size: 12px;
  padding: 8px 12px;
  background: var(--bg-dark);
  border-radius: 4px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.quest-reward-item {
  display: flex;
  gap: 4px;
  align-items: center;
}

.quest-reward-item .reward-icon {
  font-size: 14px;
}

.quest-reward-item .reward-value {
  color: var(--accent-yellow);
  font-weight: 600;
}

/* Claim Reward Button */
.claim-reward-btn {
  width: 100%;
  padding: 10px;
  background: linear-gradient(135deg, #00c896, #00a878);
  border: none;
  border-radius: 6px;
  color: white;
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.claim-reward-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 0 20px rgba(0, 200, 150, 0.5);
}

.claim-reward-btn:disabled {
  background: var(--bg-dark);
  color: var(--text-muted);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Quest Notification */
.quest-notification {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 20px;
  background: linear-gradient(135deg, rgba(0, 50, 40, 0.95), rgba(0, 70, 55, 0.95));
  border: 2px solid #00c896;
  border-radius: 10px;
  margin-bottom: 10px;
  animation: questNotifSlide 0.5s ease-out;
  box-shadow: 0 0 20px rgba(0, 200, 150, 0.5);
}

.quest-notification .notification-icon {
  font-size: 32px;
}

.quest-notification .notification-title {
  font-size: 12px;
  color: #00ffb9;
  text-transform: uppercase;
}

.quest-notification .notification-name {
  font-size: 16px;
  font-weight: bold;
  color: var(--text-primary);
}

.quest-notification .notification-reward {
  font-size: 13px;
  color: var(--accent-yellow);
  margin-top: 4px;
}

@keyframes questNotifSlide {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* No quests message */
.no-quests {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  padding: 30px;
}

/* ================================================
   PRESTIGE PERKS STYLES
   ================================================ */

/* Perks Button */
.header-btn.perks {
  background: linear-gradient(135deg, rgba(186, 85, 211, 0.2), rgba(138, 43, 226, 0.3));
  border-color: #ba55d3;
  color: #dda0dd;
}

.header-btn.perks:hover {
  box-shadow: 0 0 15px rgba(186, 85, 211, 0.5);
}

/* Perks Modal */
.perks-content {
  max-width: 700px;
  width: 95vw;
  background: linear-gradient(180deg, #1a0a20 0%, #2a1a30 100%);
  border-color: #ba55d3 !important;
}

.perks-content h2 {
  color: #dda0dd;
  text-shadow: 0 0 15px rgba(186, 85, 211, 0.5);
}

.perks-summary {
  text-align: center;
  margin-bottom: 15px;
  color: var(--text-secondary);
}

.perks-summary span {
  color: var(--accent-purple);
  font-weight: bold;
}

/* Perk Category Tabs */
.perk-category-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.perk-category-tab {
  padding: 8px 16px;
  background: var(--bg-panel-hover);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s ease;
}

.perk-category-tab:hover {
  border-color: #ba55d3;
  color: #dda0dd;
}

.perk-category-tab.active {
  background: #ba55d3;
  border-color: #ba55d3;
  color: var(--bg-dark);
}

/* Perks List */
.perks-list {
  max-height: 400px;
  overflow-y: auto;
  padding-right: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

/* Perk Item */
.perk-item {
  background: var(--bg-panel-hover);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  transition: all 0.2s ease;
}

.perk-item:hover:not(.locked):not(.maxed) {
  border-color: #ba55d3;
  transform: translateY(-2px);
}

.perk-item.locked {
  opacity: 0.5;
}

.perk-item.maxed {
  border-color: var(--accent-green);
  background: rgba(0, 255, 136, 0.05);
}

.perk-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.perk-icon {
  font-size: 24px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-dark);
  border-radius: 8px;
}

.perk-title {
  flex: 1;
}

.perk-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.perk-item.maxed .perk-name {
  color: var(--accent-green);
}

.perk-level {
  font-size: 11px;
  color: var(--text-muted);
}

.perk-description {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

/* Perk Level Progress */
.perk-level-bar {
  display: flex;
  gap: 3px;
  margin-bottom: 10px;
}

.perk-level-pip {
  flex: 1;
  height: 6px;
  background: var(--bg-dark);
  border-radius: 3px;
}

.perk-level-pip.filled {
  background: linear-gradient(90deg, #ba55d3, #dda0dd);
}

/* Perk Buy Button */
.perk-buy-btn {
  width: 100%;
  padding: 8px;
  background: linear-gradient(135deg, #ba55d3, #9932cc);
  border: none;
  border-radius: 6px;
  color: white;
  font-weight: bold;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.perk-buy-btn:hover:not(:disabled) {
  transform: scale(1.02);
  box-shadow: 0 0 15px rgba(186, 85, 211, 0.5);
}

.perk-buy-btn:disabled {
  background: var(--bg-dark);
  color: var(--text-muted);
  cursor: not-allowed;
}

.perk-buy-btn.maxed {
  background: var(--accent-green);
  color: var(--bg-dark);
}

/* Perk Requirements */
.perk-requires {
  font-size: 10px;
  color: var(--accent-yellow);
  margin-top: 6px;
  text-align: center;
}

/* ================================================
   OFFLINE REPORT STYLES
   ================================================ */

.offline-content {
  max-width: 400px;
  width: 90vw;
  background: linear-gradient(180deg, #0a1525 0%, #102035 100%);
  border-color: var(--accent-yellow) !important;
}

.offline-content h2 {
  color: var(--accent-yellow);
  text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
  margin-bottom: 10px;
}

.offline-time-info {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.offline-time-info span {
  color: var(--accent-yellow);
  font-weight: bold;
}

.offline-capped {
  text-align: center;
  font-size: 12px;
  color: var(--accent-orange, #ff9900);
  margin-bottom: 10px;
}

/* Total Earnings Display */
.offline-total {
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 215, 0, 0.05));
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 10px;
  margin: 15px 0;
}

.offline-total-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 5px;
}

.offline-total-value {
  display: block;
  font-size: 28px;
  font-weight: bold;
  color: var(--accent-yellow);
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

/* Breakdown Section */
.offline-breakdown {
  background: var(--bg-panel-hover);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 15px;
}

.offline-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-color);
}

.offline-row:last-child {
  border-bottom: none;
}

.offline-row-label {
  color: var(--text-secondary);
  font-size: 13px;
}

.offline-row-value {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 13px;
}

.offline-row.total-row {
  border-top: 1px solid var(--accent-yellow);
  margin-top: 8px;
  padding-top: 10px;
}

.offline-row.total-row .offline-row-label {
  font-weight: bold;
  color: var(--text-primary);
}

.offline-row.total-row .offline-row-value {
  color: var(--accent-green);
  font-weight: bold;
}

/* Bonuses Section */
.offline-bonuses {
  padding: 8px 0;
}

.offline-bonus-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0 4px 15px;
  font-size: 12px;
}

.offline-bonus-row .offline-row-label {
  color: var(--text-muted);
}

.offline-bonus-row .offline-row-value {
  color: var(--accent-green);
}

/* ==================== NEW SYSTEMS STYLES ==================== */

/* ===== COMBO DISPLAY ===== */
.combo-display {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  pointer-events: none;
  text-align: center;
}

.combo-counter {
  font-size: 48px;
  font-weight: bold;
  text-shadow: 0 0 20px currentColor, 0 2px 4px rgba(0,0,0,0.8);
  animation: comboPulse 0.5s ease-out;
}

.combo-multiplier {
  font-size: 24px;
  opacity: 0.9;
}

.combo-timer {
  width: 200px;
  height: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  margin: 10px auto 0;
  overflow: hidden;
}

.combo-timer-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff6600, #ffd700);
  transition: width 0.1s linear;
}

@keyframes comboPulse {
  0% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* ===== SACRIFICE MODAL ===== */
.sacrifice-modal .modal-content {
  max-width: 600px;
  min-width: 500px;
}

.ritual-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0;
  max-height: 400px;
  overflow-y: auto;
}

.ritual-item {
  background: var(--bg-panel-hover);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: all 0.2s ease;
}

.ritual-item:hover {
  border-color: var(--accent-purple);
  background: var(--bg-panel-active);
}

.ritual-item.locked {
  opacity: 0.5;
}

.ritual-item.on-cooldown {
  opacity: 0.7;
  border-color: var(--text-muted);
}

.ritual-icon {
  font-size: 40px;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
}

.ritual-info {
  flex: 1;
}

.ritual-name {
  font-size: 18px;
  font-weight: bold;
  color: var(--text-primary);
}

.ritual-description {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.ritual-cost {
  font-size: 12px;
  color: var(--accent-orange);
  margin-top: 6px;
}

.ritual-btn {
  padding: 10px 20px;
  background: var(--gradient-purple);
  border: none;
  border-radius: 6px;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ritual-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px var(--glow-purple);
}

.ritual-btn:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.sacrifice-slider {
  width: 100%;
  margin: 15px 0;
}

.sacrifice-slider input[type="range"] {
  width: 100%;
  height: 8px;
  -webkit-appearance: none;
  background: var(--border-color);
  border-radius: 4px;
  outline: none;
}

.sacrifice-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: var(--accent-purple);
  border-radius: 50%;
  cursor: pointer;
}

/* ===== ARTIFACTS MODAL ===== */
.artifacts-modal .modal-content {
  max-width: 700px;
  max-height: 80vh;
}

.artifacts-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.artifact-fragments {
  font-size: 14px;
  color: var(--accent-cyan);
}

.artifacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  max-height: 50vh;
  overflow-y: auto;
  padding: 10px 0;
}

.artifact-card {
  background: var(--bg-panel-hover);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
}

.artifact-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.artifact-card.locked {
  opacity: 0.4;
  filter: grayscale(1);
}

.artifact-card.common { border-color: #9e9e9e; }
.artifact-card.uncommon { border-color: #4caf50; }
.artifact-card.rare { border-color: #2196f3; }
.artifact-card.epic { border-color: #9c27b0; }
.artifact-card.legendary { border-color: #ff9800; box-shadow: 0 0 15px rgba(255,152,0,0.3); }
.artifact-card.mythic { border-color: #f44336; box-shadow: 0 0 20px rgba(244,67,54,0.4); animation: mythicGlow 2s infinite; }

@keyframes mythicGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(244,67,54,0.4); }
  50% { box-shadow: 0 0 35px rgba(244,67,54,0.7); }
}

.artifact-icon {
  font-size: 36px;
  margin-bottom: 8px;
}

.artifact-name {
  font-size: 13px;
  font-weight: bold;
  color: var(--text-primary);
}

.artifact-level {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.artifact-rarity {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* ===== MASTERY MODAL ===== */
.mastery-modal .modal-content {
  max-width: 800px;
  max-height: 80vh;
}

.mastery-stats {
  display: flex;
  gap: 30px;
  justify-content: center;
  margin-bottom: 20px;
  padding: 15px;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
}

.mastery-stat {
  text-align: center;
}

.mastery-stat-value {
  font-size: 28px;
  font-weight: bold;
  color: var(--accent-yellow);
}

.mastery-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.mastery-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  max-height: 50vh;
  overflow-y: auto;
}

.mastery-item {
  background: var(--bg-panel-hover);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
}

.mastery-item-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.mastery-building-icon {
  font-size: 28px;
}

.mastery-building-name {
  font-size: 14px;
  font-weight: bold;
  color: var(--text-primary);
}

.mastery-tier {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  margin-left: auto;
}

.mastery-level {
  font-size: 20px;
  font-weight: bold;
  color: var(--accent-yellow);
  text-align: center;
  margin: 8px 0;
}

.mastery-xp-bar {
  height: 6px;
  background: var(--border-color);
  border-radius: 3px;
  overflow: hidden;
}

.mastery-xp-fill {
  height: 100%;
  background: var(--gradient-gold);
  transition: width 0.3s ease;
}

.mastery-bonus {
  font-size: 11px;
  color: var(--accent-green);
  text-align: center;
  margin-top: 8px;
}

/* ===== ASCENSION MODAL ===== */
.ascension-modal .modal-content {
  max-width: 750px;
  max-height: 85vh;
  background: linear-gradient(135deg, #1a0a2e 0%, #0d0d1a 100%);
  border-color: var(--accent-pink);
}

.ascension-header {
  text-align: center;
  margin-bottom: 20px;
}

.cosmic-essence-display {
  font-size: 32px;
  font-weight: bold;
  color: var(--accent-pink);
  text-shadow: 0 0 20px rgba(233,30,99,0.5);
}

.ascension-info {
  background: rgba(233,30,99,0.1);
  border: 1px solid var(--accent-pink);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
}

.ascension-requirements {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 15px;
}

.ascension-req {
  text-align: center;
  padding: 10px;
  background: rgba(0,0,0,0.3);
  border-radius: 6px;
}

.ascension-req.met {
  border: 1px solid var(--accent-green);
}

.ascension-req.unmet {
  border: 1px solid var(--accent-red);
  opacity: 0.7;
}

.ascension-btn {
  width: 100%;
  padding: 15px;
  font-size: 18px;
  font-weight: bold;
  background: linear-gradient(135deg, #e91e63 0%, #9c27b0 100%);
  border: none;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 15px 0;
}

.ascension-btn:hover:not(:disabled) {
  transform: scale(1.02);
  box-shadow: 0 0 30px rgba(233,30,99,0.5);
}

.ascension-btn:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
}

.ascension-upgrades {
  margin-top: 20px;
}

.ascension-tier-section {
  margin-bottom: 20px;
}

.ascension-tier-title {
  font-size: 14px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 12px;
}

.ascension-upgrade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.ascension-upgrade {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ascension-upgrade:hover {
  border-color: var(--accent-pink);
  background: rgba(233,30,99,0.1);
}

.ascension-upgrade.maxed {
  border-color: var(--accent-green);
  opacity: 0.8;
}

.ascension-upgrade.locked {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ===== ENDLESS MODE ===== */
.endless-modal .modal-content {
  max-width: 600px;
}

.endless-enemy {
  text-align: center;
  padding: 20px;
  margin: 15px 0;
}

.endless-enemy-icon {
  font-size: 80px;
  margin-bottom: 10px;
}

.endless-enemy-name {
  font-size: 24px;
  font-weight: bold;
}

.endless-health-bar {
  height: 30px;
  background: var(--border-color);
  border-radius: 15px;
  overflow: hidden;
  margin: 15px 0;
  position: relative;
}

.endless-health-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff4444 0%, #ff6666 100%);
  transition: width 0.2s ease;
}

.endless-health-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: bold;
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.endless-timer {
  text-align: center;
  font-size: 32px;
  font-weight: bold;
  color: var(--accent-orange);
}

.endless-timer.warning {
  color: var(--accent-red);
  animation: timerPulse 0.5s infinite;
}

@keyframes timerPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.endless-wave-info {
  display: flex;
  justify-content: space-between;
  padding: 15px;
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
  margin-top: 15px;
}

.endless-modifiers {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 10px 0;
}

.endless-modifier {
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
}

.endless-modifier.positive {
  background: rgba(76,175,80,0.2);
  border: 1px solid #4caf50;
  color: #4caf50;
}

.endless-modifier.negative {
  background: rgba(244,67,54,0.2);
  border: 1px solid #f44336;
  color: #f44336;
}

.endless-rewards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 15px;
  text-align: center;
}

.endless-reward {
  padding: 10px;
  background: rgba(0,0,0,0.2);
  border-radius: 6px;
}

.endless-reward-value {
  font-size: 18px;
  font-weight: bold;
  color: var(--accent-yellow);
}

.endless-reward-label {
  font-size: 10px;
  color: var(--text-muted);
}

/* ===== ENHANCED BUTTON STYLES ===== */
.glow-btn {
  position: relative;
  overflow: hidden;
}

.glow-btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255,255,255,0.1),
    transparent
  );
  transform: rotate(45deg);
  animation: btnShine 3s infinite;
}

@keyframes btnShine {
  0% { transform: translateX(-100%) rotate(45deg); }
  100% { transform: translateX(100%) rotate(45deg); }
}

/* ===== ENHANCED TOOLTIPS ===== */
.tooltip-enhanced {
  position: absolute;
  background: linear-gradient(135deg, rgba(20,20,40,0.98) 0%, rgba(30,30,60,0.98) 100%);
  border: 1px solid var(--border-glow);
  border-radius: 8px;
  padding: 12px 16px;
  z-index: 1000;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 20px rgba(0,212,255,0.1);
  max-width: 300px;
  animation: tooltipFadeIn 0.2s ease-out;
}

@keyframes tooltipFadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== NOTIFICATION ENHANCEMENTS ===== */
.notification.legendary {
  border-color: #ff9800;
  background: linear-gradient(135deg, rgba(255,152,0,0.2) 0%, var(--bg-panel) 100%);
  animation: legendaryNotification 0.5s ease-out;
}

.notification.mythic {
  border-color: #f44336;
  background: linear-gradient(135deg, rgba(244,67,54,0.2) 0%, var(--bg-panel) 100%);
  animation: mythicNotification 0.5s ease-out;
}

@keyframes legendaryNotification {
  0% { transform: translateX(100%) scale(0.8); }
  50% { transform: translateX(-10px) scale(1.05); }
  100% { transform: translateX(0) scale(1); }
}

@keyframes mythicNotification {
  0% { transform: translateX(100%) rotate(5deg); }
  25% { transform: translateX(-20px) rotate(-3deg); }
  50% { transform: translateX(10px) rotate(2deg); }
  100% { transform: translateX(0) rotate(0); }
}

/* ===== Boss Battle Overlay ===== */
.boss-overlay {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  pointer-events: auto;
}

.boss-overlay.hidden {
  display: none;
}

.boss-container {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0f23 100%);
  border: 2px solid #e74c3c;
  border-radius: 12px;
  padding: 15px 25px;
  min-width: 350px;
  box-shadow: 0 0 30px rgba(231, 76, 60, 0.5), inset 0 0 20px rgba(0, 0, 0, 0.5);
  animation: bossAppear 0.5s ease-out;
}

@keyframes bossAppear {
  0% { transform: scale(0.5) translateY(-50px); opacity: 0; }
  50% { transform: scale(1.1) translateY(5px); }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.boss-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.boss-icon {
  font-size: 28px;
  animation: bossIconPulse 1s infinite;
}

@keyframes bossIconPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.boss-name {
  font-size: 20px;
  font-weight: bold;
  color: #e74c3c;
  text-shadow: 0 0 10px rgba(231, 76, 60, 0.5);
  flex: 1;
  text-align: center;
}

.boss-timer {
  font-size: 18px;
  font-weight: bold;
  color: #ffd700;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px 10px;
  border-radius: 20px;
  min-width: 50px;
  text-align: center;
}

.boss-timer.urgent {
  color: #ff4444;
  animation: timerUrgent 0.5s infinite;
}

@keyframes timerUrgent {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.boss-hp-bar-container {
  position: relative;
  height: 24px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #444;
  margin-bottom: 10px;
}

.boss-hp-bar {
  height: 100%;
  background: linear-gradient(90deg, #e74c3c, #c0392b);
  border-radius: 12px;
  transition: width 0.2s ease;
  box-shadow: 0 0 10px rgba(231, 76, 60, 0.5);
}

.boss-hp-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  font-weight: bold;
  color: white;
  text-shadow: 1px 1px 2px black;
}

.boss-description {
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 12px;
}

.boss-actions {
  display: flex;
  justify-content: center;
}

.boss-attack-btn {
  padding: 12px 40px;
  font-size: 18px;
  font-weight: bold;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  border: none;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  transition: all 0.1s ease;
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

.boss-attack-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(231, 76, 60, 0.6);
}

.boss-attack-btn:active {
  transform: scale(0.95);
}

@keyframes bossDamage {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.boss-container.damaged {
  animation: bossDamage 0.1s ease;
}

/* ================================================
   MINIONS SYSTEM STYLES
   ================================================ */

/* Minions Modal */
.minions-content {
  max-width: 800px;
  width: 95vw;
  max-height: 90vh;
}

.minions-description {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.minions-list {
  max-height: 70vh;
  overflow-y: auto;
  padding-right: 10px;
}

/* Total Stats Section */
.minions-total-stats {
  background: linear-gradient(135deg, rgba(0, 191, 255, 0.1), rgba(138, 43, 226, 0.1));
  border: 2px solid var(--accent-blue);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
}

.minions-total-stats h3 {
  text-align: center;
  color: var(--accent-blue);
  margin-bottom: 10px;
  font-size: 18px;
}

.minions-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.minions-stats-grid .stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
}

.minions-stats-grid .stat-label {
  color: var(--text-secondary);
  font-size: 12px;
}

.minions-stats-grid .stat-value {
  color: var(--accent-blue);
  font-weight: bold;
  font-size: 14px;
}

/* Minion Card */
.minion-card {
  background: var(--bg-panel-hover);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  transition: all 0.3s ease;
}

.minion-card:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 0 15px rgba(0, 191, 255, 0.2);
}

.minion-card.locked {
  opacity: 0.6;
  border-style: dashed;
}

.minion-card.affordable {
  border-color: var(--accent-green);
}

/* Minion Header */
.minion-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 12px;
}

.minion-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, rgba(0, 191, 255, 0.2), rgba(138, 43, 226, 0.2));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}

.minion-title {
  flex: 1;
}

.minion-name {
  font-size: 16px;
  font-weight: bold;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.minion-count {
  font-size: 12px;
  color: var(--text-secondary);
}

.minion-purchase {
  flex-shrink: 0;
}

.minion-buy-btn {
  padding: 10px 15px;
  background: linear-gradient(135deg, var(--accent-green), rgba(0, 255, 136, 0.7));
  border: 2px solid var(--accent-green);
  border-radius: 6px;
  color: white;
  font-weight: bold;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  line-height: 1.3;
}

.minion-buy-btn:hover:not(.disabled) {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
}

.minion-buy-btn.disabled {
  background: rgba(100, 100, 100, 0.3);
  border-color: rgba(100, 100, 100, 0.5);
  color: rgba(255, 255, 255, 0.4);
  cursor: not-allowed;
}

/* Minion Description */
.minion-description {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 12px;
  font-style: italic;
}

.minion-locked {
  text-align: center;
  padding: 10px;
  background: rgba(255, 69, 0, 0.2);
  border: 1px solid rgba(255, 69, 0, 0.5);
  border-radius: 4px;
  color: var(--accent-red);
  font-size: 13px;
  font-weight: bold;
}

/* Minion Stats */
.minion-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.minion-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.minion-stat .stat-label {
  color: var(--text-secondary);
  font-size: 12px;
}

.minion-stat .stat-value {
  color: var(--accent-blue);
  font-weight: bold;
  font-size: 13px;
}

/* Minion Upgrades Section */
.minion-upgrades {
  margin-top: 15px;
}

.upgrades-container h4 {
  color: var(--accent-yellow);
  font-size: 14px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 5px;
}

/* Individual Upgrade */
.minion-upgrade {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  margin-bottom: 8px;
  transition: all 0.2s ease;
}

.minion-upgrade:hover:not(.locked):not(.purchased) {
  border-color: var(--accent-blue);
  background: rgba(0, 191, 255, 0.05);
}

.minion-upgrade.purchased {
  border-color: var(--accent-green);
  background: rgba(0, 255, 136, 0.1);
}

.minion-upgrade.locked {
  opacity: 0.5;
  border-style: dashed;
}

.upgrade-info {
  flex: 1;
}

.upgrade-name {
  font-size: 13px;
  font-weight: bold;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.upgrade-desc {
  font-size: 11px;
  color: var(--text-secondary);
}

.upgrade-requires {
  font-size: 10px;
  color: var(--accent-red);
  margin-top: 3px;
}

.minion-upgrade-btn {
  padding: 8px 12px;
  background: var(--accent-yellow);
  border: 2px solid var(--accent-yellow);
  border-radius: 4px;
  color: var(--bg-dark);
  font-weight: bold;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.minion-upgrade-btn:hover:not(.disabled) {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.minion-upgrade-btn.disabled {
  background: rgba(100, 100, 100, 0.3);
  border-color: rgba(100, 100, 100, 0.5);
  color: rgba(255, 255, 255, 0.4);
  cursor: not-allowed;
}

.upgrade-purchased-badge {
  padding: 8px 12px;
  background: rgba(0, 255, 136, 0.2);
  border: 2px solid var(--accent-green);
  border-radius: 4px;
  color: var(--accent-green);
  font-weight: bold;
  font-size: 11px;
  white-space: nowrap;
}

/* ========================================
   ENHANCED UI POLISH & BUILDING ANIMATIONS
   ======================================== */

/* Building Icon Animations */
.building-icon {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.building-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.1) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.building-item:hover .building-icon::before {
  transform: translateX(100%);
}

.building-item:hover .building-icon {
  transform: scale(1.1) rotate(-5deg);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
}

/* Building Item Enhanced Hover */
.building-item {
  position: relative;
  overflow: hidden;
}

.building-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: var(--accent-blue);
  transform: scaleY(0);
  transition: transform 0.3s ease;
  transform-origin: bottom;
}

.building-item:hover::before {
  transform: scaleY(1);
}

.building-item.affordable::before {
  background: var(--accent-green);
}

/* Building Count Animation */
.building-count {
  transition: all 0.3s ease;
}

.building-count.incrementing {
  animation: countPop 0.3s ease-out;
  color: var(--accent-green);
}

@keyframes countPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* Building Production Indicator */
.building-item.producing::after {
  content: '';
  position: absolute;
  right: 10px;
  top: 50%;
  width: 8px;
  height: 8px;
  background: var(--accent-green);
  border-radius: 50%;
  transform: translateY(-50%);
  animation: productionBlink 1.5s ease-in-out infinite;
  box-shadow: 0 0 10px var(--accent-green);
}

@keyframes productionBlink {
  0%, 100% { opacity: 0.4; transform: translateY(-50%) scale(0.8); }
  50% { opacity: 1; transform: translateY(-50%) scale(1); }
}

/* Enhanced Upgrade Item */
.upgrade-item {
  position: relative;
  overflow: hidden;
}

.upgrade-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  transition: left 0.5s ease;
}

.upgrade-item:hover::after {
  left: 150%;
}

/* Upgrade Icon Pulse when Affordable */
.upgrade-item.affordable .upgrade-icon {
  animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.3);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.6);
  }
}

/* Panel Header Enhancement */
.panel-header,
.modal-header,
.category-header {
  position: relative;
  overflow: hidden;
}

.panel-header::after,
.modal-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
  animation: headerGlow 3s ease-in-out infinite;
}

@keyframes headerGlow {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.8; }
}

/* Button Enhancements */
.primary-btn,
.action-btn,
.prestige-btn,
[class*="-btn"]:not(.buy-btn):not(.nav-item) {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.primary-btn:hover,
.action-btn:hover,
.prestige-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0, 212, 255, 0.3);
}

.primary-btn:active,
.action-btn:active,
.prestige-btn:active {
  transform: translateY(0);
}

/* Button Click Ripple */
.btn-ripple {
  position: absolute;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: scale(0);
  animation: btnRipple 0.6s ease-out forwards;
  pointer-events: none;
}

@keyframes btnRipple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Card Hover Effects */
.stat-card,
.reward-card,
.achievement-card {
  transition: all 0.3s ease;
}

.stat-card:hover,
.reward-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Achievement Unlock Animation */
.achievement-card.unlocked {
  animation: achievementUnlock 0.6s ease-out;
}

@keyframes achievementUnlock {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Progress Bar Enhancements */
.progress-bar,
.hp-bar,
.boss-hp-bar {
  position: relative;
  overflow: hidden;
}

.progress-bar::after,
.hp-bar::after,
.boss-hp-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: progressShimmer 2s infinite;
}

@keyframes progressShimmer {
  100% { left: 100%; }
}

/* Tooltip Enhancements */
[data-tooltip]:hover::after {
  animation: tooltipFadeIn 0.2s ease-out;
}

@keyframes tooltipFadeIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Modal Entrance Animation */
.modal:not(.hidden) .modal-content {
  animation: modalSlide 0.3s ease-out;
}

@keyframes modalSlide {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* List Item Stagger Animation */
.building-list .building-item,
.upgrade-list .upgrade-item,
.achievement-list .achievement-card {
  animation: listItemSlide 0.3s ease-out backwards;
}

.building-list .building-item:nth-child(1) { animation-delay: 0s; }
.building-list .building-item:nth-child(2) { animation-delay: 0.03s; }
.building-list .building-item:nth-child(3) { animation-delay: 0.06s; }
.building-list .building-item:nth-child(4) { animation-delay: 0.09s; }
.building-list .building-item:nth-child(5) { animation-delay: 0.12s; }
.building-list .building-item:nth-child(6) { animation-delay: 0.15s; }
.building-list .building-item:nth-child(7) { animation-delay: 0.18s; }
.building-list .building-item:nth-child(8) { animation-delay: 0.21s; }
.building-list .building-item:nth-child(9) { animation-delay: 0.24s; }
.building-list .building-item:nth-child(10) { animation-delay: 0.27s; }

@keyframes listItemSlide {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Number Counter Animation */
.animated-value {
  display: inline-block;
  transition: all 0.3s ease;
}

.animated-value.increasing {
  color: var(--accent-green);
  text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.animated-value.decreasing {
  color: var(--accent-red);
  text-shadow: 0 0 10px rgba(255, 71, 87, 0.5);
}

/* Icon Bounce on Hover */
.nav-icon,
.sidebar-icon,
.category-icon {
  transition: all 0.3s ease;
}

.nav-item:hover .nav-icon,
.sidebar-category:hover .category-icon {
  animation: iconBounce 0.4s ease;
}

@keyframes iconBounce {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.2) rotate(-10deg); }
  75% { transform: scale(1.2) rotate(10deg); }
}

/* Badge Notification Pulse */
.badge:not(:empty),
.notification-dot {
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.7);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 0 5px rgba(255, 71, 87, 0);
  }
}

/* Tab Switch Animation */
.tab-btn {
  position: relative;
  overflow: hidden;
}

.tab-btn::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent-blue);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.tab-btn.active::before,
.tab-btn:hover::before {
  width: 80%;
}

/* Scrollbar Enhancement */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent-blue), var(--accent-purple));
  border-radius: 4px;
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--accent-cyan), var(--accent-blue));
}

/* Selection Enhancement */
::selection {
  background: rgba(0, 212, 255, 0.3);
  color: white;
}

/* Focus Styles */
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

/* Disabled State Enhancement */
button:disabled,
.disabled {
  position: relative;
  overflow: hidden;
}

button:disabled::before,
.disabled::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 5px,
    rgba(0, 0, 0, 0.1) 5px,
    rgba(0, 0, 0, 0.1) 10px
  );
  pointer-events: none;
}

/* Loading State */
.loading {
  position: relative;
  color: transparent !important;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: loadingSpin 0.8s linear infinite;
}

@keyframes loadingSpin {
  to { transform: rotate(360deg); }
}

/* Tier-based Building Glow */
.building-item[data-tier="epic"] {
  border-color: rgba(155, 89, 182, 0.5);
}

.building-item[data-tier="epic"]:hover {
  box-shadow: 0 0 20px rgba(155, 89, 182, 0.3);
}

.building-item[data-tier="legendary"] {
  border-color: rgba(255, 215, 0, 0.5);
}

.building-item[data-tier="legendary"]:hover {
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.building-item[data-tier="mythic"] {
  border-color: rgba(255, 107, 0, 0.5);
  background: linear-gradient(135deg, rgba(255, 107, 0, 0.05) 0%, transparent 50%);
}

.building-item[data-tier="mythic"]:hover {
  box-shadow: 0 0 25px rgba(255, 107, 0, 0.4);
}

.building-item[data-tier="cosmic"] {
  border-color: rgba(0, 255, 255, 0.5);
  background: linear-gradient(135deg, rgba(0, 255, 255, 0.05) 0%, rgba(155, 89, 182, 0.05) 100%);
}

.building-item[data-tier="cosmic"]:hover {
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.4), 0 0 50px rgba(155, 89, 182, 0.2);
}

/* Mega Upgrade Styling */
.upgrade-item.mega-upgrade {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 107, 0, 0.1) 100%);
  border: 2px solid rgba(255, 215, 0, 0.5);
}

.upgrade-item.mega-upgrade:hover {
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.4);
}

.upgrade-item.mega-upgrade .upgrade-name {
  background: linear-gradient(90deg, #ffd700, #ff6b00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Cross-System Upgrade Styling */
.upgrade-item.cross-system {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(155, 89, 182, 0.1) 100%);
  border: 2px solid rgba(0, 212, 255, 0.5);
}

.upgrade-item.cross-system:hover {
  box-shadow: 0 0 25px rgba(0, 212, 255, 0.4);
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
