:root {
  --primary: #f8a5c2; /* Soft pastel pink */
  --secondary: #e66767; /* Soft pastel red/pink */
  --accent: #f7d794; /* Soft yellow/gold for stars */
  --background: #fcf4f7; /* Very light pink/white */
  --text-dark: #303952; /* Professional dark blue/grey instead of harsh purple */
  --text-light: #ffffff;
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(248, 165, 194, 0.4);
  --glass-shadow: 0 8px 32px 0 rgba(230, 103, 103, 0.1);
  --success: #78e08f; /* Mint green for correct */
  --error: #ea8685; /* Soft red for wrong */
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Cairo', sans-serif;
}

/* التمرير الأنثوي (Pink Scrollbar) */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--background);
}
::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--secondary);
}

body {
  background: var(--background);
  background-image: linear-gradient(135deg, #fff0f5 0%, #ffe0e9 100%);
  color: var(--text-dark);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* زخرفة خلفية ناعمة */
body::before {
  content: "🌸";
  position: fixed;
  top: 10%;
  right: 5%;
  font-size: 4rem;
  opacity: 0.1;
  z-index: -1;
  animation: float 6s ease-in-out infinite;
}
body::after {
  content: "✨";
  position: fixed;
  bottom: 20%;
  left: 10%;
  font-size: 3rem;
  opacity: 0.1;
  z-index: -1;
  animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(10deg); }
}

.app-container {
  max-width: 950px;
  margin: 0 auto;
  padding: 2.5rem 1rem;
}

.header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.header h1 {
  font-size: 2.8rem;
  color: var(--secondary);
  text-shadow: 2px 2px 4px rgba(255, 77, 133, 0.15);
  margin-bottom: 0.5rem;
}

.header p {
  font-size: 1.2rem;
  color: #833471;
}

/* Tabs Navigation */
.navigation-tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.sub-tabs {
  margin-top: -1.5rem;
  margin-bottom: 2.5rem;
}

.sub-tabs .tab-btn {
  font-size: 1rem;
  padding: 0.6rem 1.2rem;
  background: rgba(255, 255, 255, 0.6);
}

.tab-btn {
  background: var(--glass-bg);
  border: 2px solid var(--primary);
  color: var(--secondary);
  padding: 0.8rem 1.5rem;
  border-radius: 30px;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 10px rgba(255, 77, 133, 0.1);
}

.tab-btn:hover {
  background: var(--accent);
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 20px rgba(255, 77, 133, 0.2);
}

.tab-btn.active {
  background: var(--secondary);
  border-color: var(--secondary);
  color: white;
  box-shadow: 0 6px 15px rgba(255, 77, 133, 0.4);
  transform: scale(1.05);
}

/* Glass Card */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 30px;
  border: 2px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  padding: 2.5rem;
  margin-bottom: 2rem;
  animation: fadeIn 0.5s ease-in-out;
  position: relative;
  overflow: hidden;
}

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

.section-title {
  font-size: 2rem;
  color: var(--secondary);
  margin-bottom: 2rem;
  border-bottom: 3px dashed var(--primary);
  padding-bottom: 0.5rem;
  display: inline-block;
  position: relative;
}

.block-container {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px dashed rgba(255, 77, 133, 0.3);
}

.block-title {
  font-size: 1.5rem;
  color: var(--secondary);
  margin-bottom: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.block-title::before {
  content: '🌸';
  font-size: 1.2rem;
}

.rule-box {
  background: rgba(255, 126, 179, 0.1);
  border-right: 5px solid var(--primary);
  padding: 1.5rem;
  border-radius: 15px;
  margin-bottom: 1.5rem;
  font-weight: 600;
  color: #5c1847;
  font-size: 1.2rem;
  line-height: 1.7;
  white-space: pre-wrap;
  box-shadow: inset 0 2px 10px rgba(255, 126, 179, 0.05);
}

.explanation-box {
  background: white;
  padding: 1.5rem;
  border-radius: 15px;
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
  line-height: 1.8;
  color: #4a154b;
  border: 1px solid rgba(255, 126, 179, 0.2);
  white-space: pre-wrap;
  box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

/* Tables */
.styled-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.5rem 0;
  font-size: 1.1rem;
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(255, 77, 133, 0.08);
  border: 1px solid var(--accent);
}

.styled-table th, .styled-table td {
  padding: 1rem;
  text-align: center;
  border-bottom: 1px solid var(--accent);
}

.styled-table th {
  background-color: var(--primary);
  color: white;
  font-weight: bold;
}

.styled-table tr:last-child td {
  border-bottom: none;
}

.styled-table tr:nth-of-type(even) {
  background-color: #fff0f5;
}

.question-row {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 15px;
  border: 1px dashed var(--accent);
  transition: all 0.3s ease;
}

.question-row:hover {
  transform: translateX(-5px);
  box-shadow: 0 4px 12px rgba(255, 77, 133, 0.08);
}

.question-number {
  background: var(--secondary);
  color: white;
  min-width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: bold;
  box-shadow: 0 4px 10px rgba(255, 77, 133, 0.2);
}

.red-digit {
  color: var(--secondary);
  font-weight: bold;
}

.btn {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  border-radius: 20px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 15px rgba(255, 77, 133, 0.2);
}

.btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 20px rgba(255, 77, 133, 0.4);
}

.btn:active {
  transform: scale(0.95);
}

.answer {
  color: #e056fd;
  font-weight: bold;
  font-size: 1.2rem;
  display: none;
  margin-right: 1rem;
  padding: 0.8rem 1.2rem;
  background: rgba(224, 86, 253, 0.1);
  border-radius: 12px;
  white-space: pre-wrap;
  border: 1px solid rgba(224, 86, 253, 0.3);
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.pattern-boxes {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  align-items: center;
}

.pattern-box {
  background: white;
  border: 2px solid var(--primary);
  border-radius: 12px;
  padding: 0.6rem 1.2rem;
  font-weight: bold;
  font-size: 1.3rem;
  color: var(--text-dark);
  box-shadow: 0 4px 10px rgba(255, 77, 133, 0.1);
}

.options-container {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.option-btn {
  background: white;
  border: 2px solid var(--accent);
  padding: 0.8rem 1.5rem;
  border-radius: 15px;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--text-dark);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.option-btn:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 77, 133, 0.15);
}

.option-btn.correct {
  background: #a8e6cf;
  border-color: #38ada9;
  color: #079992;
  box-shadow: 0 0 15px rgba(168, 230, 207, 0.8);
}

.option-btn.wrong {
  background: #ffb8b8;
  border-color: #ff3838;
  color: #b33939;
  box-shadow: 0 0 15px rgba(255, 184, 184, 0.8);
}

.text-lg {
  font-size: 1.2rem;
  font-weight: bold;
}

.carry-over {
  display: block;
  color: var(--secondary);
  font-size: 0.85em;
  margin-bottom: -5px;
}
.carry-over span {
  display: inline-block;
}

/* زر السبورة العائم */
.floating-board-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 15px 25px;
  font-size: 1.3rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(255, 77, 133, 0.4);
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  animation: bounce 2s infinite;
  display: none; /* يظهر فقط في قسم التمرينات */
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.floating-board-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 25px rgba(255, 77, 133, 0.6);
  animation: none;
}

/* نافذة السبورة المنبثقة */
.whiteboard-modal {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 45%;
  height: 65%;
  min-width: 300px;
  max-width: calc(100vw - 40px);
  min-height: 300px;
  z-index: 2000;
}

.whiteboard-container {
  background: rgba(255, 255, 255, 0.95);
  width: 100%;
  height: 100%;
  border-radius: 30px;
  border: 3px solid var(--primary);
  box-shadow: 0 20px 50px rgba(255, 77, 133, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalPopIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPopIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.whiteboard-header {
  background: #fff0f5;
  padding: 15px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--accent);
  flex-wrap: wrap;
  gap: 10px;
}

.whiteboard-tools {
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
}

.color-btn {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  border: 3px solid white;
  cursor: pointer;
  transition: transform 0.2s;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.color-btn:hover, .color-btn.active {
  transform: scale(1.2);
  border-color: var(--primary);
}

.tool-btn {
  background: white;
  border: 2px solid var(--accent);
  border-radius: 12px;
  padding: 8px 15px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
}

.tool-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.close-board-btn {
  background: var(--secondary);
  color: white;
  border: none;
  border-radius: 20px;
  padding: 8px 20px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
}

.close-board-btn:hover {
  background: #d63031;
  transform: scale(1.05);
}

.canvas-wrapper {
  flex-grow: 1;
  width: 100%;
  height: 100%;
  position: relative;
  cursor: crosshair;
}

#whiteboardCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* التجاوب مع الشاشات المختلفة (Responsiveness) */
@media (max-width: 768px) {
  .header h1 {
    font-size: 2rem;
  }
  .header p {
    font-size: 1rem;
  }
  .tab-btn {
    font-size: 1rem;
    padding: 0.6rem 1.2rem;
  }
  .glass-card {
    padding: 1.5rem;
    border-radius: 20px;
  }
  .section-title {
    font-size: 1.5rem;
  }
  .block-title {
    font-size: 1.3rem;
  }
  .rule-box, .explanation-box {
    font-size: 1rem;
    padding: 1rem;
  }
  .styled-table {
    font-size: 0.9rem;
  }
  .floating-board-btn {
    bottom: 20px;
    right: 20px;
    padding: 10px 18px;
    font-size: 1.1rem;
  }
  .whiteboard-modal {
    width: 90%;
    height: 60%;
    left: 5%;
    bottom: 15px;
    min-width: unset;
  }
  .whiteboard-header {
    padding: 10px 15px;
  }
  .tool-btn, .close-board-btn {
    font-size: 1rem;
    padding: 6px 12px;
  }
}

@media (max-width: 480px) {
  .header h1 {
    font-size: 1.7rem;
  }
  .navigation-tabs {
    gap: 0.5rem;
  }
  .tab-btn {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-width: 1px;
  }
  .glass-card {
    padding: 1rem;
  }
  .question-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .options-container {
    flex-wrap: wrap;
    justify-content: center;
  }
  .whiteboard-modal {
    width: 95%;
    left: 2.5%;
    height: 50%;
  }
  .color-btn {
    width: 30px;
    height: 30px;
  }
}

/* --- Gamification & Interactive Elements --- */

.gamification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  background: var(--glass-bg);
  padding: 10px 20px;
  border-radius: 20px;
  box-shadow: var(--glass-shadow);
  border: 1px solid var(--glass-border);
  animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.stars-counter {
  font-size: 1.5rem;
  font-weight: 800;
  color: #f39c12;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(247, 215, 148, 0.2);
  padding: 5px 15px;
  border-radius: 20px;
  border: 2px solid var(--accent);
}

.star-icon {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.progress-container {
  flex-grow: 1;
  max-width: 60%;
  height: 12px;
  background: #eee;
  border-radius: 10px;
  overflow: hidden;
  margin-right: 20px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mascot Styles */
.mascot-container {
  position: fixed;
  bottom: 20px;
  left: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1500;
  transform: translateY(150%);
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mascot-container.show {
  transform: translateY(0);
}

.mascot-bubble {
  background: white;
  padding: 10px 20px;
  border-radius: 20px;
  border: 2px solid var(--primary);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  font-weight: bold;
  color: var(--text-dark);
  margin-bottom: 10px;
  position: relative;
  font-size: 1.1rem;
}

.mascot-bubble::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 10px 10px 0;
  border-style: solid;
  border-color: var(--primary) transparent transparent transparent;
  display: block;
  width: 0;
}

.mascot-img {
  font-size: 4rem;
  animation: float 3s ease-in-out infinite;
  filter: drop-shadow(0 5px 10px rgba(0,0,0,0.2));
}

/* Interactive Feedback */
@keyframes starPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.5); color: #f1c40f; }
  100% { transform: scale(1); }
}

.star-pop-anim {
  animation: starPop 0.5s ease-out;
}

/* Update options correctness styling */
.option-btn.correct {
  background: var(--success);
  border-color: #26de81;
  color: white;
  box-shadow: 0 0 15px rgba(120, 224, 143, 0.6);
  transform: scale(1.05);
}

.option-btn.wrong {
  background: var(--error);
  border-color: #fc5c65;
  color: white;
  box-shadow: 0 0 15px rgba(234, 134, 133, 0.6);
  animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* --- Advanced Gamification Styles --- */

/* Modal Overlays */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  z-index: 3000;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease-out;
}

.close-modal-btn {
  position: absolute;
  top: -15px;
  right: -15px;
  background: var(--error);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  transition: transform 0.2s;
  z-index: 10;
}
.close-modal-btn:hover { transform: scale(1.1); }

/* Certificate Styles */
.certificate-container {
  position: relative;
  background: white;
  padding: 20px;
  border-radius: 20px;
  width: 90%;
  max-width: 800px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
  text-align: center;
}

.certificate-content {
  border: 15px solid var(--accent);
  padding: 40px 20px;
  background: #fffdf5;
  position: relative;
}
.certificate-content::before {
  content: '';
  position: absolute;
  top: 5px; left: 5px; right: 5px; bottom: 5px;
  border: 2px dashed var(--primary);
}

.cert-header {
  font-size: 3rem;
  color: var(--secondary);
  font-weight: 800;
  margin-bottom: 20px;
  font-family: 'Cairo', sans-serif;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.cert-body {
  font-size: 1.5rem;
  color: var(--text-dark);
  line-height: 2;
}

.cert-name {
  font-size: 2.5rem;
  color: var(--primary);
  font-weight: 800;
  display: block;
  margin: 10px 0;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
  padding: 0 20px;
}

.cert-chapter {
  color: #8e44ad;
  font-weight: bold;
}

.cert-footer {
  margin-top: 40px;
  display: flex;
  justify-content: center;
}

.cert-seal {
  background: linear-gradient(135deg, #f1c40f, #f39c12);
  color: white;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: bold;
  box-shadow: 0 5px 15px rgba(241, 196, 15, 0.4);
  border: 5px solid white;
  position: relative;
}
.cert-seal::after {
  content: '🌟';
  position: absolute;
  bottom: -15px;
  font-size: 2rem;
}

/* Print Media Query */
@media print {
  body * {
    visibility: hidden;
  }
  #printableCertificate, #printableCertificate * {
    visibility: visible;
  }
  #printableCertificate {
    position: absolute;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    border: none;
    padding: 0;
  }
}

/* Mini-Game Styles */
.minigame-container {
  position: relative;
  background: var(--glass-bg);
  padding: 30px;
  border-radius: 30px;
  width: 95%;
  max-width: 600px;
  border: 3px solid var(--primary);
}

.minigame-header {
  text-align: center;
  margin-bottom: 20px;
  color: var(--secondary);
}

.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.memory-card {
  aspect-ratio: 1;
  background: var(--accent);
  border-radius: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  font-weight: bold;
  color: transparent;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  user-select: none;
  direction: ltr; /* For math equations */
}
.memory-card.hidden-content {
    /* Background acts as the back of the card */
}

.memory-card.flipped {
  background: white;
  color: var(--text-dark);
  border: 2px solid var(--primary);
  transform: rotateY(180deg) scale(1);
}
.memory-card.flipped .content {
    transform: rotateY(180deg);
}
.memory-card .content {
    transition: transform 0.3s;
}

.memory-card.matched {
  background: var(--success);
  color: white;
  border-color: #26de81;
  animation: pulse 1s;
}
.memory-card.matched .content {
    transform: rotateY(180deg);
}


/* Treasure Map Navigation */
.treasure-map-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  padding: 40px 0;
  position: relative;
}

.treasure-map-view::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 4px;
  background-image: linear-gradient(var(--primary) 33%, rgba(255,255,255,0) 0%);
  background-position: right;
  background-size: 4px 20px;
  background-repeat: repeat-y;
  transform: translateX(-50%);
  z-index: 0;
}

.map-node {
  position: relative;
  z-index: 1;
  background: white;
  border: 4px solid var(--secondary);
  border-radius: 50px;
  padding: 15px 30px;
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text-dark);
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.map-node:hover {
  transform: scale(1.1) translateY(-5px);
  box-shadow: 0 15px 30px rgba(230, 103, 103, 0.3);
  background: var(--accent);
}

.map-node:nth-child(odd) {
  margin-right: 150px;
}
.map-node:nth-child(even) {
  margin-left: 150px;
}

/* For mobile treasure map */
@media (max-width: 600px) {
  .map-node:nth-child(odd) {
    margin-right: 50px;
  }
  .map-node:nth-child(even) {
    margin-left: 50px;
  }
}

.rainbow-active {
  background: linear-gradient(45deg, #ff9a9e, #fecfef, #a1c4fd, #c2e9fb) !important;
  background-size: 200% 200% !important;
  animation: rainbowBg 2s ease infinite !important;
  border-color: white !important;
}

@keyframes rainbowBg {
  0%{background-position:0% 50%}
  50%{background-position:100% 50%}
  100%{background-position:0% 50%}
}

/* Lock Screen Styles */
.lock-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--background);
  background-image: linear-gradient(135deg, #fff0f5 0%, #ffe0e9 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.lock-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  padding: 3rem;
  border-radius: 30px;
  border: 2px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  text-align: center;
  max-width: 400px;
  width: 90%;
  animation: fadeIn 0.5s ease-in-out;
}

.lock-card h2 {
  font-size: 2rem;
  color: var(--secondary);
  margin-bottom: 1rem;
}

.lock-card p {
  color: var(--text-dark);
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}

#activationCode {
  width: 100%;
  padding: 1rem;
  font-size: 1.2rem;
  border: 2px solid var(--accent);
  border-radius: 15px;
  margin-bottom: 1.5rem;
  text-align: center;
  outline: none;
  font-family: inherit;
}

#activationCode:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(248, 165, 194, 0.5);
}

.lock-message {
  margin-top: 1rem;
  font-weight: bold;
  font-size: 1.1rem;
  color: var(--error);
  min-height: 1.5rem;
}
