:root {
  --background-color: #fcf2df;
  --primary-color: #bfccef;
  --secondary-color-1: #ffcf7f;
  --secondary-color-2: #a1eebd;
  --accent-color: #f47c7c;
  --text-color: #1f21ab;
  --scanline-alpha: 0.05;
}

/* Global Styles */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
}

/* Animation for puzzle interactions */
@keyframes glitch {
  2% { clip-path: inset(20% 0 30% 0); }
  4% { clip-path: inset(10% 0 40% 0); }
  7% { clip-path: inset(40% 0 10% 0); }
  9% { clip-path: inset(20% 0 30% 0); }
  92% { clip-path: inset(80% 0 5% 0); }
  93% { clip-path: inset(60% 0 15% 0); }
  94% { clip-path: inset(40% 0 25% 0); }
  96% { clip-path: inset(10% 0 35% 0); }
  97% { clip-path: inset(25% 0 25% 0); }
  99% { clip-path: inset(90% 0 5% 0); }
}

/* Optional scanline effect for immersion */
.crt-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(0, 0, 0, var(--scanline-alpha)) 50%, 
               rgba(0, 0, 0, calc(var(--scanline-alpha) * 3)) 50%);
  background-size: 100% 3px;
  pointer-events: none;
  z-index: 9999;
  display: none; /* Disabled by default */
}

/* Grid for puzzles and cultural information */
.grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 2rem 0;
}

/* Card styling for puzzles */
.card {
  border: 1px solid var(--primary-color);
  border-left: 5px solid var(--primary-color);
  border-radius: 8px;
  padding: 1rem;
  transition: transform 0.3s ease;
  background: #fff;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

/* Authentication and puzzle input styling */
.auth-terminal {
  background: white;
  border: 2px solid var(--accent-color);
  padding: 2rem;
  font-family: 'Segoe UI', sans-serif;
  max-width: 600px;
  color: var(--text-color);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.cipher-input {
  background: rgba(255,255,255,0.9);
  border: 2px solid var(--secondary-color-1);
  color: var(--text-color);
  font-size: 1rem;
  padding: 0.75rem;
  border-radius: 4px;
  width: 100%;
  margin-bottom: 1rem;
}

/* Text effect for mysterious/encoded messages */
.glitch-text {
  position: relative;
  animation: glitch 5s infinite;
  color: var(--accent-color);
  font-weight: bold;
  letter-spacing: 1px;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  clip: rect(0, 0, 0, 0);
}

.glitch-text::before {
  left: -2px;
  text-shadow: 2px 0 var(--secondary-color-1);
}

.glitch-text::after {
  left: 2px;
  text-shadow: -2px 0 var(--primary-color);
}

/* Puzzle and riddle containers */
.landmark-riddle {
  border: 1px solid var(--accent-color);
  padding: 1.5rem;
  margin: 1rem 0;
  background: rgba(244, 124, 124, 0.05);
  border-radius: 8px;
}

/* Pulse animation for active clues/elements */
@keyframes cipher-pulse {
  0% { box-shadow: 0 0 0 0 rgba(191, 204, 239, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(191, 204, 239, 0); }
  100% { box-shadow: 0 0 0 0 rgba(191, 204, 239, 0); }
}

.active-clue {
  animation: cipher-pulse 2s infinite;
  border-color: var(--secondary-color-1);
}

/* JEKI symbol animation */
@keyframes jeki-spin {
  0% { transform: rotate(0deg); }
  50% { transform: rotate(-20deg); }
  100% { transform: rotate(0deg); }
}

.jeki-icon {
  display: inline-block;
  animation: jeki-spin 4s infinite ease-in-out;
}

/* Location tags */
.location-tag {
  display: inline-block;
  background: var(--secondary-color-2);
  color: var(--text-color);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.9rem;
  margin-top: 1rem;
}

/* Cultural information sections */
.cultural-info-box {
  background: rgba(161, 238, 189, 0.1);
  border-left: 4px solid var(--secondary-color-2);
  padding: 1rem;
  margin: 1.5rem 0;
  border-radius: 0 8px 8px 0;
}

/* Adinkra symbols border */
.adinkra-border {
  border-top: 10px solid transparent;
  border-image: url('https://i.imgur.com/wY5Lgl7.png') 30 round;
  padding-top: 1rem;
}

/* Progress indicator */
.progress-bar {
  height: 10px;
  background: #fff;
  border-radius: 5px;
  margin: 1rem 0;
  position: relative;
  overflow: hidden;
}

.progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--secondary-color-2);
  border-radius: 5px;
  transition: width 0.5s ease;
}

/* Map marker pulse for locations */
@keyframes map-marker-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(244, 124, 124, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(244, 124, 124, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(244, 124, 124, 0);
  }
}

.map-marker {
  display: inline-block;
  width: 12px;
  height: 12px;
  background: var(--accent-color);
  border-radius: 50%;
  margin-right: 5px;
  animation: map-marker-pulse 2s infinite;
}

/* Success animation */
@keyframes success-reveal {
  0% { transform: scale(0); opacity: 0; }
  70% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.success-icon {
  display: inline-block;
  animation: success-reveal 1s ease-out;
  color: var(--secondary-color-2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .grid-layout {
    grid-template-columns: 1fr;
  }
  
  .card {
    margin-bottom: 1rem;
  }
}

/* Audio player styling */
audio {
  width: 100%;
  margin: 1rem 0;
  border-radius: 30px;
}

audio::-webkit-media-controls-panel {
  background-color: var(--background-color);
}

/* QR code styling */
.qr-container {
  background: white;
  padding: 1rem;
  display: inline-block;
  border: 1px solid var(--text-color);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Button styles */
.jeki-button {
  background: var(--primary-color);
  color: var(--text-color);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

.jeki-button:hover {
  background: #a1b4ea;
  transform: translateY(-2px);
}

.jeki-button.yellow {
  background: var(--secondary-color-1);
}

.jeki-button.yellow:hover {
  background: #f5c160;
}

/* Navigation elements */
.nav-link {
  color: var(--text-color);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background 0.3s;
}

.nav-link:hover {
  background: rgba(191, 204, 239, 0.2);
}

/* Fun childhood-themed elements */
.playful-border {
  border: 3px dashed var(--accent-color);
  padding: 1rem;
  border-radius: 12px;
}

.crayon-text {
  font-family: 'Comic Sans MS', cursive, sans-serif;
  font-weight: bold;
  color: var(--accent-color);
}

/* YAGO community elements */
.community-badge {
  display: inline-block;
  background: var(--primary-color);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: bold;
}

/* Puzzle progress tracker */
.puzzle-tracker {
  display: flex;
  justify-content: space-between;
  margin: 2rem 0;
  position: relative;
}

.puzzle-tracker::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 4px;
  background: #fff;
  transform: translateY(-50%);
  z-index: -1;
}

.puzzle-step {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text-color);
  font-weight: bold;
  border: 3px solid var(--primary-color);
}

.puzzle-step.active {
  background: var(--secondary-color-1);
  box-shadow: 0 0 0 3px rgba(255, 207, 127, 0.5);
}

.puzzle-step.completed {
  background: var(--secondary-color-2);
  color: var(--text-color);
}

/* Charity impact visualization */
.impact-counter {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--text-color);
  text-align: center;
}