/* Modal overlay & box */
.modal-overlay {
   display: none;
   position: fixed;
   top: 0;
   left: 0;
   right: 0;
   bottom: 0;
   background: rgba(0, 0, 0, 0.6);
   z-index: 9999;
   align-items: center;
   justify-content: center;
   padding: 20px;
   box-sizing: border-box;
}

.modal-overlay.active {
   display: flex;
}

.modal-box {
   position: relative;
   background: #fff;
   border-radius: 8px;
   max-width: 700px;
   width: 100%;
   max-height: 90vh;
   overflow: hidden;
   box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-close {
   position: absolute;
   top: 12px;
   right: 16px;
   width: 36px;
   height: 36px;
   border: none;
   background: transparent;
   font-size: 28px;
   line-height: 1;
   cursor: pointer;
   color: #666;
   z-index: 10;
   padding: 0;
}

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

.modal-content {
   padding: 24px 24px 50px;
   overflow-y: auto;
   max-height: calc(90vh - 24px);
   font-size: 14px;
   line-height: 1.6;
}

.modal-content h2 {
   margin: 0 0 16px;
   font-size: 20px;
}

.modal-content h3 {
   margin: 20px 0 12px;
   font-size: 16px;
}

.modal-content h4 {
   margin: 18px 0 10px;
   font-size: 15px;
}

.modal-content h5 {
   margin: 14px 0 8px;
   font-size: 14px;
}

.modal-content p,
.modal-content li {
   margin: 0 0 10px;
}

.modal-content ul,
.modal-content ol {
   margin: 0 0 12px;
   padding-left: 22px;
}