/* -------------------------------------------------------
🌸 AROCHEA’S ARCHIVES STYLESHEET
Soft pastel UI with cozy, floaty animations.
------------------------------------------------------- */

/* 🌿 GLOBAL RESET & BASE --------------------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Quicksand', 'Poppins', sans-serif;
  background: linear-gradient(135deg, #ffd9ec 0%, #e2baff 50%, #cde4ff 100%);
  background-size: 200% 200%;
  animation: bgShift 20s ease infinite;
  color: #444;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 60px 20px;
  text-align: center;
  overflow-x: hidden;
  overflow-y: auto;
}

/* 🎞️ BACKGROUND ANIMATION -------------------------------- */
@keyframes bgShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* -------------------------------------------------------
🎀 TYPOGRAPHY & HEADERS
------------------------------------------------------- */

h1 {
  font-size: 3.2rem;
  font-weight: 900;
  letter-spacing: 1px;
  background: linear-gradient(90deg, #fff4fc, #ffe2fb, #f5d6ff, #e2baff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow:
    0 2px 0 #f9b8e3,
    0 4px 0 #f3a8d9,
    0 4px 6px rgba(0,0,0,.25),
    0 0 12px rgba(255,182,255,.7);
  animation: floatTitle 6s ease-in-out infinite alternate,
             bubblePulse 3s ease-in-out infinite;
  z-index: 3;
  margin-bottom: 10px;
}

@keyframes floatTitle {
  from { transform: translateY(0); }
  to { transform: translateY(-5px); }
}

@keyframes bubblePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

p.subtitle {
  font-size: 1.15rem;
  font-weight: 600;
  background: linear-gradient(90deg, #a86aff, #ff84d6, #ffc2eb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: .6px rgba(0,0,0,.5);
  text-shadow:
    0 2px 5px rgba(0,0,0,.25),
    0 0 12px rgba(255,255,255,.6);
  margin: 15px auto 35px auto;
  max-width: 700px;
  line-height: 1.6;
  text-align: center;
  z-index: 3;
}

/* -------------------------------------------------------
🔍 SEARCH UI
------------------------------------------------------- */

.search-card {
  background: rgba(255,255,255,0.95);
  border-radius: 22px;
  padding: 20px 25px 25px;
  box-shadow: 0 6px 25px rgba(0,0,0,0.05);
  backdrop-filter: blur(10px);
  max-width: 700px;
  width: 100%;
  margin-bottom: 30px;
  z-index: 3;
}

.search-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

/* 🧠 Input Fields & Dropdown ------------------------------ */
#search-input,
#category-select,
#reset-btn {
  padding: 10px 18px;
  border-radius: 25px;
  border: none;
  outline: none;
  background: rgba(255,255,255,0.85);
  box-shadow: 0 4px 14px rgba(0,0,0,0.05);
  font-size: 1rem;
  color: #6a4c93;
  transition: all .25s ease;
}

#search-input:focus,
#category-select:focus {
  background: #fff;
  box-shadow: 0 0 12px rgba(226,186,255,0.6);
}

/* ✨ Buttons ---------------------------------------------- */
#reset-btn,
#browse-btn {
  cursor: pointer;
  font-weight: 600;
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 25px;
  transition: all 0.25s ease;
}

#reset-btn {
  background: linear-gradient(135deg, #e2baff, #ffb6d9);
  box-shadow: 0 0 10px rgba(226,186,255,0.6);
}

#browse-btn {
  background: linear-gradient(135deg, #cde4ff, #e2baff);
  box-shadow: 0 0 10px rgba(200,200,255,0.5);
}

#reset-btn:hover,
#browse-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(200,200,255,0.7);
}

/* 🌸 Browse Button Active Glow */
#browse-btn.active {
  background: linear-gradient(135deg, #cde4ff, #ffd9ec);
  box-shadow: 0 0 14px rgba(226, 186, 255, 0.7), 0 0 25px rgba(255, 200, 240, 0.5);
  transform: scale(1.05);
  color: #6a4c93;
  transition: all 0.25s ease;
}

/* 🔮 Loading shimmer */
.loading-shimmer {
  position: relative;
  overflow: hidden;
  background: linear-gradient(100deg, rgba(255,255,255,0.6) 20%, rgba(255,255,255,0.9) 40%, rgba(255,255,255,0.6) 60%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite linear;
  border-radius: 12px;
  height: 22px;
  width: 60%;
  margin: 8px auto;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ✨ Fade-in effect for cards when data loads */
.fade-in {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 💗 Reset button glowing pulse */
#reset-btn {
  cursor: pointer;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #e2baff, #ffb6d9);
  box-shadow: 0 0 10px rgba(226,186,255,0.6);
  transition: all 0.25s ease;
  position: relative;
}

#reset-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 18px rgba(226,186,255,0.9);
}

/* Gentle pulse every few seconds */
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 10px rgba(226,186,255,0.6); }
  50% { box-shadow: 0 0 18px rgba(255,182,240,0.8); }
}

#reset-btn.active {
  animation: pulseGlow 3s infinite;
}

/* -------------------------------------------------------
📦 CARD LAYOUTS (Games, Packs, Items)
------------------------------------------------------- */

.card {
  background: rgba(255,255,255,0.9);
  border-radius: 22px;
  padding: 30px 40px;
  box-shadow: 0 6px 25px rgba(0,0,0,0.05);
  backdrop-filter: blur(10px);
  max-width: 700px;
  width: 100%;
  margin-bottom: 30px;
  z-index: 3;
  transition: opacity 0.4s ease;
}

/* -------------------------------------------------------
🧸 LISTS & ITEMS
------------------------------------------------------- */

ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  list-style: none;
  padding: 0;
  margin: 0;
}

li {
  background: #fff;
  border-radius: 12px;
  padding: 12px 20px;
  font-weight: 500;
  color: #6a4c93;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  transition: transform .2s ease, box-shadow .2s ease;
}

li:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

/* -------------------------------------------------------
💬 STATES & MESSAGES
------------------------------------------------------- */

.hidden { display: none !important; }

.no-results {
  width: 100%;
  text-align: center;
  color: #b06ab3;
  font-weight: 600;
  margin-top: 10px;
  font-size: .95rem;
}

.highlight {
  background: linear-gradient(90deg, #ffe3f5, #e7c4ff);
  border-radius: 5px;
  padding: 0 3px;
}

/* 🌸 Loading overlay */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #ffd9ec 0%, #e2baff 50%, #cde4ff 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'Quicksand', 'Poppins', sans-serif;
  z-index: 9999;
  animation: fadeIn 0.6s ease forwards;
}

.loading-text {
  font-size: 1.5rem;
  font-weight: 600;
  background: linear-gradient(90deg, #a86aff, #ff84d6, #ffc2eb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 6px rgba(0,0,0,0.15);
  animation: textGlow 3s ease-in-out infinite alternate;
}

@keyframes textGlow {
  0% { text-shadow: 0 0 6px rgba(255,200,255,0.5); }
  100% { text-shadow: 0 0 12px rgba(255,180,255,0.8); }
}

/* ✨ Sparkle animation */
.sparkle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0) 80%);
  animation: sparkleSpin 2.5s infinite ease-in-out;
  margin-top: 20px;
}

@keyframes sparkleSpin {
  0% { transform: scale(0.8) rotate(0deg); opacity: 0.8; }
  50% { transform: scale(1.2) rotate(180deg); opacity: 1; }
  100% { transform: scale(0.8) rotate(360deg); opacity: 0.8; }
}

/* ✨ Fade-out animation for the loader */
@keyframes fadeOut {
  to { opacity: 0; visibility: hidden; }
}

#loading-screen.fade-out {
  animation: fadeOut 1s ease forwards;
}
