@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500&display=swap');

#starfield {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

#starfield::before, #starfield::after {
  content: '';
  position: absolute;
  width: 100%; height: 100%;
  top: 0; left: 0;
  background: transparent;
  pointer-events: none;
  z-index: 0;
}

#starfield::before {
  background: 
    radial-gradient(white 1px, transparent 1px) 0 0,
    radial-gradient(white 1px, transparent 1px) 50px 50px;
  background-size: 100px 100px;
  opacity: 0.35;
  animation: starMove 60s linear infinite;
}

#starfield::after {
  background: 
    radial-gradient(white 2px, transparent 2px) 20px 20px,
    radial-gradient(white 1.5px, transparent 1.5px) 70px 80px;
  background-size: 150px 150px;
  opacity: 0.25;
  animation: starMove 120s linear infinite reverse;
}

@keyframes starMove {
  0% { background-position: 0 0, 50px 50px; }
  100% { background-position: 100px 100px, 150px 150px; }
}
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: 'Segoe UI', 'Orbitron', Arial, sans-serif;
  background: linear-gradient(135deg, #0f0c29, #302b63, #ff00cc);
  background-size: 400% 400%;
  animation: neonFlow 15s ease infinite;
  color: #f0f0f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 2rem;
  overflow-x: hidden;
}

@keyframes neonFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ========== Headers: Desktop vs Mobile ========== */
.main-header-Desktop { display: block; }
.main-header-Mobile  { display: none; }

/* Desktop Heading */
.main-header-Desktop {
  width: 100%;
  text-align: center;
  padding: 0.5rem 0 1rem 0;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 2px solid rgba(255, 255, 255, 0.13);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  letter-spacing: 0.13em;
}
.headingDesktop {
  font-family: 'Orbitron', 'Segoe UI', Arial, sans-serif;
  font-size: 2.5rem;
  color: #fff8e6;
  letter-spacing: 0.13em;
  text-shadow: 0 0 8px #302b63, 0 0 18px #ff00cc;
  margin: 0;
}

/* Mobile Heading */
.main-header-Mobile {
  width: 110vw;
  text-align: center;
  padding: 0.5rem 0 0.7rem 0;
  background: rgba(20, 24, 82, 0.82);
  border-bottom: 1.5px solid #ff00cc;
  box-shadow: 0 2px 8px #ff00cc44;
  backdrop-filter: blur(3px);
  letter-spacing: 0.05em;
  box-sizing: border-box;
}
.headingMobile {
  font-family: 'Orbitron', 'Segoe UI', Arial, sans-serif;
  font-size: 1.5rem;
  color: #ffb6f9;
  letter-spacing: 0.06em;
  text-shadow: 0 0 4px #302b63, 0 0 8px #ff00cc;
  margin: 0;
  animation: fireGlow 3s infinite ease-in-out;
  margin: 0;
  letter-spacing: 2px;
  padding-left: 10px;
}

@keyframes fireGlow {
  0% {
    text-shadow: 0 0 2px #ff7300, 0 0 6px #ff7300, 0 0 10px #ff4500, 0 0 14px #ff0000;
    color: #ffe8cc;
  }
  50% {
    text-shadow: 0 0 5px #ffa500, 0 0 12px #ff4500, 0 0 22px #ff0000, 0 0 30px #ff0000;
    color: #fff0dd;
  }
  100% {
    text-shadow: 0 0 3px #ff7300, 0 0 8px #ff7300, 0 0 16px #ff3300, 0 0 24px #ff1100;
    color: #ffe6d0;
  }

}

/* Responsive: Show mobile header, hide desktop on small screens */
@media (max-width: 600px) {
  .main-header-Desktop { display: none; }
  .main-header-Mobile  { display: block; }
}

/* ========== Headers: Desktop vs Mobile ========== */
.page-title-Desktop { display: block; }
.page-title-Mobile  { display: none; }

/* Desktop Heading */
.page-title-Desktop {
  width: 100%;
  text-align: center;
  padding: 0.5rem 0 1rem 0;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 2px solid rgba(255, 255, 255, 0.13);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  letter-spacing: 0.13em;
}
.titleDesktop {
  font-family: 'Orbitron', 'Segoe UI', Arial, sans-serif;
  font-size: 2.5rem;
  color: #fff8e6;
  letter-spacing: 0.13em;
  text-shadow: 0 0 8px #302b63, 0 0 18px #ff00cc;
  margin: 0;
}

/* Mobile Heading */
.page-title-Mobile {
  width: 110vw;
  text-align: center;
  padding: 0.5rem 0 0.7rem 0;
  background: rgba(20, 24, 82, 0.82);
  border-bottom: 1.5px solid #ff00cc;
  box-shadow: 0 2px 8px #ff00cc44;
  backdrop-filter: blur(3px);
  letter-spacing: 0.05em;
  box-sizing: border-box;
}
.titleMobile {
  font-family: 'Orbitron', 'Segoe UI', Arial, sans-serif;
  font-size: 1.5rem;
  color: #ffb6f9;
  letter-spacing: 0.06em;
  text-shadow: 0 0 4px #302b63, 0 0 8px #ff00cc;
  margin: 0;
  animation: fireGlow 3s infinite ease-in-out;
  margin: 0;
  letter-spacing: 2px;
  padding-left: 10px;
}

@keyframes fireGlow {
  0% {
    text-shadow: 0 0 2px #ff7300, 0 0 6px #ff7300, 0 0 10px #ff4500, 0 0 14px #ff0000;
    color: #ffe8cc;
  }
  50% {
    text-shadow: 0 0 5px #ffa500, 0 0 12px #ff4500, 0 0 22px #ff0000, 0 0 30px #ff0000;
    color: #fff0dd;
  }
  100% {
    text-shadow: 0 0 3px #ff7300, 0 0 8px #ff7300, 0 0 16px #ff3300, 0 0 24px #ff1100;
    color: #ffe6d0;
  }

}

/* Responsive: Show mobile header, hide desktop on small screens */
@media (max-width: 600px) {
  .page-title-Desktop { display: none; }
  .page-title-Mobile  { display: block; }
}
html, body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}
/* ====== INPUT GROUP ====== */
.input-group {
  margin-bottom: 20px;
  position: relative;
}

.input-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

.input-group input[type="number"],
.input-group input[type="text"],
.input-group select {
  width: 100%;
  padding: 10px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
}

/* ====== TOOLTIP ====== */
.tooltip {
  position: relative;
  display: inline-block;
  margin-left: 8px;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 220px;
  background-color: #444;
  color: #fff;
  text-align: left;
  border-radius: 6px;
  padding: 8px;
  position: absolute;
  z-index: 999;
  bottom: 125%;
  left: 0;
  opacity: 0;
  transition: opacity 0.3s;
}

.tooltip:hover .tooltiptext,
.tooltip:focus-within .tooltiptext {
  visibility: visible;
  opacity: 1;
}

.info-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  background: #999;
  color: white;
  border-radius: 50%;
  font-size: 0.75rem;
  cursor: help;
}
/* ========== Desktop Navigation Panel ========== */
/* 🌟 Cosmic Glow Navigation Panel */
@media (max-width: 600px) {
  .main-header-Desktop { display: none; }
  .main-header-Mobile  { display: block; }
}
/* Desktop Navigation */
#desktopNav {
  background: #232946;
  color: #fff;
  padding: 0.5rem 0;
}
#desktopNav .nav-links {
  list-style: none;
  display: flex;
  gap: 1.2rem;
  align-items: center;
  margin: 0;
  padding: 0 1.5rem;
}
#desktopNav .nav-links li {
  position: relative;
}
#mobileNav .dropdown {
  position: relative;
}
#desktopNav .nav-links a {
  color: #fff;
  text-decoration: none;
  padding: 0.5rem 1rem;
  display: block;
  border-radius: 4px;
  text-shadow: 0 0 6px #ffffffaa; /* Soft glow on text */
  transition: all 0.3s ease;
}
#desktopNav .nav-links a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, #82fff5, #ff8ae2);
  box-shadow: 0 0 6px #ff8ae2;
  transition: width 0.3s ease;
  border-radius: 4px;
}

#desktopNav .nav-links a:hover::after {
  width: 80%;
}

#desktopNav .nav-links a:hover {
  background: #393e60;
}
#desktopNav .dropdown-menu {
  display: none;
  position: absolute;
  background: #232946;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  top: 100%;
  left: 0;
  min-width: 180px;
  z-index: 10;
  border-radius: 10px;
}
#desktopNav .dropdown:hover .dropdown-menu,
#desktopNav .dropdown:focus-within .dropdown-menu {
  display: block;
}
#desktopNav .dropdown-menu li a {
  padding: 0.5rem 1rem;
  white-space: nowrap;
  
}
#spellsFormDesktop{
  background: rgba(0, 0, 0, 0.44);
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 0 28px 2px #ff730055;
  width: 100%;
  max-width: 600px;
  backdrop-filter: blur(8px);
  border: 1px solid #23234d;
  margin-bottom: 2rem;
}
#spellsFormDesktop .input-group {
  margin-bottom: 1.25rem;
  position: relative;
}
#spellsFormDesktop .input-group label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: bold;
  font-size: 1rem;
  color: #ffe6d0;
  font-family: 'Orbitron', 'Segoe UI', Arial, sans-serif;
}
#spellsFormDesktop .input-group input[type="number"],
#spellsFormDesktop .input-group input[type="text"]{
  width: 100%;
  padding: 0.6rem;
  background: #23234d;
  border: 1.5px solid #b0b0b0;
  border-radius: 8px;
  color: #fff;
  font-size: 1rem;
  transition: border 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
#spellsFormDesktop .input-group input:focus,
#spellsFormDesktop .input-group select:focus {
  outline: none;
  border-color: #ff9900;
  box-shadow: 0 0 0 2px #ffb366;
}
#spellsFormDesktop button[type="submit"], 
#spellsFormDesktop button[type="button"] {
  background: linear-gradient(90deg, #00fff7 0%, #ff7300 100%);
  border: none;
  padding: 0.6rem 1.2rem;
  font-weight: bold;
  color: #000;
  border-radius: 6px;
  cursor: pointer;
  margin-right: 0.5rem;
  margin-top: 10px;
  font-family: 'Orbitron', 'Segoe UI', Arial, sans-serif;
  font-size: 1.05em;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px #ff730044;
}
#spellsFormDesktop button[type="submit"]:hover, 
#spellsFormDesktop button[type="button"]:hover {
  background: linear-gradient(90deg, #ff7300 0%, #00fff7 100%);
  color: #fff;
  transform: scale(1.04);
  box-shadow: 0 4px 16px #ff730055;
}

/* Desktop Hero Dropdown */
#spellsDropdownDesktop {
  background: #18183a;
  border: 1.5px solid #ff9900;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.24);
  z-index: 10;
  margin-top: -2px;
  color: #fff;
  max-height: 220px;
  overflow-y: auto;
  position: absolute;
  left: 0;
  width: 100%;
  display: none;
}
#spellsDropdownDesktop .dropdown-item {
  padding: 10px 18px;
  cursor: pointer;
  font-size: 1rem;
  background: transparent;
  color: #fff;
  border-radius: 6px;
  transition: background-color 0.2s, color 0.2s;
}
#spellsDropdownDesktop .dropdown-item:hover,
#spellsDropdownDesktop .dropdown-item:focus {
    background: #ff9900;
  color: #18183a;
  outline: none;
}

/* Desktop Results */
#resultContainerDesktop.result {
  background: #19232e;
  border: 1px dashed #00fff7;
  padding: 1rem;
  border-radius: 6px;
  margin-top: 1.2rem;
  color: #fff8e6;
  font-size: 1.1em;
  box-shadow: 0 2px 10px rgba(0,0,0,0.13);
  display: none;
}
#resultContainerDesktop.result strong {
  color: #393e60;
}

/* Desktop Prompt */
#spellsPromptDesktop {
font-family: 'Orbitron', 'Segoe UI', Arial, sans-serif;
font-size: 1.1em;
color: #d8fff2;
margin: 1rem 0 0 0;
text-shadow: 0 0 7px #00ffb7;
background: linear-gradient(90deg, #23234d 60%, #00ffb7 100%);
border-radius: 10px;
padding: 0.75em 1.2em;
border: 2px solid #00ffb7;
box-shadow: 0 0 16px #00ffb744, 0 2px 10px #00ffb733;
min-height: 2.3em;
display: flex;
align-items: center;
transition: background-color 0.3s, color 0.3s;
}

#spellsFormDesktop input[readonly], 
#spellsFormDesktop input[disabled] {
  background: #f4f4f4;
  color: #888;
}
.elixircolor {
  color: #ff00cc;
  text-shadow: 0 0 8px #ff00cc;
  font-weight: bold;
  font-family: 'Rajdhani', Arial, sans-serif;
}

#darkelixirCostDesktop {
  color: #ff00cc;            /* Neon Pink */
  text-shadow: 0 0 8px #ff00cc;
  font-family: 'Rajdhani', Arial, sans-serif;
}

.timeDesktop {
  color: #fff; /* White */
  font-weight: bold;
  font-family: 'Rajdhani', Arial, sans-serif;
}
/***************************
 * MOBILE STYLES
 ***************************/

/* Mobile Navigation */
#mobileNav {
  background: #232946;
  color: #fff;
  padding: 0.1rem 0.1rem;
}
#mobileNav .mobile-nav-links {
  list-style: none;
  display: flex;
  gap: 0.1rem;
  align-items: center;
  margin: 0;
  padding-left: 10px;
}
#mobileNav .mobile-nav-links li {
  position: relative;
}
#mobileNav .mobile-nav-links a {
  color: #fff;
  text-decoration: none;
  padding: 0.5rem 1.1rem;
  display: block;
  border-radius: 2px;
  transition: background-color 0.2s;
}
#mobileNav .mobile-nav-links a:hover {
  background: #393e60;
}
#mobileNav .dropdown-menu li {
  margin-bottom: 0.12em; /* Small vertical gap */
}

#mobileNav .dropdown-menu li:last-child {
  margin-bottom: 0; /* Remove gap after the last item */
}

#mobileNav .dropdown-menu {
  display: none;
  position: absolute;
  background: #232946;
  box-shadow: none;
  min-width: 160px;
  z-index: 10;
}
#mobileNav .dropdown:hover .dropdown-menu,
#mobileNav .dropdown:focus-within .dropdown-menu {
  display: block;
}
#mobileNav .dropdown-menu li a {
  padding: 0.1rem 0.1rem;
  white-space: nowrap;
  
}

/* Mobile Calculator Form */
#spellsFormMobile.calculator {
  background: rgba(0, 0, 0, 0.44);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  max-width: 85vw;
  margin: 1.2rem auto;
  padding: 1.0rem 0.8rem 0.5rem 0.8rem;
  min-height: 380px;       /* Reserve space for basic content */
  max-height: 80vh;        /* Limit to 80% of the viewport height */
  overflow-y: auto;        /* Enable vertical scrolling if content overflows */
  transition: max-height 0.4s;
}

#spellsFormMobile .input-group {
  margin-bottom: 1.1rem;
  display: flex;
  flex-direction: column;
}

#spellsFormMobile .input-group label {
  margin-bottom: 0.4rem;
  font-weight: 500;
  color: #ffe6d0;
}
#spellsFormMobile .input-group input[type="number"],
#spellsFormMobile .input-group input[type="text"],
#spellsFormMobile .input-group select {
  padding: 0.7rem;
  border: 1px solid #bfc0c0;
  border-radius: 4px;
  outline: none;
  transition: border-color 0.2s;
  color: #111; /* Dark black for mobile */
  background: #fff;
}
#spellsFormMobile .input-group input:focus,
#spellsFormMobile .input-group select:focus {
  border-color: #232946;
}
#spellsFormMobile button[type="submit"]{
  background: linear-gradient(90deg, #1a2980 0%, #c471f5 100%);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 0.7rem 1.5rem;
  font-size: 1rem;
  margin-right: 0.5rem;
  cursor: pointer;
  font-family: 'Orbitron', 'Segoe UI', Arial, sans-serif;
  transition: background-color 0.2s;
  box-shadow: 0 2px 8px #ff730044;
}
#spellsFormMobile button[type="button"]{
   background: linear-gradient(90deg, #ff00cc 0%, #ff7300 100%);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 0.7rem 1.5rem;
  font-size: 1rem;
  margin-right: 0.5rem;
  cursor: pointer;
  transition: background-color 0.2s;
  font-family: 'Orbitron', 'Segoe UI', Arial, sans-serif;
}
#spellsFormMobile button[type="submit"]:hover, 
#spellsFormMobile button[type="button"]:hover {
  background: #393e60;
}

/* Mobile Hero Dropdown */
#spellsDropdownMobile {
  display: none;
  position: absolute;
  background: #fff;
  border: 1px solid #bfc0c0;
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  top: 100%;
  left: 0;
  min-width: 180px;
  z-index: 100;
  max-height: 220px;
  overflow-y: auto;
}
#spellsDropdownMobile .dropdown-item {
  padding: 0.6rem 1rem;
  cursor: pointer;
  color: #0028f1;
}
#spellsDropdownMobile .dropdown-item:hover {
  background: #e7eaf6;
}

/* Mobile Results */
#resultContainerMobile.result {
  background: #e7eaf6;
  border-radius: 6px;
  padding: 1.2rem;
  margin-top: 1.2rem;
  color: #232946;
  font-size: 1.07rem;
}
#resultContainerMobile.result strong {
  color: #393e60;
}

/* Mobile Prompt */
#spellsPromptMobile {
 font-family: 'Orbitron', 'Segoe UI', Arial, sans-serif;
font-size: 1.1em;
color: #e0e7ff;
margin: 1rem 0 0 0;
text-shadow: 0 0 8px #7f5cff;
background: linear-gradient(90deg, #23234d 60%, #7f5cff 100%);
border-radius: 10px;
padding: 0.75em 1.2em;
border: 2px solid #7f5cff;
box-shadow: 0 0 16px #7f5cff44, 0 2px 12px rgba(0,0,0,0.18);
min-height: 2.2em;
display: flex;
align-items: center;
transition: background-color 0.3s, color 0.3s;

}

#spellsFormMobile input[readonly], 
#spellsFormMobile input[disabled] {
  background: #f4f4f4;
  color: #888;
}
/* styles.css */
.spells-inputs {
  margin-top: 25px;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Shared prompt base */
.input-prompt {
  position: absolute;
  left: 0;
  top: 100%;
  z-index: 10;
  min-width: 220px;
  max-width: 90vw;
  padding: 0.6em 1em;
  border-radius: 5px;
  font-size: 1em;
  font-family: 'Segoe UI', Arial, sans-serif;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  margin-top: 0.3em;
  display: block;
  box-shadow: 0 2px 8px #f8bcbc33;
  border: 1px solid #f8bcbc;
}

/* Desktop-specific prompt style 
.input-prompt-desktop {
  background: #fff3f3;
  color: #d32f2f;
}*/

/* Mobile-specific prompt style */
.input-prompt-mobile {
  background: #ff6f91;
  color: #fff;
  border: 1px solid #ffb6c1;
  font-size: 1.08em;
}

/* Show the prompt 
.input-prompt.show {
  opacity: 1;
  pointer-events: auto;
}*/
.inline-error-box {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  background: #fff5f5;
  color: #d32f2f;
  border: 1px solid #d32f2f;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  font-size: 0.9em;
  padding: 6px 12px;
  margin-top: 4px;
  z-index: 1000;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity 0.18s;
  opacity: 0;
}
.inline-error-box[style*="display: block"] {
  opacity: 1;
}
/* Responsive: Only show relevant prompt on each device */
@media (max-width: 600px) {
  .input-prompt-desktop { display: none !important; }
  .input-prompt-mobile { display: block !important; }
}
@media (min-width: 601px) {
  .input-prompt-desktop { display: block !important; }
  .input-prompt-mobile { display: none !important; }
}


/* Responsive Tweaks (Optional) */
@media (max-width: 600px) {
  #desktopNav, #spellsFormDesktop { display: none !important; }
  #mobileNav, #spellsFormMobile { display: block !important; }
}
@media (min-width: 601px) {
  #mobileNav, #spellsFormMobile { display: none !important; }
  #desktopNav, #spellsFormDesktop { display: block !important; }
}
