/* ---
==========================================================================
   GLOBAL/BASE STYLES (PRIMAL SCROLL THEME)
==========================================================================
--- */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@700&family=Exo+2:wght@400;600;700&family=Rajdhani:wght@600;700&display=swap');

/* Keyframes */
@keyframes swirl {
  from {
    background-position: 0% 50%;
  }

  to {
    background-position: 100% 50%;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes dualGlowPulseCyan {

  0%,
  100% {
    filter: blur(5px);
    opacity: 0.8;
  }

  50% {
    filter: blur(8px);
    opacity: 1;
  }
}

@keyframes dualGlowFlickerOrange {

  0%,
  100% {
    filter: blur(6px);
    opacity: 0.7;
  }

  25% {
    filter: blur(8px);
    opacity: 1;
  }

  50% {
    filter: blur(6px);
    opacity: 0.8;
  }

  75% {
    filter: blur(9px);
    opacity: 1;
  }
}

@keyframes swirl-text {
  from {
    background-position: 0% 50%;
  }

  to {
    background-position: 200% 50%;
  }
}

* {
  box-sizing: border-box;
}

/* Base body style (Minimal override, uses linked HTML body styles for background) */
body {
  color: #ddd;
  font-family: 'Exo 2', 'Montserrat', sans-serif;
  line-height: 1.7;
  margin: 0;
  padding: 10px;
  overflow-x: hidden;
}

/* Notes Page Specific Body */
body.primal-notes {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-direction: column;
  min-height: 100vh;
  padding: 20px;
  overflow-y: auto;
  animation: swirl 60s linear infinite alternate;
  background-size: 150% auto;
}

/* UI Containers - Primal Scroll Aesthetic (Utility Classes) */
.ui-container {
  --elemental-glow: #888;
  --elemental-text: #f0f0f0;
  --elemental-header: #ffffff;
  background: rgba(10, 5, 5, 0.9);
  border: 1px solid var(--elemental-glow);
  border-radius: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.5), 0 0 10px var(--elemental-glow) inset;
  padding: 15px;
  transition: all 0.3s ease;
}

.dark-glass-container {
  --elemental-glow: #777;
  --elemental-glass: rgba(10, 10, 20, 0.9);
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 0 100%);
  background: var(--elemental-glass);
}

.primal-snow {
  --elemental-glow: #66aaff;
  --elemental-glass: rgba(10, 20, 40, 0.85);
  --elemental-text: #e0f0ff;
  --elemental-header: #ffffff;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
  border: 2px solid var(--elemental-glow);
}

.primal-ash {
  --elemental-glow: #ff6633;
  --elemental-glass: rgba(40, 15, 15, 0.85);
  --elemental-text: #ffe0e0;
  --elemental-header: #ffffff;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 20px 100%, 0 calc(100% - 20px));
  border: 2px solid var(--elemental-glow);
}

/* Buttons - Shared Shard Style */
.top-menu-btn,
.ascension-btn,
.ascension-cancel-btn,
#abilityBtn,
#despawnBtn,
#siphonBtn,
.unleash-btn,
#riftPulseBtn,
.menu-btn,
.back-btn,
.container button {
  font-family: 'Exo 2', 'Montserrat', sans-serif;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--elemental-glow, #888);
  border-radius: 0;
  color: #f0f0f0;
  padding: 10px 15px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  width: 100%;
  margin-bottom: 10px;
  transition: all 0.2s ease;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.top-menu-btn:hover,
.ascension-btn:hover,
#abilityBtn:not(:disabled):hover,
#despawnBtn:not(:disabled):hover,
#siphonBtn:not(:disabled):hover,
.unleash-btn:not(:disabled):hover,
#riftPulseBtn:not(:disabled):hover,
.menu-btn:not(:disabled):hover,
.back-btn:not(:disabled):hover,
.container button:not(:disabled):hover {
  background: var(--elemental-glow, #66aaff);
  color: #111;
  box-shadow: 0 0 15px var(--elemental-glow, #66aaff);
  transform: scale(1.02);
}

#abilityBtn:disabled,
#despawnBtn:disabled,
#siphonBtn:disabled,
.unleash-btn:disabled,
#riftPulseBtn:disabled,
.menu-btn:disabled {
  background: rgba(50, 50, 50, 0.5);
  border-color: #555;
  color: #888;
  box-shadow: none;
  transform: none;
  cursor: not-allowed;
}

.ascension-btn {
  font-size: 14px !important;
  padding: 8px 10px !important;
  margin-top: 0 !important;
}

.ascension-cancel-btn {
  background: #332211;
}

/* Global Typography - For all rule/note/menu containers */
.container b,
.container strong {
  color: #ffcc00;
  font-weight: 600;
}

/* Section H2 Header Style (Gold Underline) */
.container h2 {
  font-size: 1.8em;
  color: #ffcc00;
  border-bottom: 3px solid #ffcc00;
  box-shadow: 0 4px 15px -8px #ffcc00;
  padding-bottom: 10px;
  margin-bottom: 25px;
  text-transform: uppercase;
}

.container h3 {
  font-size: 1.4em;
  color: #c8bda9;
  margin-top: 30px;
  text-transform: uppercase;
}

.container li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: #c8bda9;
  font-size: 1.2em;
  top: -2px;
}

/* ---
==========================================================================
   UNIQUE NOTES STYLES (for notes.html)
==========================================================================
--- */

.notes-container {
  border-radius: 0;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
  padding: 30px 40px;
  max-width: 1000px;
  width: 100%;
  margin: 20px auto 160px;
  animation: fadeIn 0.5s;
  position: relative;
  z-index: 10;
}

.notes-title {
  text-align: center;
  border-bottom: 1px solid #777;
  padding-bottom: 20px;
  margin-bottom: 30px;
  font-size: 2.8em;
  color: #c8bda9;
  text-shadow: 0 0 10px #ffcc00;
  margin: 0;
  word-wrap: break-word;
  font-family: 'Rajdhani', sans-serif;
}

.notes-content {
  padding-right: 0;
  margin-bottom: 80px;
}

.note-card {
  border: 1px solid #5f523e;
  border-radius: 0;
  padding: 20px;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 0 100%);
}

.note-card:hover {
  transform: translateY(-5px);
}

/* TIERED CARD STYLES */
.note-card[data-tier="diamond"] {
  border-color: #e0ffff;
}

.note-card[data-tier="diamond"]:hover {
  box-shadow: 0 5px 30px rgba(224, 255, 255, 0.5);
}

.note-card[data-tier="gold"] {
  border-color: #ffcc00;
}

.note-card[data-tier="gold"]:hover {
  box-shadow: 0 5px 25px rgba(255, 204, 0, 0.4);
}

.note-card[data-tier="silver"] {
  border-color: #c0c0c0;
}

.note-card[data-tier="silver"]:hover {
  box-shadow: 0 5px 25px rgba(192, 192, 192, 0.4);
}

.note-card[data-tier="bronze"] {
  border-color: #cd7f32;
}

.note-card[data-tier="bronze"]:hover {
  box-shadow: 0 5px 25px rgba(205, 127, 50, 0.4);
}

.note-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #444;
  flex-wrap: wrap;
}

/* TIERED VERSION TAG STYLES */
.note-version {
  font-size: 1.1em;
  font-weight: 700;
  padding: 3px 8px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%);
  color: #cd7f32;
  background: rgba(205, 127, 50, 0.1);
  border: 1px solid #cd7f32;
  /* Default: Bronze */
}

.note-card[data-tier="diamond"] .note-version {
  color: #e0ffff;
  background: rgba(224, 255, 255, 0.1);
  border-color: #e0ffff;
}

.note-card[data-tier="gold"] .note-version {
  color: #ffcc00;
  background: rgba(255, 204, 0, 0.1);
  border-color: #ffcc00;
}

.note-card[data-tier="silver"] .note-version {
  color: #c0c0c0;
  background: rgba(192, 192, 192, 0.1);
  border-color: #c0c0c0;
}

.note-card[data-tier="bronze"] .note-version {
  color: #cd7f32;
  background: rgba(205, 127, 50, 0.1);
  border-color: #cd7f32;
}

.note-card-title {
  font-size: 1.5em;
  color: #c8bda9;
  font-weight: 600;
  flex-basis: 100%;
  order: -1;
  margin-bottom: 10px;
}

.note-date {
  font-size: 0.9em;
  color: #aaa;
}

.note-detail {
  font-size: 1.1em;
  line-height: 1.7;
  color: #ddd;
}

.note-detail ul {
  list-style: none;
  padding-left: 0;
  margin-top: 10px;
}

.note-detail li {
  padding-left: 20px;
  position: relative;
  margin-bottom: 8px;
}

.note-detail li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: #c8bda9;
}

/* STICKY FOOTER CONTAINER */
.sticky-footer-btn {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 15px 0;
  text-align: center;
  background: rgba(0, 0, 0, 0.95);
  box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
}

/* Neutral Glow for Back Button */
.sticky-footer-btn .back-btn {
  max-width: 250px;
  margin: 0 auto;
  display: block;
  --elemental-glow: #c8c8c8;
}

/* Neutral Hover State */
.sticky-footer-btn .back-btn:hover {
  background: #c8c8c8;
  color: #111;
  box-shadow: 0 0 15px #c8c8c8;
  transform: scale(1.02);
}

@media (max-width: 768px) {
  .notes-container {
    padding: 20px 15px;
    margin: 10px auto;
  }

  .notes-title {
    font-size: 2.2em;
  }

  .note-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .note-card-title {
    order: 0;
    margin-bottom: 5px;
    font-size: 1.3em;
  }

  .note-detail {
    font-size: 1em;
  }
}