/* modal-styles.css */
.modal-overlay-rkn {
    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-rkn {
    background-color: #fff;
    padding: 25px;
    border-radius: 10px;
    position: relative;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    transition: all 0.3s ease;
    margin: 10px 10px 130px 10px;
}

.dark-theme .modal-content-rkn {
    background-color: #2c3e50;
    color: #ecf0f1;
}

.dark-theme .modal-content-rkn h2, 
.dark-theme .modal-content-rkn h3 {
    color: #ecf0f1;
}

.dark-theme .modal-content-rkn p, 
.dark-theme .modal-content-rkn 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-rkn a {
    color: #3498db;
}

@keyframes slideUp {
    to { transform: translateY(0); }
}

.modal-close {
    position: absolute;
    right: 15px;
    top: 10px;
    cursor: pointer;
    font-size: 24px;
    color: #7f8c8d;
    transition: color 0.2s ease;
    line-height: 1;
    padding: 0 5px;
}

.modal-close:hover {
    color: #e74c3c;
}

.modal-content-rkn h2 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 24px;
    margin-bottom: 15px;
    padding-right: 20px;
}

.modal-content-rkn p {
    color: #7f8c8d;
    line-height: 1.5;
    margin-bottom: 10px;
}

.modal-content-rkn h3 {
    color: #2c3e50;
    margin: 15px 0 10px;
    font-size: 18px;
}

.spoiler-button {
    background: none;
    border: none;
    color: #3498db;
    cursor: pointer;
    padding: 5px 0;
    margin: 10px 0;
    font-size: 14px;
    transition: color 0.2s ease;
    text-align: left;
    width: 100%;
}

.spoiler-button:hover {
    color: #2980b9;
}

#custom-spoiler-content {
    overflow: auto;
    height: 200px;
    transition: all 0.3s ease;
    opacity: 1;
}

.modal-button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: block;
    width: 100%;
    margin-top: 15px;
}

.modal-button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.modal-button:active {
    transform: translateY(0);
}