:root {
  --bg: #0f172a;
  --text: #f8fafc;
  --card: #1e293b;
  --element: #334155;
  --mixing-bg: rgba(71, 85, 105, 0.3);
  --primary: #818cf8;
  --secondary: #34d399;
  --accent: #fcd34d;
  --muted: #d1d5db;
}

body.dark {
  --bg: #0f172a;
  --text: #f8fafc;
  --card: #1e293b;
  --element: #334155;
  --mixing-bg: rgba(71, 85, 105, 0.3);
  --primary: #818cf8;
  --secondary: #34d399;
  --accent: #fcd34d;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  margin: 0;
  padding: 20px;
  transition: background 0.3s ease, color 0.3s ease;
}
h1 {
  color: var(--primary);
  text-align: center;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle at center, rgba(192,132,252,0.1), transparent 60%);
  z-index: -1;
  animation: mysticPulse 8s ease-in-out infinite;
}

@keyframes mysticPulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.03); }
}

body::after {
  content: "";
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
  opacity: 0.1;
  animation: sparkleDrift 40s linear infinite;
  z-index: -1;
}

@keyframes sparkleDrift {
  0% { background-position: 0 0; }
  100% { background-position: 1000px 1000px; }
}

#cursor-canvas {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 99999;
}

.title {
  font-family: 'Cinzel Decorative', cursive;
  font-size: 3rem;
  color: #fcd34d;
  text-shadow: 0 0 8px #fcd34d, 0 0 16px #a78bfa;
  animation: floatTitle 4s ease-in-out infinite, sparkleGlow 2.5s ease-in-out infinite;
}

@keyframes floatTitle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes sparkleGlow {
  0%, 100% { text-shadow: 0 0 8px #fcd34d, 0 0 16px #a78bfa; }
  50% { text-shadow: 0 0 12px #c084fc, 0 0 24px #818cf8; }
}

.pt-element.discovered {
  animation: flipIn 0.5s ease, alchemyGlow 2.5s ease-in-out infinite;
}

@keyframes alchemyGlow {
  0%, 100% {
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.4), 0 0 20px rgba(34, 211, 238, 0.2);
  }
  50% {
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.6), 0 0 30px rgba(34, 211, 238, 0.4);
  }
}

.subtitle {
  text-align: center;
  margin-bottom: 30px;
}

.game-container {
  background: var(--card);
  color: var(--text);
  border-radius: 0;
  box-shadow: none;
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 30px 40 px;
  padding-bottom: 140px;
}

.game-container {
  border: 3px solid transparent;
  animation: borderHueShift 10s infinite linear;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.05);
}

@keyframes borderHueShift {
  0% { border-color: #4f46e5; }
  25% { border-color: #ec4899; }
  50% { border-color: #10b981; }
  75% { border-color: #fcd34d; }
  100% { border-color: #4f46e5; }
}

.remove-btn {
  background: transparent;
  border: none;
  color: #e11d48; /* red */
  font-size: 1rem;
  position: absolute;
  top: 4px;
  right: 6px;
  cursor: pointer;
}

.mixing-area {
  background-color: var(--element);
  border: 2px dashed #10b981;
  color: var(--text);
  border-radius: 15px;
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px;
  flex-wrap: wrap;
  gap: 10px;
  transition: background 0.3s ease;
}

.game-columns {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 10px;
}

.discovery-section, .elements-section {
  background: #0f172a;
  border-radius: 15px;
  padding: 20px;
  color: #f8fafc;
  border: 1px solid #1e293b;
    border: 2px solid #475569;
}

.elements-grid, .mixing-area {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 120px;
  padding: 10px;
 background-color: #1e293b; 
   border: 2px solid #10b981;
  color: #f8fafc;
  border-radius: 10px;
}


.mixing-area.empty {
  justify-content: center;
  align-items: center;
  color: #6b7280;
  border: 2px dashed var(--primary);
}

.result-area {
  min-height: 100px;
  padding: 20px;
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  margin-top: 20px;
  
}

#mix-btn {
  background: linear-gradient(135deg, #8b5cf6, #4f46e5); 
  color: white;
  font-size: 1.1rem;
  padding: 12px 20px;
  border: none;
  border-radius: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-top: 10px;
}

#mix-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  background: linear-gradient(135deg, #7c3aed, #4338ca);
}

#reset-btn {
  background: linear-gradient(135deg, #ef4444, #dc2626); 
  color: white;
  font-size: 1.1rem;
  padding: 12px 20px;
  border: none;
  border-radius: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-top: 10px;
}

#reset-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
  background: linear-gradient(135deg, #dc2626, #991b1b);
}

#search-input {
  width: 98.5%;
  padding: 10px;
  margin-bottom: 10px;
  font-size: 1rem;
  border-radius: 8px;
   background-color: #1e293b; 
  color: #f8fafc;
  border: 2px solid #10b981;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(30, 41, 59, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: white;
  border-radius: 15px;
  padding: 30px 25px;
  text-align: center;
  max-width: 400px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.modal-content {
  background: var(--card);
  color: var(--text);
  border-radius: 15px;
  padding: 30px 25px;
  text-align: center;
  max-width: 400px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.modal-buttons {
  display: flex;
  justify-content: space-around;
  gap: 10px;
}

.modal-buttons button {
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
}

#confirm-reset {
  background-color: #ef4444;
  color: white;
}

#cancel-reset {
  background-color: #e5e7eb;
  color: #1e293b;
}

.periodic-table {
  display: grid;
  grid-template-columns: repeat(18, 75px);
  gap: 5px; 
  background-color: var(--bg); 
  padding: 10px;
  border-radius: 10px;

}

.empty-cell {
  width: 70px;
  height: 70px;
  visibility: hidden;
}

.pt-element div {
  line-height: 1.1;
}

.pt-element {
  width: 75px;
  height: 75px;
  background-color: #2dd4bf;
  border: 2px solid #14b8a6;
  border-radius: 4px;
  font-family: 'Segoe UI', sans-serif;
  font-weight: bold;
  color: var(--text); 

  position: relative;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease;
  cursor: pointer;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0px;
  box-sizing: border-box;
  
}

.pt-element:hover {
  transform: scale(1.05);
}

.pt-number {
  position: absolute;
  top: 2px;
  left: 4px;
  font-size: 0.7rem;
  font-weight: 600;
}
.pt-symbol {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 4px;
}

.pt-name {
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  text-align: center;
}

.pt-mass {
  font-size: 0.7rem;
}

.highlight {
  box-shadow: 0 0 15px 5px #4ade80;
  transform: scale(1.05);
  transition: all 0.2s ease;
}

.shake {
  animation: shake 0.4s ease;
}

@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-4px); }
  100% { transform: translateX(0); }
}

.element-tile {
  width: 75px;
  height: 90px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.pt-element {
  @extend .element-tile;
}

.alkali-metal {
    background-color: #ef4444; 
    color: #1e293b;
}

.alkaline-earth-metal {
    background-color: #facc15; 
    color: #1e293b;            
}

.transition-metal {
    background-color: #fb7185;
    color: #1e293b;
}

.post-transition-metal {
    background-color: #d2691e;
    color: #1e293b;
}

.metalloid {
    background-color: #fcd34d; 
    color: #1e293b;
}

.nonmetal {
    background-color: #34d399;
    color: #1e293b;
}

.halogen {
    background-color: #8b5cf6; 
    color: #1e293b;
}

.noble-gas {
    background-color: #f472b6;
    color: #1e293b;
}

.lanthanide {
    background-color: #0ea5e9; 
    color: #1e293b;
}

.actinide {
    background-color: #f97316; 
    color: #1e293b;
}

.unknown {
    background-color: #6b7280;
    color: #1e293b;
}


.empty-cell {
  visibility: hidden;
}

.dark-mode .category-unknown {
  background: #adb5bd; 
}

.legend {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 2px 5px;
  margin-top: 20px;
  color: var(--text);
  font-size: 0.8rem;
}

.legend div span {
  display: inline-block;
  width: 40px;
  height: 40px;
  margin-right: 8px;
  vertical-align: middle;
  border-radius: 4px;
}

#flaskii {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: flaskiiPop 1s ease-out;
}

.flaskii-body {
  font-size: 3rem;
  cursor: pointer;
  animation: bounce 2s infinite;
}

.flaskii-bubble {
  background: white;
  color: #333;
  padding: 10px 15px;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  font-size: 0.85rem;
  max-width: 200px;
  transition: opacity 0.3s ease;
}

.dark-mode #flaskii .flaskii-body {
  text-shadow: 0 0 8px var(--primary);
}

#flaskii.reacting .flaskii-body {
  transform: scale(1.2) rotate(-3deg);
}

@keyframes flaskiiPop {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

#sound-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--primary);
  color: white;
  border: none;
  padding: 8px 12px;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
  z-index: 9999;
}

.element-info-popup {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #1e293b;
  color: #f8fafc;
  border: 2px solid #10b981;
  border-radius: 15px;
  padding: 20px 30px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  z-index: 9999;
  width: max-content;
  text-align: center;
  transition: all 0.3s ease;
}

.element-bottom-popup {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1e293b;
  color: #f8fafc;
  border-top: 3px solid #10b981;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.2);
  padding: 20px 30px;
  display: flex;
  justify-content: center;
  z-index: 9999;
  transition: transform 0.3s ease;
}

.element-bottom-popup.hidden {
  transform: translateY(100%);
  visibility: hidden;
}

.element-popup-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
  max-width: 1100px;
  gap: 20px;
  position: relative;
}

.popup-column {
  flex: 1;
  min-width: 150px;
}

.popup-symbol {
  font-size: 3rem;
  font-weight: bold;
  color: var(--primary);
}

.popup-name {
  font-size: 1.4rem;
  font-weight: 500;
}

.popup-close {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 2rem;
  cursor: pointer;
  color: #888;
  transition: color 0.2s ease;
}

.popup-close:hover {
  color: #222;
}

.quiz-popup {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quiz-popup.hidden {
  display: none;
}

.quiz-box {
  background-color: #1e293b;
  color: #f8fafc;
  border: 2px solid #334155;
  border-radius: 16px;
  padding: 30px;
  max-width: 500px;
  text-align: center;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
}

.quiz-options button {
  margin: 8px;
  padding: 10px 18px;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: white;
  cursor: pointer;
  transition: background 0.2s;
}

.quiz-options button:hover {
  background: var(--secondary);
}

.start-section {
  text-align: center;
  margin: 20px auto;
}

#start-quiz-btn {
  font-size: 1.2rem;
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  background-color: var(--primary);
  color: white;
  cursor: pointer;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  transition: 0.3s ease;
}

#start-quiz-btn:hover {
  background-color: var(--secondary);
}

.pt-element.hidden-element {
  background-color: #1e1e1e;
  color: #555;
  border: 1px solid #333;
  pointer-events: none;
  transition: all 0.3s ease;
}

.pt-element.discovered {
  animation: flipIn 0.5s ease;
}

@keyframes flipIn {
  0% {
    transform: rotateY(90deg);
    opacity: 0;
  }
  100% {
    transform: rotateY(0deg);
    opacity: 1;
  }
}

.correct-flash {
  background-color: var(--secondary) !important;
  color: white;
  box-shadow: 0 0 10px var(--secondary);
}

.wrong-flash {
  background-color: #f87171 !important;
  color: white;
  box-shadow: 0 0 10px #f87171;
}

.quiz-success {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: white;
  color: black;
  z-index: 2;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.quiz-success.hidden {
  display: none;
}

.success-buttons {
  margin-top: 20px;
  display: flex;
  gap: 20px;
}

.success-buttons button {
  padding: 10px 20px;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  background-color: var(--primary);
  color: white;
  cursor: pointer;
  transition: background 0.2s ease;
}

.success-buttons button:hover {
  background-color: var(--secondary);
}

#quiz-result {
  margin-top: 20px;
}

#quiz-result.hidden {
  display: none;
}

#next-quiz-btn {
  margin-top: 10px;
  padding: 10px 20px;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s;
}

#next-quiz-btn:hover {
  background-color: var(--secondary);
}

.quiz-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 15px;
}

#close-quiz-btn {
  padding: 10px 20px;
  background-color: #999;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s;
}

#close-quiz-btn:hover {
  background-color:  #ef4444;
}

#resume-quiz-btn {
  font-size: 1.1rem;
  padding: 10px 22px;
  margin-top: 12px;
  border: none;
  border-radius: 10px;
  background-color: var(--accent);
  color: white;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  transition: 0.3s ease;
}

#resume-quiz-btn:hover {
  background-color: #e08e00;
  transform: scale(1.05);
}

#resume-quiz-btn.hidden {
  display: none;
  opacity: 0;
  transform: scale(0.9);
}

#resume-quiz-btn {
  animation: popIn 0.4s ease;
}

@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.card-flip {
  perspective: 1000px;
  width: 100%;
  height: 100%;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s;
}

.card-inner.flipped {
  transform: rotateY(180deg);
}

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 4px;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  padding: 6px;
  box-sizing: border-box;
}

.card-front {
  background-color: #222;
  color: #ccc;
}

.card-back {
  background-color: var(--light);
  transform: rotateY(180deg);
  color: black;
}

.card-back .pt-element {
  all: unset;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  padding: 4px;
  border-radius: 4px;
  box-sizing: border-box;
}

.card-front .pt-symbol {
  text-shadow: 0 0 5px white;
  animation: pulse 1.2s infinite ease-in-out;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); opacity: 0.9; }
}

#intro-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: white;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.intro-content {
  text-align: center;
  animation: slideUp 1s ease-out;
}

.intro-title {
  font-size: 3rem;
 font-family: 'Cinzel Decorative', cursive;
  color: var(--accent);
  margin-bottom: 10px;
}

.intro-subtitle {
  font-size: 1.2rem;
  margin-bottom: 20px;
  opacity: 0.9;
}

#enter-btn {
  padding: 12px 28px;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

#enter-btn:hover {
  background-color: var(--secondary);
}

@keyframes fadeIn {
  from { opacity: 0 }
  to { opacity: 1 }
}

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.click-hint {
  text-align: center;
  font-size: 0.9rem;
  color: var(--accent);
  margin-top: 8px;
  animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

#evaluation-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--accent);
  color: white;
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: bold;
  font-family: 'Segoe UI', sans-serif;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  transition: background 0.3s, transform 0.3s;
  z-index: 1000;
}

#evaluation-btn:hover {
  background: #d97706;
  transform: scale(1.05);
}

.readme-overlay {
  display: none; 
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
  z-index: 99999;
}

.readme-box {
  background: #fff;
  padding: 30px 40px;
  border-radius: 20px;
  text-align: center;
  color: #111;
  max-width: 450px;
  box-shadow: 0 0 20px rgba(0,0,0,0.25);
  animation: popIn 0.4s ease;
}

.readme-box h2 {
  margin-top: 0;
  font-size: 1.8rem;
  color: var(--primary);
}

.readme-box ul {
  text-align: left;
  padding-left: 20px;
  margin: 20px 0;
}

.readme-box button {
  padding: 10px 20px;
  font-weight: bold;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.2s;
}

.readme-box button:hover {
  background: var(--secondary);
}

.readme-overlay {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.readme-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.highlight-bounce {
  animation: bounceHighlight 1s infinite;
  box-shadow: 0 0 10px var(--accent);
}

@keyframes bounceHighlight {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

#start-quiz-btn.highlight-bounce {
  animation: bounceHighlight 1.2s infinite;
  box-shadow: 0 0 10px var(--accent), 0 0 20px var(--accent);
  background-color: var(--accent);
  color: white;
  font-weight: bold;
  transform-origin: center;
  border: none;
  outline: none;
  transition: background 0.3s;
  position: relative;
  z-index: 1;
}

#start-quiz-btn.highlight-bounce:hover {
  background-color: var(--secondary);
  box-shadow: 0 0 15px var(--secondary), 0 0 25px var(--secondary);
}

#start-quiz-btn.highlight-bounce::after {
  content: "";
  position: absolute;
  inset: -10px;
  border: 2px solid var(--accent);
  border-radius: 12px;
  animation: pulseRing 1.5s infinite;
  pointer-events: none;
}

@keyframes bounceHighlight {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes pulseRing {
  0% { opacity: 0.6; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.5); }
}

.combo-success {
  text-align: center;
  background-color: #1e293b; 
  color: #f8fafc; 
  border: 2px solid #10b981;
  border-radius: 12px;
  padding: 20px;
  animation: popIn 0.5s ease-out;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
 }
 
.combo-success:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.6); 
}

@keyframes popIn {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.combo-text {
  font-size: 1.2rem;
  color: #065f46;
}

.compound-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #10b981;
  color: white;
  padding: 30px;
  border-radius: 20px;
  font-size: 1.5rem;
  box-shadow: 0 0 30px rgba(0,0,0,0.4);
  z-index: 9999;
  animation: zoomIn 0.4s ease;
}

@keyframes zoomIn {
  from {
    transform: translate(-50%, -50%) scale(0.3);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

#vault-modal {
  background: rgba(0, 0, 0, 0.7);
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

#vault-modal .modal-content {
  background-color: #1f2937;
  color: white;
  padding: 30px;
  border-radius: 16px;
  max-height: 80vh;
  width: 90%;
  max-width: 1000px;
  overflow-y: auto;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
  position: relative;
}

#vault-modal.hidden {
  display: none;
}

#vault-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
  max-height: 400px;
  overflow-y: auto;
}

.vault-card {
  background: #111827;
  padding: 20px;
  border-radius: 16px;
  width: 250px;
  flex: 1 1 250px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.vault-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.vault-card h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
  color: #facc15; 
}

.vault-card p {
  margin: 5px 0;
  font-size: 0.95rem;
  line-height: 1.4;
  color: #d1d5db; 
}

.vault-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  justify-content: space-between;
}

#vault-search,
#vault-filter,
#vault-sort {
  padding: 10px;
  border-radius: 10px;
  border: none;
  font-size: 1rem;
  background-color: #374151;
  color: white;
  flex-grow: 1;
  min-width: 150px;
}

#vault-clear {
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 10px;
  padding: 10px 15px;
  cursor: pointer;
  transition: background 0.2s ease;
}

#vault-clear:hover {
  background: #dc2626;
}

#hint-btn {
  margin-top: 20px;
  background: linear-gradient(135deg, #facc15, #fbbf24);
  color: #1f2937;
  border: none;
  padding: 12px 18px;
  font-size: 1rem;
  border-radius: 12px;
  cursor: pointer;
  font-weight: bold;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}


#hint-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

#hint-area {
  margin-top: 10px;
  font-style: italic;
  font-size: 1rem;
  color: #fcd34d; 
}

#hint-area {
   background-color: #1e293b; 
   border: 2px solid #10b981;
  padding: 12px;
  border-radius: 10px;
  margin-top: 10px;
  font-size: 1rem;
  color: white;
  font-style: italic;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.4);
}

#hint-area {
  transition: all 0.3s ease;
  opacity: 0;
}

#hint-area.show {
  opacity: 1;
}

@keyframes bounceButton {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

#hint-btn.bounce {
  animation: bounceButton 1s ease-in-out infinite;
}

#vault-btn {
  background: linear-gradient(135deg, #14b8a6, #0ea5e9);
  color: white;
  font-size: 1.1rem;
  padding: 10px 22px;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: 
    transform 0.2s ease,
    background-color 0.2s ease;
  animation: popIn 0.4s ease;
}

#vault-btn:hover {
  background: linear-gradient(135deg, #0E8C9E, #0C7496);
  transform: scale(1.05);
}

#vault-btn.hidden {
  display: none;
  opacity: 0;
  transform: scale(0.9);
}

#vault-btn:active {
  transform: scale(0.98);
}

@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}


#hint-btn.bounce {
  animation: bounceButton 1s ease-in-out infinite, glowPulse 2s ease-in-out infinite;
  box-shadow: 0 0 10px rgba(255, 214, 10, 0.6), 0 0 20px rgba(255, 214, 10, 0.4);
}

@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 10px rgba(255, 214, 10, 0.6), 0 0 20px rgba(255, 214, 10, 0.4);
  }
  50% {
    box-shadow: 0 0 18px rgba(255, 214, 10, 0.8), 0 0 30px rgba(255, 214, 10, 0.6);
  }
}

#flaskii.reacting .flaskii-body {
  transform: scale(1.2) rotate(-2deg);
  text-shadow: 0 0 12px #f472b6, 0 0 20px #818cf8;
}

##table-quiz-popup .quiz-options button {
  margin: 4px;
  padding: 6px 10px;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
  background: #fcd34d;
  border: 2px solid #fbbf24;
  transition: background 0.2s ease;
}
#table-quiz-popup .quiz-options button:hover {
  background: #facc15;
}

.fancy-quiz {
  background-color: #1e293b;
  border: 2px solid #38bdf8;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  animation: pop-in 0.4s ease;
}

.quiz-element-display {
  font-size: 2.2rem;
  margin: 15px 0;
  font-weight: bold;
  color: #fcd34d;
}

.styled-options,
#table-quiz-popup .quiz-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}

.styled-options button,
#table-quiz-popup .quiz-options button {
  padding: 8px 16px;
  font-size: 1rem;
  border-radius: 10px;
  border: 2px solid transparent;
  background: linear-gradient(to right, #facc15, #fbbf24);
  color: #1e293b;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
}

.styled-options button:hover,
#table-quiz-popup .quiz-options button:hover {
  transform: scale(1.08);
  background: linear-gradient(to right, #fde68a, #facc15);
}

.quiz-result,
#quiz-result-text {
  margin-top: 10px;
  font-size: 1.1rem;
  font-weight: bold;
}

@keyframes pop-in {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes shake {
  0% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
  100% { transform: translateX(0); }
}

.shake {
  animation: shake 0.4s ease;
}

#start-table-quiz-btn {
  padding: 12px 24px;
  background-color: #8b5cf6;
  color: white;
  font-size: 1.1rem;
  font-weight: bold;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  margin-top: 10px;
  transition: transform 0.2s ease, background-color 0.2s;
  box-shadow: 0 0 12px #a78bfa; 
  animation: bounce 1.5s infinite;
}

#start-table-quiz-btn:hover {
  background-color: #7c3aed;
  transform: scale(1.05);
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

#quiz-options button {
  padding: 8px 16px;
  font-size: 1rem;
  border-radius: 10px;
  border: 2px solid transparent;
  background: linear-gradient(to right, #facc15, #fbbf24);
  color: #1e293b;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  margin: 5px;
}

#quiz-options button:hover {
  transform: scale(1.08);
  background: linear-gradient(to right, #fde68a, #facc15);
}

#progress-container {
  width: 100%;
  max-width: 500px;
  margin: 20px auto;
  background: #334155;
  border-radius: 10px;
  overflow: hidden;
  height: 24px;
  position: relative;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  animation: pop-scale 0.5s ease;
}

#progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, #38bdf8, #0ea5e9);
  transition: width 0.6s ease-in-out;
  box-shadow: 0 0 8px #0ea5e9a0;
}

#progress-text {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.85rem;
  color: #f1f5f9;
  font-weight: bold;
  line-height: 24px;
  pointer-events: none;
}

@keyframes pop-scale {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes glow-burst {
  0% {
    box-shadow: 0 0 8px #0ea5e9a0;
  }
  50% {
    box-shadow: 0 0 20px #38bdf8, 0 0 30px #0ea5e9;
  }
  100% {
    box-shadow: 0 0 8px #0ea5e9a0;
  }
}

.glow-burst {
  animation: glow-burst 1s ease-in-out;
}

.hidden {
  display: none !important;
}

#progress-container {
  transition: opacity 0.5s ease;
}

.periodic-groups {
    display: grid;
    grid-template-columns: 50px repeat(18, 75px); 
    margin-bottom: 5px;
}

.group-label {
    text-align: center;
    color: var(--text);
    font-size: 0.75rem;
    padding-left: 10px;
}

.periodic-full-grid {
    display: grid;
    grid-template-columns: 50px repeat(18, 75px); 
    grid-auto-rows: 75px;
    gap: 5px;
}

.periodic-label {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--text);
}

.empty-cell {
    width: 75px;
    height: 75px;
    visibility: hidden;
}

.lan-act-section {
  margin-top: 15px;
}

.lan-row,
.ac-row {
  display: grid;
  grid-template-columns: repeat(18, 75px); 
  gap: 5px;
  margin-top: 5px;
    margin-left: 55px;
  padding-left: 0;
}

.empty-cell {
  width: 75px;
  height: 75px;
  visibility: hidden;
}

.win-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 10, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 1;
  transition: opacity 0.3s;
}

.win-content {
  background: #1a1a1a;
  padding: 40px;
  border-radius: 10px;
  text-align: center;
  color: white;
  max-width: 400px;
  box-shadow: 0 0 40px rgba(255, 255, 255, 0.1);
}

.win-content h1 {
  font-size: 1.8rem;
  margin-bottom: 15px;
}

.win-content button {
  margin-top: 20px;
  padding: 10px 20px;
  font-weight: bold;
  border: none;
  border-radius: 5px;
  background: #4caf50;
  color: white;
  cursor: pointer;
}

.hidden {
  display: none;
}

#dev-unlock {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 8px 12px;
  background: #444;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  opacity: 0.4;
  cursor: pointer;
  z-index: 1000;
}

#dev-unlock:hover {
  opacity: 1;
}

.pt-element.flip {
  animation: flip 0.5s ease-in-out;
}

@keyframes flip {
  0% {
    transform: rotateY(90deg);
    opacity: 0;
  }
  100% {
    transform: rotateY(0);
    opacity: 1;
  }
}

html {
  zoom: 67%;
}

#intro-screen {
  zoom: 150%;
  transform-origin: top left;
}

.phase-filters {
  margin-top: 30px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.phase-filters button {
  background: #101d30;
  color: #fff;
  border: 2px solid #ffffff33;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.phase-filters button:hover {
  background: #1d2e4d;
  border-color: #00bfff;
  color: #00bfff;
  transform: scale(1.05);
}

.phase-filters button.active {
  background: #00bfff;
  color: #000;
  border-color: #00bfff;
  box-shadow: 0 0 10px #00bfff88;
}

.highlight-phase {
  box-shadow: 0 0 15px 5px #00ffffaa;
  transform: scale(1.05);
  z-index: 2;
  transition: all 0.3s ease;
}

.dimmed-phase {
  opacity: 0.1;
  filter: grayscale(1) brightness(0.5);
  pointer-events: none;
  transition: all 0.3s ease;
}

#puzzle-submit { 
  background: #818cf8;
  color: #fff; 
}

#puzzle-reset { 
  background: #fbbf24; 
  color: #1e293b; 
}

#puzzle-close { 
  background: #ef4444; 
  color: #fff; 
}

#puzzle-submit:hover { 
  background: #10b981; 
  color: #fff; 
}

#puzzle-reset:hover {
  background: #e08e00; 
  color: #1e293b; 
}

#puzzle-close:hover { 
  background: #dc2626;  
  color: #fff; 
}

#puzzle-submit,
#puzzle-reset,
#puzzle-close {
  transition: all 0.2s ease;
  transform: translateY(0);
}

#puzzle-submit:hover,
#puzzle-reset:hover,
#puzzle-close:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.puzzle-wrapper {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: start;
  height: 100%;
}

.puzzle-grid .empty-cell {
  background-color: transparent;
  border: none;
}

.puzzle-grid {
  display: grid;
  grid-template-columns: repeat(18, 75px);
  gap: 5px;
  padding: 10px;
  background-color: #1e293b;
  border: 2px solid #10b981;
  border-radius: 10px;
  min-height: 600px; 
}

.puzzle-slot {
width: 75px;
height: 75px;
  border: 2px dashed #334155;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: var(--text);
  font-size: 0.9rem;
}

.puzzle-slot.disabled {
  visibility: hidden;
  border: none;
}

.puzzle-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-height: 600px;
  overflow-y: auto;
  padding: 10px;
  justify-content: center;
}

.puzzle-card {
  width: 75px;
  height: 75px;
  background-color: #2dd4bf;
  border: 2px solid #14b8a6;
  border-radius: 8px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
}

.puzzle-card.dragging {
  opacity: 0.6;
}

.puzzle-slot.correct {
  background: rgba(16, 185, 129, 0.15);
  border-color: #10b981;
}

.puzzle-slot.wrong {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
}

.puzzle-result {
  margin-top: 12px;
  font-weight: 600;
}

.puzzle-slot.wrong.shake {
  animation: shake 0.4s ease;
}

.puzzle-cell {
  width: 75px;
  height: 75px;
  border: 2px dashed #6b7280;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: var(--text);
  font-size: 0.9rem;
}
.empty-cell {
  visibility: hidden;
}

.modal-content {
  max-height: 85vh;
  overflow-y: auto;
}

.puzzle-tile {
  width: 75px;
  height: 75px;
  background-color: #1e293b !important;
  border: 2px dashed #10b981 !important;
  opacity: 1 !important;
  transform: none !important;
  border-radius: 4px;
  font-weight: bold;
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'Segoe UI', sans-serif;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  cursor: grab;
}

.puzzle-tile:hover {
  transform: scale(1.1);
}

.puzzle-toolbar {
  margin-bottom: 20px;
  text-align: center;
}

.puzzle-toolbar button {
  margin: 5px;
  padding: 10px 20px;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  background: var(--primary);
  color: white;
  transition: 0.2s ease;
}

.puzzle-toolbar button:hover {
  background: var(--secondary);
}

.puzzle-actions {
  display: flex;
  gap: 12px;
    justify-content: center;
	padding-top: 10px;
}

.puzzle-actions button {
  padding: 10px 18px;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background: var(--primary);
  color: white;
  justify-content: center;
}

.puzzle-actions button:hover {
  background: var(--secondary);
}

.puzzle-modal, .modal-content.puzzle {
  width: 95vw;
  max-width: 1400px;
  max-height: 90vh;
  overflow: auto;
}

.modal-content {
  max-width:4100px;
}

.puzzle-grid .pt-number,
.mixing-area .pt-number {
  display: none !important;
}

#puzzle-grid::-webkit-scrollbar,
#puzzle-bank::-webkit-scrollbar {
  width: 8px;
}
#puzzle-grid::-webkit-scrollbar-thumb,
#puzzle-bank::-webkit-scrollbar-thumb {
  background-color: #10b981;
  border-radius: 10px;
}

#puzzle-blocker .modal-content {
  background-color: #1e293b;
  color: #f8fafc;
  padding: 20px;
  text-align: center;
  border-radius: 12px;
  max-width: 400px;
  margin: auto;
  box-shadow: 0 0 20px #0006;
  animation: popIn 0.3s ease;
}

#puzzle-blocker h2 {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

#puzzle-blocker p {
  margin-bottom: 10px;
  font-size: 1rem;
}

#puzzle-blocker .modal-buttons button {
  background-color: #f43f5e;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.2s ease;
}

#puzzle-blocker .modal-buttons button:hover {
  transform: scale(1.05);
}

@keyframes popIn {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

#start-puzzle-btn {
  background: linear-gradient(145deg, #10b981, #059669);
  color: #f0fdf4;
  border: none;
  padding: 10px 20px;
  font-size: 1rem;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.4);
  cursor: pointer;
  font-weight: bold;
   transition: transform 0.2s ease, box-shadow 0.2s ease;
}
#start-puzzle-btn:hover {
  transform: scale(1.05);
  background: #08855D; 
  box-shadow: 0 6px 16px rgba(5, 150, 105, 0.6);
}

.qa-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr); 
  gap: 6px;
  justify-content: center;
  width: fit-content;
  margin: 0 auto 20px auto;
  padding: 10px 15px;
  overflow: visible;
  background-color: #111827; 
  border-radius: 12px;
}

.qa-grid button {
  background-color: #374151;
  color: white;
  padding: 8px 16px;
  font-size: 0.9rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease;
  min-width: 40px;
  text-align: center;
}

.qa-grid button:hover {
  background-color: var(--secondary);
}

.qa-info {
  background-color: #111827;

  padding: 15px 100px;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.4;
  max-width: 600px;
  margin: 0 auto;
}

#question-review-modal .modal-content {
  max-height: none;
  overflow: visible;
}

.quiz-close-btn {
  background-color: #ef4444;
  color: white;
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.2s;
  margin-top: 20px;
}

.quiz-close-btn:hover {
  background-color: #dc2626;
}

#question-review-modal .modal-content {
  background-color: #1f2937; 
  max-height: none;
  overflow: visible;
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); 
}


.win-style {
  background-color: #0f172a;
  text-align: center;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
  animation: popFade 0.3s ease;
}

.btn-confirm {
  background-color: #10b981;
  color: white;
  border: none;
  padding: 10px 18px;
  font-size: 1rem;
  border-radius: 10px;
  margin-top: 20px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-confirm:hover {
  background-color: #059669;
}

@keyframes popFade {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.alert {
  background-color: #facc15;
  color: #1e293b;
  padding: 12px 40px 12px 16px; 
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
  border-radius: 8px;
  margin: 12px auto;
  width: fit-content;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  position: relative;
  max-width: 90%;
}

.alert-close {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: #1e293b;
  font-weight: bold;
  padding: 0;
  line-height: 1;
}

.alert-close:hover {
  color: #dc2626;
}

.language-selector {
  position: fixed;
  top: 20px;
  right: 80px; 
  z-index: 9999;
  display: flex;
  gap: 5px;
}

.language-selector button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 8px 12px;
  font-size: 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.language-selector button:hover {
  background: var(--secondary);
}

.language-selector button.active {
  background: var(--accent);
  font-weight: bold;
}

#sound-toggle {
  right: 20px; 
}

@keyframes combine {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes particleEffect {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(-100px);
    opacity: 0;
  }
}

.particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation: particleEffect 1s forwards;
}

.particle-1 {
  background-color: rgba(255, 223, 0, 0.8);
  width: 10px;
  height: 10px;
}

.particle-2 {
  background-color: rgba(0, 255, 0, 0.8);
  width: 8px;
  height: 8px;
}

.particle-3 {
  background-color: rgba(0, 0, 255, 0.8);
  width: 6px;
  height: 6px;
}

.modal {
  position: fixed; 
  top: 0;
  left: 0;
  width: 100%; 
  height: 100%; 
  background-color: rgba(0, 0, 0, 0.8); 
  display: flex; 
  justify-content: center; 
  align-items: center; 
  z-index: 1000; 
}

.puzzle-content {
  background: #1e293b; 
  padding: 20px; 
  border-radius: 8px; 
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); 
  max-width: 100%; 
  max-height: 100%; 
  overflow: auto; 
}

.title-section {
  text-align: center;
  margin-top: 20px;
}

.logo-img {
  width: 199px;
  height: auto;
  margin-bottom: 0px;
}


#start-quiz,
#next-table-quiz {
  background-color: #818cf8; 
  color: white; 
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.2s; 
}

#start-quiz:hover,
#next-table-quiz:hover {
  background-color: #34d399; 
}

#close-table-quiz,
#vault-close {
  background-color: #ef4444;;
  color: white;
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.2s;
}

#close-table-quiz:hover,
#vault-close:hover {
  background-color: #dc2626; 
}


.modal-buttons button {
  background-color: transparent; 
}

@keyframes arise {
  from {
    transform: translateY(60px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.modal-arise {
  animation: arise 0.4s ease-out forwards;
}

@keyframes fadeOutDown {
  from {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  to {
    transform: translateY(40px) scale(0.95);
    opacity: 0;
  }
}

.modal-exit {
  animation: fadeOutDown 0.3s ease-in forwards;
}

@keyframes bounceInUp {
  0% {
    opacity: 0;
    transform: translateY(60px) scale(0.8);
  }
  60% {
    opacity: 1;
    transform: translateY(-20px) scale(1.05);
  }
  80% {
    transform: translateY(10px) scale(0.98);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

.bounce-result {
  animation: bounceInUp 0.6s cubic-bezier(0.25, 1.25, 0.5, 1) forwards;
}

@keyframes wipeInLeftToRight {
  0% {
    transform: translateX(-100%);
    opacity: 0;
    clip-path: inset(0 100% 0 0); 
  }
  100% {
    transform: translateX(0);
    opacity: 1;
    clip-path: inset(0 0 0 0); 
  }
}

.wipe-in-left-to-right {
  animation: wipeInLeftToRight 0.5s ease-out forwards;
}
@keyframes zoomReview {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.zoom-review {
  animation: zoomReview 0.3s ease-out forwards;
}

    #sound-prompt-modal .modal-content {
      max-width: 450px;
      padding: 30px;
    }

    #sound-prompt-modal h2 {
      color: var(--primary);
      margin-bottom: 15px;
    }

    #sound-prompt-modal p {
      margin-bottom: 25px;
      font-size: 1.1rem;
    }

    #sound-prompt-modal .modal-buttons {
      display: flex;
      justify-content: center;
      gap: 15px;
    }

    #sound-prompt-toggle {
      background: linear-gradient(135deg, #10b981, #059669); 
      color: white;
      padding: 12px 25px;
      border: none;
      border-radius: 10px;
      font-size: 1rem;
      font-weight: bold;
      cursor: pointer;
      transition: all 0.2s ease;
    }

    #sound-prompt-toggle:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
      background: linear-gradient(135deg, #059669, #047857);
    }

    #sound-prompt-dismiss {
      background-color: #6b7280; 
      color: white;
      padding: 12px 25px;
      border: none;
      border-radius: 10px;
      font-size: 1rem;
      font-weight: bold;
      cursor: pointer;
      transition: all 0.2s ease;
    }

    #sound-prompt-dismiss:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
      background-color: #4b5563;
    }
    

button {
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.2s ease-out; 
  position: relative; 
  overflow: hidden; 
}

button:hover {
  transform: translateY(-2px); 
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25); 
}

button:active {
  transform: translateY(0); 
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); 
  filter: brightness(0.9);
}

#start-quiz-btn {
  animation: bounceHighlight 1.2s infinite, pulseShadow 2s infinite alternate;
}

@keyframes pulseShadow {
  0% { box-shadow: 0 0 10px var(--accent), 0 0 20px var(--accent); }
  100% { box-shadow: 0 0 15px var(--accent), 0 0 30px var(--accent); }
}

#hint-btn {
  animation: bounceButton 1s ease-in-out infinite, glowPulse 2s ease-in-out infinite;
}

#mix-btn {
  background: linear-gradient(135deg, #8b5cf6, #4f46e5);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

#mix-btn:hover {
  background: linear-gradient(135deg, #7c3aed, #4338ca);
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

#mix-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

#reset-btn {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

#reset-btn:hover {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

#reset-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

#vault-btn {
  background: linear-gradient(135deg, #14b8a6, #0ea5e9);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

#vault-btn:hover {
  background: linear-gradient(135deg, #0E8C9E, #0C7496);
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

#vault-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.quiz-options button,
#table-quiz-popup .quiz-options button {
  background: linear-gradient(to right, #facc15, #fbbf24);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.quiz-options button:hover,
#table-quiz-popup .quiz-options button:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.quiz-options button:active,
#table-quiz-popup .quiz-options button:active {
  transform: scale(0.98) translateY(0);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.phase-filters button {
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.phase-filters button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.phase-filters button:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.puzzle-actions button {
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.puzzle-actions button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.puzzle-actions button:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  opacity: 0;
  transform: scale(1) translate(-50%, -50%);
  transition: width 0.3s ease-out, height 0.3s ease-out, opacity 0.3s ease-out;
}

button:active::after {
  width: 200%;
  height: 200%;
  opacity: 1;
  transition: 0s; 
}

button {
  position: relative;
  overflow: hidden;
}

@keyframes faviconGlow {
  0% {
    filter: brightness(1) hue-rotate(0deg);
  }
  50% {
    filter: brightness(1.5) hue-rotate(90deg); 
  }
  100% {
    filter: brightness(1) hue-rotate(0deg);
  }
}

.favicon-animate {
  animation: faviconGlow 0.8s ease-out forwards;
}

/* Add these styles to your style.css file */

.form-group {
  margin-bottom: 15px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: var(--text); /* Inherit text color from modal */
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
  width: calc(100% - 20px); /* Adjust for padding */
  padding: 10px;
  border: 1px solid var(--element); /* Use existing element border color */
  border-radius: 8px;
  background-color: var(--bg); /* Use existing background color */
  color: var(--text); /* Use existing text color */
  font-size: 1rem;
  box-sizing: border-box; /* Include padding in width */
}

.form-group textarea {
  resize: vertical; /* Allow vertical resizing */
  min-height: 80px;
}

#send-message-btn {
  background: linear-gradient(135deg, #10b981, #059669); /* Green gradient */
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

#send-message-btn:hover {
  background: linear-gradient(135deg, #059669, #047857);
}

#close-contact-us-modal {
  background-color: #ef4444; /* Red */
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

#close-contact-us-modal:hover {
  background-color: #dc2626;
}

#contact-form-status {
  margin-top: 15px;
  font-weight: bold;
  font-size: 0.95rem;
}

/* Ensure modal content is styled correctly for the new form */
#contact-us-modal .modal-content {
  max-width: 500px; /* Adjust as needed */
  padding: 30px;
}
