body {
    background: #000;
    margin: 0;
    height: 100vh;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Courier New', monospace;
}

.matrix-container {
    text-align: center;
    width: 80%;
    max-width: 800px;
}

#matrix-text {
    color: #00ff41; /* Matrix green */
    font-size: clamp(0.8rem, 3vz, 105rem);
    line-height: 1.6;
    border-right: 0.15em solid #00ff41;
    white-space: pre-wrap;
    word-break: break-word;
    overflow: hidden;
    margin: 0 auto;
    width: 0;
    animation: typing 4s steps(40) forwards,
               blink-caret 0.75s step-end infinite;
}

#enter-btn {
    background: transparent;
    color: #00ff41;
    border: 1px solid #00ff41;
    padding: 12px 24px;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    margin-top: 30px;
    cursor: pointer;
    transition: all 0.3s;
}

#enter-btn:hover {
    background: #00ff41;
    color: #000;
    box-shadow: 0 0 10px #00ff41;
}

#cta-buttons {
    margin-top: 2rem;
    opacity: 0;
    animation: fadeIn 1s forwards 6s; /* Starts after 6 seconds */
    display: block !important; /* Override any hidden class */
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hidden {
    opacity: 0;
    visibility: hidden;
} 

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: #00ff41 }
}


/* Audio Prompt Styling */
#audio-prompt {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: none;
}

#activate-sound {
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid #00ff41;
  color: #00ff41;
  padding: 10px 20px;
  font-family: 'Courier New', monospace;
  cursor: pointer;
  box-shadow: 0 0 15px #00ff41;
  transition: all 0.3s;
}

#activate-sound:hover {
  background: #00ff41;
  color: #000;
  box-shadow: 0 0 25px #00ff41;
}

.matrix-pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 0.8; }
  50% { opacity: 0.4; }
  100% { opacity: 0.8; }
}

/* =================== */
/* MOBILE MEDIA QUERIES */
/* =================== */

/* Phones (portrait) */
@media (max-width: 576px) {
  .matrix-container {
    width: 60%;
    padding: 0 5px;
  }

  #matrix-text {
    font-size: 0.9rem;
    line-height: 1.4;
    white-space: pre-wrap; /* Allow text wrapping */
  }

  #enter-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
  }
}

/* Small tablets */
@media (min-width: 577px) and (max-width: 768px) {
  #matrix-text {
    font-size: 1rem;
  }

  .platform-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Landscape phones/tablets */
@media (max-height: 500px) {
  .matrix-container {
    padding-top: 20px;
    padding-bottom: 20px;
  }
  
  #matrix-text {
    max-height: 60vh;
    overflow-y: auto;
  }
}

/* Touch device adjustments */
@media (hover: none) {
  .platform-card {
    min-height: 120px;
    padding: 1.5rem 1rem;
  }
  
  #enter-btn {
    padding: 12px 24px; /* Larger tap target */
  }
}