#terms-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90vw;
    max-width: 1200px;
    height: 85vh;           /* Use fixed height for modal */
    max-height: 85vh;
    background: #ffffff;
    border-radius: 16px;
    z-index: 1000;
    color: #000000;
    /* Remove overflow-y: auto; */
    overflow-x: hidden;
    overflow-y: hidden;
    box-shadow: 0 0 30px #376cff;
    pointer-events: auto; 
    border: #000000 2px solid;
    box-sizing: border-box;
    list-style: none;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.terms-content {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: #376cff #000000;
}

.terms-type {
    flex: 1 1 auto;
    min-height: 0;
    padding: 1rem 2rem;
    margin: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}


.termsModal h1 {
  font-size: 1.7rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
  text-align: center;
  color: #000000;
  font-family: 'orbitron', sans-serif;
  list-style: none;
}

.termsModal h2 {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 1rem;
  text-align: center;
  color: #000000;
  text-shadow: 5px 3px 5px #376cff;
  font-family: 'orbitron', sans-serif;
  list-style: none;  
}

.termsModal h3 {
  font-size: 1.3rem;
  font-weight: bold;
  margin-bottom: 1rem;
  text-align: center;
  color: #376cff;
  font-family: 'orbitron', sans-serif;
  list-style: none;
}

.termsModal p {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 1rem;
  text-align: center;
  color: #000000;
  list-style: none;
  font-family: 'orbitron', sans-serif;
  text-align: center;
  gap: 0.5rem;
}

.terms-left.close-terms-modal.button-style {
  background: #376cff;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s;
}

.terms-left.close-terms-modal.button-style:hover {
  background: #000;
  color: #fff;
}

.termsModal header {
    position: sticky;
    top: 3%;
    left: 0;
    right: 0;
    width: 96%;
    box-sizing: border-box;
    backdrop-filter: blur(8px);
    border-bottom: 2px solid #fff4e3;
    background: transparent;
    color: #fff4e3;
    border-bottom: #376cff 2px solid;
    z-index: 10;
    transition: background 0.5s ease, box-shadow 0.5s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Orbitron', sans-serif;
    animation: brumeAppear 1s ease-out;
    border-radius: 8px;
    padding: 1rem 0;
    margin-bottom: 0;
    height: 5.5rem;
    margin-left: auto;
    margin-right: auto;
}

.termsModal header h1 {
    margin: 0;
    font-size: 2rem;
    font-family: 'Orbitron', sans-serif;
    text-align: center;
    color: #000000;
    text-shadow: 5px 3px 5px #376cff;
    margin-right: auto;
    margin-left: 15rem;
}

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

.termsModal .terms-center {
    flex: 2;
    display: flex;
    justify-content: center;
    align-items: center; 
}

.termsModal .terms-left {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-left: 2rem;
    margin-top: 0.4rem;
}

.termsModal .terms-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}
