/* Modal arka plan */
.modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0; top: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.86);
    justify-content: center;
    align-items: center;
    transition: background .25s;
}
.modal-content {
    background: #181818;
    border-radius: 18px;
    max-width: 96vw;
    width: 980px;
    min-width: 320px;
    height: 84vh;
    max-height: 94vh;
    box-shadow: 0 0 40px #000b;
    display: flex; flex-direction: column; align-items: stretch;
    padding: 0; position: relative;
    animation: modalPop .18s cubic-bezier(.85,-0.06,.42,1.27);
}
@keyframes modalPop { from { transform:scale(.94); opacity:.2; } to {transform:none; opacity:1;} }
.modal-topbar {
    display: flex; align-items: center; gap: 18px;
    background: #101010;
    border-radius: 18px 18px 0 0;
    padding: 18px 30px 14px 30px;
    font-size: 18px;
    min-height: 56px;
    border-bottom: 1px solid #292929;
}
.modal-logo { font-size: 24px; margin-right: 10px;}
.modal-btn {
    background: #fff1; color: #fff; border: none; border-radius: 30px; padding: 7px 22px;
    margin-right: 10px; font-size:16px; cursor:pointer; transition:.15s;
}
.modal-btn:hover { background: #ffda00; color:#222;}
.modal-fav { background:none; color:#ffb700; border:none; font-size:17px; cursor:pointer;}
#favIcon { font-size: 22px; vertical-align: middle;}
.modal-icon {
    background:none; border:none; cursor:pointer;
    margin-left: 10px; filter:invert(1); opacity:0.84; transition:.18s;
    width:32px; height:32px; padding:2px;
    display:inline-flex; align-items:center; justify-content:center;
}
.modal-icon:hover { opacity:1; background:#272727;}
.modal-icon img { width: 22px; height: 22px; display:block;}
.modal-game { position: relative; flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; }
#gameIframe {
    width: 100%;
    height: 68vh;
    min-height: 420px;
    max-height: 74vh;
    border-radius: 10px;
    background: #191919;
    box-shadow: 0 0 18px #000a;
    display: block;
    transition: box-shadow .16s;
}
#gameIframe:fullscreen {
    width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    border-radius: 0 !important;
    background: #000 !important;
}


.modal.fullscreen,
.modal.fullscreen .modal-content,
.modal.fullscreen #gameIframe {
    width: 100vw !important;
    height: 100vh !important;
    min-width: 100vw !important;
    min-height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    background: #000 !important;
    box-shadow: none !important;
    top: 0 !important; left: 0 !important;
}
.modal.fullscreen .modal-topbar {
    border-radius: 0 !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
}


.game-error {
    position: absolute; inset:0; z-index:3;
    background:#191919ee; color:#fff;
    display:flex; flex-direction:column; align-items:center; justify-content:center;
}
.game-error-title { font-size:26px; font-weight:700; margin-bottom:12px;}
.game-error-icon { font-size:60px; margin-bottom:20px;}
.game-error-desc { font-size:20px; line-height:1.4; text-align:center;}
@media (max-width:1200px) {
    .modal-content { width: 99vw; }
    #gameIframe { min-height: 320px; height: 53vw;}
}
@media (max-width:900px) {
    .modal-content { width:99vw; min-width:0; }
    #gameIframe { min-height:220px; height:50vw; }
    .modal-topbar { font-size:16px; padding:12px 12px 10px 16px;}
}
@media (max-width:600px) {
    .modal-content { width:100vw; border-radius:0;}
    .modal-topbar { font-size:14px; padding:7px 7px 8px 12px;}
    #gameIframe {height: 100vh;}
}

/* MASAÜSTÜ TAM EKRAN SLOT MODALI */
@media (min-width: 900px) {
    .modal.fullscreen {
        padding: 0 !important;
        background: #000 !important;
    }
    .modal.fullscreen .modal-content {
        width: 100vw !important;
        min-width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        min-height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: #000 !important;
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
    }
    .modal.fullscreen .modal-topbar {
        border-radius: 0 !important;
        min-height: 54px !important;
        background: #181818 !important;
        padding-left: 18px !important;
        padding-right: 18px !important;
    }
    .modal.fullscreen .modal-game {
        flex: 1 1 0;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: stretch !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .modal.fullscreen #gameIframe {
        width: 100vw !important;
        height: 100% !important;
        min-height: 0 !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        background: #000 !important;
        box-shadow: none !important;
    }
}
