/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background-color: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 60px;
    animation: modalSlideIn 0.3s ease;
    
    /* Hide scrollbar */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.modal-content::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

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

/* Modal Scroll Controls */
.modal-scroll-up {
    position: sticky;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666666;
    margin-left: auto;
    margin-bottom: -40px;
    z-index: 10;
}

.modal-scroll-up:hover {
    color: #FFFFFF;
}

.modal-scroll-up .icon-close,
.modal-scroll-up .icon-up {
    position: absolute;
    transition: opacity 0.3s ease;
}

.modal-scroll-up.show-close .icon-close {
    opacity: 1;
}

.modal-scroll-up.show-close .icon-up {
    opacity: 0;
}

.modal-scroll-up.show-up .icon-close {
    opacity: 0;
}

.modal-scroll-up.show-up .icon-up {
    opacity: 1;
}

.modal-scroll-down {
    position: sticky;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666666;
    transition: all 0.3s ease;
    pointer-events: none;
    margin-left: auto;
    margin-top: -40px;
    z-index: 10;
}

.modal-scroll-down.hidden {
    opacity: 0;
}

.modal-scroll-down svg {
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(5px);
    }
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 2rem;
    color: #AAAAAA;
    cursor: pointer;
    background: none;
    border: none;
    transition: color 0.3s ease;
    line-height: 1;
}

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

.modal-body h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    font-weight: 400;
    color: #FFFFFF;
    margin-bottom: 3rem;
    letter-spacing: 2px;
}

.modal-body .content {
    font-size: 0.95rem;
    line-height: 2;
    color: #CCCCCC;
    font-weight: 300;
}

.modal-body .content h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.3rem;
    color: #FFFFFF;
    margin: 3rem 0 1.5rem;
    letter-spacing: 2px;
    font-weight: 400;
}

.modal-body .content h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    color: #999999;
    margin: 2rem 0 1rem;
    letter-spacing: 1px;
    font-weight: 300;
}

.modal-body .content p {
    margin-bottom: 1rem;
}

.modal-body .content ul,
.modal-body .content ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.modal-body .content a {
    color: #FFFFFF;
    text-decoration: underline;
}

.modal-body .content a:hover {
    color: #AAAAAA;
}

.modal-date {
    text-align: center;
    color: #666666;
    font-size: 0.9rem;
    margin-top: 2rem !important;
    font-style: italic;
}

/* Scroll Indicator */
.modal-scroll-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666666;
    transition: all 0.3s ease;
    pointer-events: none;
    opacity: 1;
    z-index: 1001;
}

.modal-scroll-indicator.hidden {
    opacity: 0;
}

.modal-scroll-indicator svg {
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(5px);
    }
}

.modal-loading {
    text-align: center;
    color: #AAAAAA;
    font-size: 1.2rem;
    padding: 40px;
}
