/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

html, body {
  font-family: "EB Garamond", serif;
}

pre, code, .monospace { font-family: Hack, monospace; }

.flex-1 {
  flex: 1;
}

.max-h-60vh {
  max-height: 60vh;
}

@media (max-width: 767px) {
  .max-h-60vh {
    max-height: 50vh;
  }
}

.note {
  font-size: 0.875rem;
  color: #666;
}

.user-sections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

@keyframes warpZoom {
  0% { transform: scale(1);}
  50% { transform: scale(1.3);}
  100% { transform: scale(1);}
}
.animate-warp {
  display: inline-block;
  animation: warpZoom 0.8s infinite cubic-bezier(.4,0,.6,1);
}

@keyframes multiplier2xShine {
  0% {
    box-shadow: 0 0 10px 5px rgba(255,255,0,0.5), 0 0 20px 10px rgba(255,255,255,0.15) inset;
    filter: brightness(1) saturate(1.2);
  }
  50% {
    box-shadow: 0 0 30px 20px rgba(255,255,0,0.8), 0 0 40px 20px rgba(255,255,255,0.3) inset;
    filter: brightness(1.4) saturate(1.7);
  }
  100% {
    box-shadow: 0 0 10px 5px rgba(255,255,0,0.5), 0 0 20px 10px rgba(255,255,255,0.15) inset;
    filter: brightness(1) saturate(1.2);
  }
}

.animate-multiplier-2x {
  display: inline-block;
  animation: multiplier2xShine 1.2s infinite ease-in-out;
  border-radius: 0.5em;
  background: linear-gradient(90deg, #fffbe6 0%, #ffe066 50%, #fffbe6 100%);
  color: #b8860b;
  font-weight: bold;
  text-shadow: 0 0 8px #fff200, 0 0 2px #fff;
  padding: 0.2em 0.6em;
  box-shadow: 0 0 10px 5px rgba(255,255,0,0.5), 0 0 20px 10px rgba(255,255,255,0.15) inset;
}

.energy-orbs {
  display: inline-flex;
  gap: 0.25rem;
  margin-left: 0.5rem;
}

.energy-orb {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  display: inline-block;
  box-shadow:
    0 0 8px currentColor,
    0 0 0.25rem rgba(0,0,0,0.15);
  font-size: 1em;
  vertical-align: middle;
}

/* SIDEBAR */

.sidebar-menu {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.stats-section {
  display: flex;
  gap: 0.5rem;
}

.score-panel {
  flex: 1;
}

.quick-actions {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  width: 33.333%;
  gap: 0.25rem;
}

.action-grid.citadel-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.25rem;
}

.action-grid.single-action {
  display: grid;
  grid-template-columns: 1fr;
}

.score-fieldset {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.5rem;
  border: 1px solid;
  font-family: monospace;
  height: 100%;
  justify-content: space-between;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stat-item--gold {
  justify-content: center;
}

.stat-item--with-bar {
  justify-content: space-between;
}

.stat-label {
  white-space: nowrap;
  min-width: 0;
  flex-shrink: 0;
}

.stat-progress {
  width: 60px; /* Fixed width for consistent alignment */
  height: 12px;
  flex-shrink: 0;
}

.score-panel {
  font-size: 0.6em;
  min-height: 0;
  height: 100%;
  padding: 0;
}

/* END SIDEBAR */

/* LEVEL UP */

.level-up-btn {
  background: linear-gradient(125deg,#ffef00,#ff00ff,#00ffff);
  background-size:300% 300%;
  color:#111;
  animation: levelUpGlow 2s linear infinite, pulse 1.2s ease-in-out infinite alternate;
  box-shadow:0 0 6px #fff,0 0 12px #ff00ff,0 0 18px #00ffff;
  text-shadow:0 0 3px #fff,0 0 6px #ff00ff;
  border:2px solid #fff;
  cursor:pointer;
}
.level-up-btn:disabled {
  filter:grayscale(.7) brightness(.7);
  animation:none;
  cursor:not-allowed;
  box-shadow:none;
  text-shadow:none;
}
@keyframes levelUpGlow {
  0% {background-position:0% 50%;}
  50% {background-position:100% 50%;}
  100% {background-position:0% 50%;}
}
@keyframes pulse {
  from {transform:scale(1);}
  to {transform:scale(1.06) rotate(1deg);}
}
/* END LEVEL UP */

/* ADVENTURE HUD */

@keyframes ghostPulse {
  0% {
    text-shadow: 0 0 10px #9370db, 0 0 20px #9370db;
  }
  100% {
    text-shadow: 0 0 15px #9370db, 0 0 30px #9370db, 0 0 40px #9370db;
  }
}

@keyframes ghostWave {
  0% {
    transform: scale(1);
    opacity: 0.3;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.1;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* END ADVENTURE HUD */

.splash-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 3rem 2rem;
  position: relative;
  z-index: 10;
  gap: 3rem;
  max-width: 800px;
  margin: 0 auto;
}

.cosmic-title {
  font-size: 3rem;
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.4em;
  position: relative;
  animation: cosmicGlow 3s ease-in-out infinite alternate;
  font-family: 'EB Garamond', serif;
  font-style: italic;
  padding-left: 0.35em; /* optical centering tweak */
  text-align: center;
}

.btn-cosmic {
  text-align: center;
  font-family: 'EB Garamond', serif;
  font-size: 1.2rem;
  padding: 0.8rem 2rem;
  border: 2px solid #ffffff;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  transition: box-shadow 0.4s ease, transform 0.3s ease, color 0.4s ease, border-color 0.4s ease;
  text-decoration: none;
  display: inline-block;
  position: relative;
  overflow: hidden;
  animation: none;
}
.btn-cosmic:hover,
.btn-cosmic:focus-visible {
  animation: cosmicGlow 2s ease-in-out infinite alternate;
  box-shadow: 0 0 6px #667eea, 0 0 18px #ff9ff3, 0 0 28px #ff9ff3;
  border-color: #ff9ff3;
  color: #ff9ff3;
  outline: none;
}
@media (prefers-reduced-motion: reduce) {
  .btn-cosmic:hover,
  .btn-cosmic:focus-visible {
    animation: none;
    box-shadow: 0 0 8px #ff9ff3;
    transform: none;
  }
}

.intro-text {
  font-size: 1.5rem;
  line-height: 1.8;
  text-align: center;
  font-style: italic;
  font-weight: 400;
  max-width: 600px;
}

.button-group {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: white;
  border-radius: 50%;
  animation: float 20s infinite linear;
}

.particle:nth-child(2n) {
  background: #667eea;
  animation-duration: 25s;
}

.particle:nth-child(3n) {
  background: #4ecdc4;
  animation-duration: 30s;
}

.particle:nth-child(4n) {
  background: #ff9ff3;
  animation-duration: 35s;
}

.particle:nth-child(5n) {
  background: #feca57;
  animation-duration: 40s;
}

@keyframes cosmicGlow {
  0% {
    text-shadow: 0 0 20px #667eea, 0 0 40px #667eea;
  }
  100% {
    text-shadow: 0 0 30px #ff9ff3, 0 0 60px #ff9ff3, 0 0 90px #ff9ff3;
  }
}

@keyframes rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@media (max-width: 768px) {
  .cosmic-title {
    font-size: 2.8rem;
    letter-spacing: 0.3em;
  }

  .button-group {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .splash-container {
    padding: 2rem 1rem;
  }
}

@media (max-width: 480px) {
  .cosmic-title {
    font-size: 2.2rem;
    letter-spacing: 0.2em;
  }
}

/* Conditions. */

.result-condition-gained {
  background: linear-gradient(135deg, #1a4d3a 0%, #2e7d32 100%);
  border-left: 4px solid #4caf50;
  color: #e8f5e8;
  padding: 8px 12px;
  border-radius: 4px;
  margin: 4px 0;
}

.result-condition-expired {
  background: linear-gradient(135deg, #2a2a4e 0%, #3a3a6e 100%);
  border-left: 4px solid #9c27b0;
  color: #e1bee7;
  padding: 8px 12px;
  border-radius: 4px;
  margin: 4px 0;
}

.condition-description {
  font-style: italic;
  font-size: 0.9em;
  margin-top: 4px;
  opacity: 0.8;
}
