.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 1.5rem;
    box-sizing: border-box;
    overflow-y: auto;
}

.modal-overlay.active-modal {
    opacity: 1;
    pointer-events: auto;
}

.modal-box {
    background-color: #1a1a1a;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    padding: 3rem 2rem 2.5rem 2rem;
    max-width: 600px;
    width: 100%;
    position: relative;
    box-sizing: border-box;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s cubic-bezier(0.1, 0.9, 0.2, 1);
    max-height: calc(100vh - 3rem); /* Nem engedi a képernyőnél nagyobbra nőni (levonva az overlay paddingját) */
    display: flex;
    flex-direction: column;
}

.modal-overlay.active-modal .modal-box {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: #94A3B8;
    font-size: 2.2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s ease, transform 0.2s ease;
}

.modal-close:hover {
    color: #febe33;
    transform: scale(1.1);
}

#modal-title {
    color: #ffffff;
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

#modal-body {
    color: #94A3B8;
    line-height: 1.6;
    font-size: 1.05rem;
    text-align: left;
    overflow-y: auto;
    padding-right: 0.5rem;
}

#modal-body p {
    color: #94A3B8;
    line-height: 1.6;
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

#modal-body p:last-child {
    margin-bottom: 0;
}

#modal-body ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#modal-body li {
    color: #94A3B8;
    position: relative;
    padding-left: 1.5rem; /* Hely az egyedi sárga pöttynek */
    margin-bottom: 0.8rem;
    line-height: 1.5;
    font-size: 1rem;
}

#modal-body li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 6px;
    height: 6px;
    background-color: #febe33;
    border-radius: 2px;
}

/* --- MODERN GÖRGETŐSÁV STÍLUS --- */

/* Firefox támogatás */
#modal-body {
    scrollbar-width: thin;
    scrollbar-color: rgba(254, 190, 51, 0.4) transparent; /* Sárga csúszka, átlátszó háttér */
}

/* Chrome, Safari, Edge, Opera támogatás */
#modal-body::-webkit-scrollbar {
    width: 6px; /* Nagyon vékony, elegáns szélesség */
}

/* A sáv, amiben a csúszka mozog (háttér) */
#modal-body::-webkit-scrollbar-track {
    background: transparent; /* Teljesen beolvad a modális ablak hátterébe */
    margin-block: 0.5rem; /* Kis helyet hagy a doboz tetejétől és aljától */
}

/* Maga a csúszka (amit megfogsz) */
#modal-body::-webkit-scrollbar-thumb {
    background-color: rgba(254, 190, 51, 0.3); /* Alaphelyzetben finom, áttetsző sárga */
    border-radius: 20px; /* Teljesen lekerekített szélek (pillula forma) */
    transition: background-color 0.2s ease;
}

/* Amikor az egérrel a görgetősáv fölé mutatsz */
#modal-body::-webkit-scrollbar-thumb:hover {
    background-color: rgba(254, 190, 51, 0.8); /* Erősebb sárga, ha aktív */
}