.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    z-index: 9999;
    transition: opacity 0.3s ease, background-color 0.3s ease;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.modal-content {
    background-color: #fff;
    padding: 10px;
    border-radius: 10px;
    position: relative;
    max-width: 800px;
    /*max-width: 1100px;*/
    width: 90%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);*/
    -moz-animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    -webkit-animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    transition: all 0.3s ease;
    margin: 0 auto;
}

.dark-theme .modal-content {
    background-color: #2c3e50;
    color: #ecf0f1;
}

.dark-theme .modal-content h2, 
.dark-theme .modal-content h3 {
    color: #ecf0f1;
}

.dark-theme .modal-content p, 
.dark-theme .modal-content strong {
    color: #bdc3c7;
}

.dark-theme .modal-close {
    color: #bdc3c7;
}

.dark-theme .modal-close:hover {
    color: #e74c3c;
}

.dark-theme .spoiler-button {
    color: #3498db;
    background: none;
}

.dark-theme .spoiler-button:hover {
    color: #2980b9;
}

.dark-theme .modal-content a {
    color: #3498db;
}

@keyframes slideUp {
    to { transform: translateY(0); }
}

.modal-close {
    position: absolute;
    right: 15px;
    top: 10px;
    cursor: pointer;
    font-size: 10px;
    color: #7f8c8d;
    transition: color 0.2s ease;
    line-height: 1;
    padding: 0 0px;
}

.modal-close:hover {
    color: #e74c3c;
}

.modal-content h2 {
    margin: 0;
    color: #2c3e50;
    font-size: 14px;
    margin-bottom: 0;
    padding-right: 20px;
}

.modal-content p {
    color: #7f8c8d;
    line-height: 1;
    margin-bottom: 15px;
}

.modal-content h3 {
    color: #2c3e50;
    margin-top: 5px;
    font-size: 14px;
}

.spoiler-button {
    background: none;
    border: none;
    color: #3498db;
    cursor: pointer;
    padding: 5px 0;
    margin-bottom: 10px;
    font-size: 15px;
    transition: color 0.2s ease;
    text-align: left;
    width: 100%;
}

.spoiler-button:hover {
    color: #2980b9;
}

#custom-spoiler-content {
  margin:0;
    overflow: auto;
    height: 20px;
    transition: all 0.3s ease;
    opacity: 1;
}

.modal-button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 5px 5px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 15px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: block;
    width: 100px;
    /*margin: 0 auto;*/
}
.modal-buttons {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: top;
  gap: 10px;
  flex-wrap: nowrap;
  
}
.modal-button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.modal-button:active {
    transform: translateY(0);
}

@media (max-width: 550px){
  .modal-overlay {
    display: block;
  }
  .modal-content {
    top: 50px;
    left: 20px;
    width: 300px;
    margin: 0;
  }
}

