/* Dark overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.75);
  z-index: 9999;

  /* hidden by default */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition: opacity 160ms ease, visibility 0s linear 160ms;
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 160ms ease; /* no delay when showing */
}

@keyframes fadeIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

/* Dark modal window */
.modal-content {
    background: #121212;
    color: #b19e6b;
    border-radius: 14px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.6);
    outline: 1px solid rgba(255, 255, 255, 0.08);

    max-width: 720px;
    width: 45%;      /* adjustable */
    max-height: 80vh;
    overflow-y: auto;

    padding: 20px 24px;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: 0;
    cursor: pointer;
    font-size: 30px;
    line-height: 1;
    color: #bdbdbd;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

@media (pointer: coarse) {
    .modal-close {
        top: 12px;
        right: 12px;
        width: 52px;
        height: 52px;
        font-size: 32px;
    }
}

.modal-close:hover {
    color: #ffffff;
}

.modal-content h1 {
    margin: 0 0 6px 0;
    font-size: 1.6rem;
    letter-spacing: 0.02em;
}

.modal-content h3 {
    margin: 0;
    font-weight: 500;
    color: #cfcfcf;
}

.modal-content p {
    margin: 0.4em 0;
    line-height: 1.5;
}

/* Footer links in dark theme */
#footer a {
    color: #c8d1ff;
    text-decoration: none;
}

#footer a:hover {
    text-decoration: underline;
}