body {
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #12012b, #2c064b);
    font-family: 'Segoe UI', sans-serif;
    color: white;
    overflow: hidden;
  }
  
  .background-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0.03;
    z-index: 0;
  }
  
  .aztec-logo {
    width: 600px;
    opacity: 0.3;
    animation: slowPulse 5s ease-in-out infinite;
  }
  
  @keyframes slowPulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.05); opacity: 0.4; }
  }
  
  .quiz-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
  }
  
  .quiz-box {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 2rem;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 0 30px rgba(124, 96, 255, 0.3);
    animation: fadeInUp 0.7s ease-out;
  }
  
  .fade-in {
    animation: fadeInUp 0.7s ease-out;
  }
  
  @keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  
  button {
    background: #7b61ff;
    border: none;
    padding: 0.8rem 2rem;
    font-weight: bold;
    color: white;
    border-radius: 10px;
    margin-top: 20px;
    cursor: pointer;
    transition: transform 0.2s ease;
  }
  
  button:hover {
    transform: scale(1.05);
  }
  
  #answer-buttons {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
  }
  
  #answer-buttons li {
    background: #2c1959;
    padding: 1rem;
    margin: 0.5rem 0;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s ease;
  }
  
  #answer-buttons li:hover {
    background: #392573;
  }
  
  .progress-bar {
    height: 10px;
    background: #333;
    margin-bottom: 20px;
    border-radius: 5px;
    overflow: hidden;
  }
  
  #progress-fill {
    height: 100%;
    width: 0%;
    background: #7b61ff;
    transition: width 0.5s ease-in-out;
  }
  
  .hidden {
    display: none;
  }
  
  .certificate {
    width: 100%;
    max-width: 400px;
    display: block;
    margin: 20px auto;
    border-radius: 12px;
  }
  
  .result-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
  }
  .certificate-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 1.5rem;
    gap: 1rem;
  }
  
  #download-btn {
    background: #4caf50;
  }
  
  #twitter-share {
    background: #1da1f2;
    padding: 0.8rem 2rem;
    border-radius: 10px;
    color: white;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
  }
  @keyframes fadeInScale {
    from {
      opacity: 0;
      transform: scale(0.92);
    }
    to {
      opacity: 1;
      transform: scale(1);
    }
  }
  
  @keyframes glowPulse {
    0% { box-shadow: 0 0 8px #7b61ff; }
    50% { box-shadow: 0 0 15px #7b61ff; }
    100% { box-shadow: 0 0 8px #7b61ff; }
  }
  #result-screen {
    animation: fadeInScale 0.8s ease-out forwards;
  }
  #download-btn, #twitter-share {
    animation: glowPulse 2s infinite ease-in-out;
  }
  .confetti-piece {
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: hsl(calc(360 * var(--i)), 70%, 60%);
    animation: confettiFall 2s ease-out forwards;
    top: -10px;
  }
  
  @keyframes confettiFall {
    to {
      transform: translateY(100vh) rotateZ(360deg);
      opacity: 0;
    }
  }
  .confetti-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 10;
  }
  
  .confetti-piece {
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: hsl(calc(360 * var(--i)), 80%, 60%);
    animation: confettiFall 2.5s ease-out forwards;
    top: -10px;
    border-radius: 2px;
    opacity: 0.8;
  }
  
  @keyframes confettiFall {
    to {
      transform: translateY(100vh) rotateZ(720deg);
      opacity: 0;
    }
  }
  .result-actions {
    margin-top: 20px;
    text-align: center;
  }
  
  #retry-btn {
    background: #ff5252;
    color: white;
    padding: 10px 20px;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
  }
  
  #retry-btn:hover {
    background: #e53935;
  }
  .result-actions {
  margin-top: 30px;
  text-align: center;
}

#retry-btn {
  background: #ff5a5a;
  color: white;
  font-weight: bold;
  padding: 0.8rem 2rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.3s ease;
}

#retry-btn:hover {
  background: #e33c3c;
}
