* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: 'Arial', sans-serif;
    text-align: center;
    background-color: #f9f9f9;
    color: #333;
    overflow: hidden;
  }
  
  #app {
    display: flex;
    justify-content: center; /* Horizontal centering */
    align-items: center; /* Vertical centering */
    height: 100vh; /* Full viewport height */
    position: relative;
    z-index: 1;
    overflow: hidden; /* Prevent scrollbars */
  }
  
  h1 {
    font-size: 2rem; /* Smaller font size for mobile */
    color: #333;
    animation: fadeIn 2s ease-in-out;
  }
  
  p {
    font-size: 1rem; /* Smaller font size for mobile */
    margin: 20px 0;
    color: #555;
  }
  
  button {
    padding: 15px 30px; /* Larger buttons for touch */
    font-size: 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  
  button:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(255, 111, 97, 0.8);
  }
  
  #startButton {
    background-color: #ff6f61;
    color: white;
  }
  
/* Card Styling */
.card {
    background: linear-gradient(145deg, #ffffff, #e6e6e6);
    box-shadow: 10px 10px 20px rgba(0, 0, 0, 0.1), -10px -10px 20px rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    padding: 20px;
    width: 90%; /* Responsive width */
    max-width: 400px; /* Maximum width for larger screens */
    text-align: center;
    transition: transform 0.5s ease, opacity 0.5s ease;
    display: flex;
    flex-direction: column;
    align-items: center; /* Center content horizontally */
  }
  
  .card img {
    width: 100%; /* Full width of the card */
    max-width: 300px; /* Limit maximum size */
    margin-bottom: 15px; /* Space between GIF and text */
    border-radius: 10px; /* Rounded corners for GIF */
  }
  
  .hidden {
    display: none;
  }
  
  /* Typing Animation */
  @keyframes typing {
    from { width: 0; }
    to { width: 100%; }
  }
  
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  
  .typing-effect {
    overflow: hidden;
    white-space: nowrap;
    border-right: 0.15em solid #ff6f61;
    animation: typing 4s steps(40, end), blink-caret 0.75s step-end infinite;
  }
  
  /* Blinking Cursor */
  @keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: #ff6f61; }
  }
  
  /* Canvas for Particles */
  #particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
  }
  
  /* Homepage Styling */
  #homePage {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.8); /* Semi-transparent background */
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto; /* Center horizontally */
    width: 90%; /* Full width on mobile */
  }  
  
  /* Responsive Design */
  @media (max-width: 768px) {
    h1 {
      font-size: 1.8rem; /* Even smaller font size for smaller screens */
    }
  
    p {
      font-size: 0.9rem; /* Adjust paragraph text size */
    }
  
    button {
      padding: 12px 25px; /* Slightly smaller buttons for smaller screens */
      font-size: 0.9rem;
    }
  
    .card {
      padding: 15px; /* Reduce padding for smaller screens */
    }
  
    #homePage {
      padding: 15px; /* Reduce padding for smaller screens */
    }
  }

/* Error Pop-Up */
#errorPopup {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #f44336;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    font-size: 1rem;
    opacity: 0;
    pointer-events: none; /* Hide by default */
    transition: opacity 0.3s ease, transform 0.3s ease;
  }
  
  #errorPopup.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) scale(1); /* Scale up for emphasis */
  }
  
  /* Shake Animation for Buttons */
  @keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
  }
  
  .shake {
    animation: shake 0.5s ease;
  }
#restartButton {
background-color: #ff6f61;
color: white;
border: none;
padding: 10px 20px;
border-radius: 5px;
font-size: 16px;
cursor: pointer;
margin-top: 20px;
}

#restartButton:hover {
background-color: #ff4d4d;
}

/* Footer Styling */
#musicPlayer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    z-index: 2;
  }
  
  #albumArt img {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    margin-left: 10px;
  }
  
  #controls button {
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    margin: 0 10px;
  }
  
  #lyricsContainer {
    flex-grow: 1;
    text-align: center;
    margin-right: 10px;
  }
  
  #currentLyric {
    font-size: 1rem;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    animation: slideLyrics 10s linear infinite; /* Adjust timing based on song */
  }
  
  /* Lyrics Animation */
  @keyframes slideLyrics {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
  }
  
  .hidden {
    display: none;
  }

/* Terms & Conditions Styling */
#termsPage {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 192, 203, 0.95);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .terms-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    width: 80%;
    max-width: 600px;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
    text-align: center;
  }
  
  .terms-list {
    height: 60vh;
    overflow-y: auto;
    margin: 1rem 0;
    border: 2px solid #ff69b4;
    padding: 1rem;
    border-radius: 10px;
    text-align: left;
  }
  
  .terms-list ol {
    padding-left: 20px;
  }
  
  .terms-list li {
    margin-bottom: 10px;
    font-size: 14px;
    color: #333;
  }
  
  #acceptTerms {
    background: #ff69b4;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 0 auto;
  }
  
  #acceptTerms:disabled {
    background: #ffb6c1;
    cursor: not-allowed;
  }
  
  #acceptTerms:hover:not(:disabled) {
    background: #ff1493;
    transform: scale(1.05);
  }