.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 200;
}

.dialog-container {
    background: rgba(10, 20, 40, 0.95);
    border: 1px solid #4488ff;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(68, 136, 255, 0.4), inset 0 0 20px rgba(0, 0, 0, 0.9);
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    animation: dialogIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden; /* Container não scrola, apenas o corpo */
}

.dialog-header {
    padding: 10px 20px;
    border-bottom: 1px solid rgba(68, 136, 255, 0.3);
    color: #4488ff;
    background: rgba(10, 20, 40, 0.8);
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    position: relative;
    min-height: 44px;
    box-sizing: border-box;
}

.dialog-title-text {
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    flex: 1;
    min-width: 200px;
}

.dialog-close-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #88bbff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, transform 0.2s;
}

.dialog-close-btn:hover {
    color: #fff;
    transform: translateY(-50%) scale(1.2);
}

.dialog-body {
    padding: 20px;
    overflow-y: auto;
    color: #fff;
    flex-grow: 1;
    min-height: 0; /* Essencial para flex-grow + overflow funcionar */
}

#overlay-upgrade-menu .dialog-body {
    padding: 20px 0; /* Mantém padding vertical, mas remove horizontal para largura total */
}

.dialog-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(68, 136, 255, 0.2);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: rgba(10, 20, 40, 0.3);
    flex-shrink: 0;
}

@keyframes dialogIn {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Scroll customizado */
.dialog-body::-webkit-scrollbar { width: 6px; }
.dialog-body::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.2); }
.dialog-body::-webkit-scrollbar-thumb { background: #4488ff; border-radius: 3px; }

/* Responsividade Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .dialog-container {
        max-height: 95vh;
        max-width: 85vw;
        width: 100%;
    }
    .dialog-header { padding: 8px 20px; font-size: 0.9em; }
    .dialog-body { padding: 10px 20px; }
    .dialog-footer { padding: 8px 20px; }
}
