/*----------------------------------------------------------------------
  splash.css
----------------------------------------------------------------------*/

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg,rgba(10,6,2,0.22) 0%,rgba(16,6,10,0.33) 100%),
    url('../img/dragon.jpg') center center/cover no-repeat;
  overflow-x: hidden;
  font-family: 'Cinzel', 'Merriweather', serif;
  color: #fffbe8;
  filter: brightness(1.22) contrast(1.1);
}

@media (min-width: 700px) {
  body {
    background:
      linear-gradient(180deg,rgba(10,6,2,0.22) 0%,rgba(16,6,10,0.33) 100%),
      url('../img/dragon.jpg') center center/cover no-repeat fixed;
  }
}

.splash-container {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(0.5px);
  background: rgba(20,12,4,0.33);
}

.splash-top {
  width: 100%;
  max-width: 600px;
  margin-top: 4vh;
}

.splash-bottom {
  width: 100%;
  max-width: 600px;
  position: relative;
}

h1 {
  font-family: 'Cinzel', 'Merriweather', serif;
  font-size: 2.1rem;
  color: #ffe066;
  letter-spacing: 2px;
  text-shadow: 0 2px 16px #b8860b;
  margin-bottom: 0.3em;
  margin-top: 0;
  animation: titleglow 3s ease-in-out infinite alternate;
}
@keyframes titleglow {
  from { text-shadow: 0 2px 16px #b8860b, 0 0 8px #ffd700; }
  to   { text-shadow: 0 4px 32px #ffd700, 0 0 18px #ffe066; }
}

.intro-text {
  color: #fff9e2;
  font-size: 1.1rem;
  max-width: 460px;
  margin: 0 auto 1.3em auto;
  background: rgba(30,16,0,0.22);
  border-radius: 12px;
  padding: 0.7em 1em;
  box-shadow: 0 0 8px 1px #392;
  text-shadow: 0 1px 6px #111;
  transition: background 0.3s;
}

.splash-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 0.8em;
  margin-bottom: 0.5em;
}

/* RPG Buttons & Links */
.rpg-btn {
  background: linear-gradient(90deg, #d4af37 30%, #8d6727 100%);
  border: 2px solid #ffe066;
  color: #4d2d00;
  font-family: 'Cinzel', 'Merriweather', serif;
  font-size: 1.15rem;
  padding: 0.7em 2.2em;
  border-radius: 18px;
  letter-spacing: 2px;
  box-shadow: 0 2px 12px #111;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.17s cubic-bezier(.4,2,.2,1.1);
  text-shadow: 0 1px 8px #fff5b3, 0 0 4px #b8860b;
}
.rpg-btn:hover, .rpg-btn:focus {
  background: linear-gradient(90deg, #ffe066 0%, #8d6727 100%);
  color: #3c2600;
  border-color: #fffbe6;
  transform: scale(1.06) rotate(-1.5deg);
  box-shadow: 0 4px 18px #ffe066, 0 0 12px #b8860b;
}

.rpg-links {
  display: flex;
  flex-direction: row;
  gap: 16px;
  margin-top: 12px;
  margin-bottom: 2px;
  justify-content: center;
  flex-wrap: wrap;
}
.rpg-link {
  color: #ffe066;
  font-family: 'Cinzel', 'Merriweather', serif;
  font-size: 1.05rem;
  text-decoration: underline;
  text-shadow: 0 2px 10px #442, 0 0 4px #fff;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, text-shadow 0.2s;
  padding: 2px 8px;
  background: rgba(40, 20, 0, 0.11);
  border-radius: 8px;
}
.rpg-link:hover, .rpg-link:focus {
  color: #ffba08;
  text-decoration: none;
  text-shadow: 0 2px 18px #f2c95f, 0 0 8px #ffe066;
  background: rgba(255, 225, 100, 0.12);
}

/* Free/Premium Tier Boxes */
.free-tier-info {
  margin-top: 2em;
  width: 100%;
}
.free-tier-info h3 {
  color: #ffe066;
  font-family: 'Cinzel', serif;
  text-align: center;
  margin-bottom: 1em;
  font-size: 1.3rem;
  text-shadow: 0 2px 10px #b8860b;
}
.tier-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5em;
  margin: 1.5em 0;
}
.tier-box {
  background: rgba(30, 16, 4, 0.6);
  border: 2px solid #ffe06630;
  border-radius: 12px;
  padding: 1.5em;
  text-align: left;
}
.tier-box.premium-tier {
  border-color: #ffd700;
  background: rgba(255, 215, 0, 0.1);
}
.tier-box h4 {
  color: #ffe066;
  font-family: 'Cinzel', serif;
  margin-top: 0;
  margin-bottom: 1em;
  text-align: center;
  font-size: 1.2rem;
}
.tier-box ul {
  list-style: none;
  padding: 0;
  margin: 1em 0;
}
.tier-box li {
  color: #ffe7b8;
  margin: 0.5em 0;
  font-size: 0.9rem;
  padding-left: 1em;
}
.tier-box li em {
  color: #ffcc99;
  font-style: italic;
}
.tier-btn {
  width: 100%;
  padding: 0.8em;
  border: none;
  border-radius: 8px;
  font-family: 'Cinzel', serif;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 1em;
}
.free-btn {
  background: linear-gradient(90deg, #34c759 0%, #2b8a3e 100%);
  color: white;
}
.free-btn:hover {
  background: linear-gradient(90deg, #30d158 0%, #34c759 100%);
  transform: scale(1.02);
}
.premium-btn {
  background: linear-gradient(90deg, #ffd700 0%, #c68619 100%);
  color: #432400;
}
.premium-btn:hover {
  background: linear-gradient(90deg, #fffbe8 0%, #ffd700 100%);
  transform: scale(1.02);
}

/* Sparkles */
.sparkle {
  position: fixed;
  width: 4px;
  height: 4px;
  background: #ffe066;
  border-radius: 50%;
  pointer-events: none;
  animation: sparkle-float 2s ease-out forwards;
  z-index: 0;
}
@keyframes sparkle-float {
  0%   { opacity: 0; transform: translateY(0) scale(0); }
  10%  { opacity: 1; transform: translateY(-10px) scale(1); }
  90%  { opacity: 1; transform: translateY(-100px) scale(1); }
  100% { opacity: 0; transform: translateY(-120px) scale(0.5); }
}

/*--------------------------------------------------------------------------
  MODAL: Pure Flexbox Centering (OVERWRITE ALL OTHER MODAL RULES)
--------------------------------------------------------------------------*/
.modal-bg {
  display: none;
  position: fixed;
  inset: 0;             /* shorthand for top/right/bottom/left = 0 */
  width: 100vw;
  height: 100vh;
  background: rgba(10,6,2,0.92);
  z-index: 9999;
  overflow: hidden;
}

.modal-bg.active {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}

.modal-panel {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  transform: none !important;

  width: 90vw;
  max-width: 360px;
  max-height: 85vh;
  overflow-y: auto;

  background: rgba(30,16,4,0.97);
  border: 2px solid #ffcf48;
  border-radius: 14px;
  box-shadow: 0 2px 36px #331b07;
  padding: 1.8em 1.5em 1.5em 1.5em;

  display: flex;
  flex-direction: column;
  align-items: center;
}

.modal-close {
  position: absolute;
  top: 6px;
  right: 10px;
  font-size: 1.4rem;
  color: #ffe066;
  background: none;
  border: none;
  cursor: pointer;
}

@media (max-width: 480px) {
  .modal-panel {
    width: 95vw;
    max-width: 300px;
    max-height: 80vh;
    padding: 1.5em 1.2em;
  }
}
/*----------------------------------------------------------------------
  MODAL FORM ELEMENT STYLES
----------------------------------------------------------------------*/

/* Text fields */
.modal-panel input[type="text"],
.modal-panel input[type="password"] {
  width: 100%;
  padding: 0.75em 1em;
  margin-bottom: 1em;
  font-size: 1rem;
  border-radius: 8px;
  border: 1.5px solid #d4af37;
  background: #fff9e2;
  color: #543808;
  font-family: 'Cinzel', 'Merriweather', serif;
  outline: none;
  box-sizing: border-box;
}

/* Submit buttons and modal-panel buttons */
.modal-panel input[type="submit"],
.modal-panel button:not(.modal-close) {
  width: 100%;
  padding: 0.75em;
  margin-bottom: 0.8em;
  font-size: 1rem;
  font-family: 'Cinzel', serif;
  font-weight: bold;
  border: 1.5px solid #ffe066;
  border-radius: 12px;
  background: linear-gradient(90deg, #d4af37 30%, #8d6727 100%);
  color: #4d2d00;
  cursor: pointer;
  box-shadow: 0 1px 6px #b8860b;
  transition: all 0.17s;
}

/* Hover/focus on buttons */
.modal-panel input[type="submit"]:hover,
.modal-panel button:not(.modal-close):hover,
.modal-panel input[type="submit"]:focus,
.modal-panel button:not(.modal-close):focus {
  background: linear-gradient(90deg, #ffe066 0%, #8d6727 100%);
  color: #6a4805;
  border-color: #fffbe6;
  transform: scale(1.02);
}

/* “Switch” links (e.g. Need an account? Register) */
.modal-panel .modal-switch {
  background: none;
  border: none;
  color: #ffe066;
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  text-decoration: underline;
  margin-bottom: 0.5em;
  cursor: pointer;
  transition: color 0.2s, text-shadow 0.2s;
}
.modal-panel .modal-switch:hover,
.modal-panel .modal-switch:focus {
  color: #fffbe8;
  text-shadow: 0 2px 10px #ffd700;
}

/* Feedback text below forms */
.modal-panel #login-feedback,
.modal-panel #register-feedback,
.modal-panel #forgot-feedback {
  min-height: 1.4em;
  font-size: 0.95rem;
  color: #ffd700;
  text-align: center;
  margin-bottom: 0.5em;
  text-shadow: 0 1px 3px #000;
}
/*----------------------------------------------------------------------
  MOBILE OPTIMIZATION FOR FREE & PREMIUM TIER BOXES
----------------------------------------------------------------------*/
@media (max-width: 600px) {
  /* Stack boxes vertically */
  .tier-comparison {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1em !important;
    margin: 1em 0 !important;
  }

  /* Shrink box padding and fonts */
  .tier-box {
    padding: 1em !important;
  }
  .tier-box h4 {
    font-size: 1rem !important;
    margin-bottom: 0.75em !important;
  }
  .tier-box ul {
    margin: 0.75em 0 !important;
  }
  .tier-box li {
    font-size: 0.85rem !important;
    margin: 0.35em 0 !important;
    padding-left: 0.8em !important;
  }

  /* Button adjustments */
  .tier-btn {
    padding: 0.6em !important;
    font-size: 0.95rem !important;
  }

  /* “Play for Free!” heading */
  .free-tier-info h3 {
    font-size: 1.1rem !important;
    margin-bottom: 0.75em !important;
  }
}
