
.modal-overlay-custom {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 20000;
    padding: 1rem;
    overflow-y: hidden;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    animation: fadeIn 0.3s ease;
}

html {
    scrollbar-gutter: stable;
}

html, body {
    overflow-x: hidden;
}

body.modal-open-custom {
    padding-right: var(--scrollbar-compensation, 0px);
}

.modal-content-custom,
.modal-content-custom * {
    box-sizing: border-box;
}

#ReportComment .modal-content-custom,
#ReportPresent .modal-content-custom {
    margin-left: auto;
    margin-right: auto;
}

.modal-overlay-custom .modal-dialog {
   /* width: 100%;
    max-width: 100%;*/
    margin: 1rem;
}

#ReportComment .modal-dialog,
#ReportPresent .modal-dialog {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    width: 100%;
}

#ReportComment .modal-content,
#ReportPresent .modal-content {
    background: transparent;
    box-shadow: none;
    border: 0;
}

#ReportComment .modal-content-custom,
#ReportPresent .modal-content-custom {
    margin-top: 0;
    max-height: calc(100vh - 4rem);
}

#ReportComment.modal-overlay-custom,
#ReportPresent.modal-overlay-custom {
    overflow: hidden;
}

#ReportComment.modal-overlay-custom .modal-dialog,
#ReportPresent.modal-overlay-custom .modal-dialog {
    max-height: calc(100vh - 2rem);
}

#ReportComment.modal-overlay-custom .modal-body-custom,
#ReportPresent.modal-overlay-custom .modal-body-custom {
    overflow-y: auto;
    overflow-x: hidden;
}

.modal-overlay-custom .modal-content {
    width: 100%;
    max-width: 100%;
    max-height: calc(100vh - 2rem);
/*    overflow: auto;*/
}

#Connect.modal-overlay-custom {
    padding: 1rem !important;
    width: 100%;
}

#Connect.modal-overlay-custom .modal-dialog {
    width: 100%;
    max-width: 650px;
    margin: 0;
}

#Connect.modal-overlay-custom #modalContent {
    width: 100%;
    max-width: 100%;
}

#connect {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    overflow-y: auto;
    padding: calc(env(safe-area-inset-top, 0px) + 1rem) 1rem 1rem;
}

.modal-overlay-custom.show {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content-custom {
    background: linear-gradient(135deg, rgba(26, 35, 50, 0.98), rgba(15, 25, 35, 0.98));
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 500px;
    overflow: hidden;
    max-height: calc(100vh - 7rem);
    animation: modalSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    margin-top: 1rem;
}

@media (max-height: 750px), (max-width: 576px) {
    .modal-content-custom {
        margin-top: calc(var(--navbar-height, 90px) * 0.25);
    }
}

@media (max-height: 750px) {
    .modal-content-custom {
        max-height: calc(100vh - (var(--navbar-height, 90px) + 2rem));
    }

    .modal-body-custom {
        max-height: calc(100vh - (var(--navbar-height, 90px) + 10rem));
        overflow-y: auto;
    }
}

@media (max-width: 576px) {
    .modal-overlay-custom {
        padding: .75rem;
    }

    .modal-content-custom {
        max-width: 100%;
        border-radius: 16px;
    }
}

.modal-body-custom {
    overflow-y: auto;
    max-height: calc(100vh - 14rem);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header-custom {
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.modal-header-custom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    opacity: 0.1;
    background: radial-gradient(circle at center, currentColor 0%, transparent 70%);
}

.modal-icon-custom {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    position: relative;
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.modal-icon-custom::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    opacity: 0.3;
    animation: iconGlow 2s ease-in-out infinite;
}

@keyframes iconGlow {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.3; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.1; }
}

.modal-content-custom.success .modal-header-custom {
    border-bottom: 3px solid #4caf50;
    color: #4caf50;
}

.modal-content-custom.success .modal-icon-custom {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(102, 187, 106, 0.2));
    border: 3px solid #4caf50;
    color: #4caf50;
}

.modal-content-custom.success .modal-icon-custom::before {
    background: #4caf50;
}

.modal-content-custom.info .modal-header-custom {
    border-bottom: 3px solid #0088ff;
    color: #0088ff;
}

.modal-content-custom.info .modal-icon-custom {
    background: linear-gradient(135deg, rgba(0, 136, 255, 0.2), rgba(0, 212, 255, 0.2));
    border: 3px solid #0088ff;
    color: #0088ff;
}

.modal-content-custom.info .modal-icon-custom::before {
    background: #0088ff;
}

.modal-content-custom.warning .modal-header-custom {
    border-bottom: 3px solid #ff9800;
    color: #ff9800;
}

.modal-content-custom.warning .modal-icon-custom {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.2), rgba(255, 193, 7, 0.2));
    border: 3px solid #ff9800;
    color: #ff9800;
}

.modal-content-custom.warning .modal-icon-custom::before {
    background: #ff9800;
}

.modal-content-custom.danger .modal-header-custom {
    border-bottom: 3px solid #f44336;
    color: #f44336;
}

.modal-content-custom.danger .modal-icon-custom {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.2), rgba(229, 115, 115, 0.2));
    border: 3px solid #f44336;
    color: #f44336;
}

.modal-content-custom.danger .modal-icon-custom::before {
    background: #f44336;
}

.modal-title-custom {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    position: relative;
}

.modal-body-custom {
    padding: 1.5rem 2rem;
}

.modal-message-custom {
    color: #ccc;
    line-height: 1.6;
    font-size: 1rem;
    text-align: center;
}

.modal-footer-custom {
    padding: 1.5rem 2rem 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.modal-button-custom {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 120px;
}

.modal-button-custom:hover {
    transform: translateY(-2px);
}

.modal-button-custom.primary {
    color: #fff;
}

.modal-content-custom.success .modal-button-custom.primary {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.modal-content-custom.success .modal-button-custom.primary:hover {
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.5);
}

.modal-content-custom.info .modal-button-custom.primary {
    background: linear-gradient(135deg, #0088ff, #00d4ff);
    box-shadow: 0 4px 15px rgba(0, 136, 255, 0.3);
}

.modal-content-custom.info .modal-button-custom.primary:hover {
    box-shadow: 0 6px 20px rgba(0, 136, 255, 0.5);
}

.modal-content-custom.warning .modal-button-custom.primary {
    background: linear-gradient(135deg, #ff9800, #ffc107);
    color: #000;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}

.modal-content-custom.warning .modal-button-custom.primary:hover {
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.5);
}

.modal-content-custom.danger .modal-button-custom.primary {
    background: linear-gradient(135deg, #f44336, #e57373);
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3);
}

.modal-content-custom.danger .modal-button-custom.primary:hover {
    box-shadow: 0 6px 20px rgba(244, 67, 54, 0.5);
}

.modal-button-custom.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.modal-button-custom.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.close-button-custom {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.close-button-custom:hover {
    background: rgba(255, 0, 0, 0.3);
    border-color: #ff0000;
    transform: rotate(90deg);
}

.spinner-modal .modal-content-custom {
    background: transparent;
    box-shadow: none;
    max-width: 200px;
    display: flex; 
    justify-content: center;
    align-items: center;
}
 
 .spinner-modal {
     display: flex; 
     z-index: 2147483647; 
 }

.modal-overlay-custom.show {
    display: flex;
}


#Spinner {
    display: none;
}

#Spinner.show {
    display: flex;
}

.spinner-modal {
    justify-content: center;
    align-items: center;
}

@media (max-width: 768px) {
    .modal-content-custom {
        max-width: 100%;
        margin: 1rem;
    }

    .modal-header-custom {
        padding: 1.5rem;
    }

    .modal-icon-custom {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    .modal-title-custom {
        font-size: 1.5rem;
    }

    .modal-body-custom {
        padding: 1rem 1.5rem;
    }

    .modal-footer-custom {
        flex-direction: column;
        padding: 1rem 1.5rem 1.5rem;
    }

    .modal-button-custom {
        width: 100%;
    }
}


#Display .modal-dialog { display: flex; align-items: center; }
#Display #DisplayContent .video-display-container { padding: 1rem !important; border-radius: 0 !important; border: none !important; margin: 0 !important; }
#Display #DisplayContent .video-display-header { display: none !important; }
#Display #DisplayContent .video-title { font-size: 1rem !important; margin-bottom: 0.5rem !important; }
#Display #DisplayContent .video-content-wrapper { padding: 0.5rem !important; margin: 0 !important; }
#Display #DisplayContent .video-player-section { margin-bottom: 0 !important; }
#Display #DisplayContent .video-player-container { max-width: 100% !important; margin: 0 !important; }
#Display #DisplayContent .video-player-container iframe { height: 400px !important; }
#Display #DisplayContent .fifa-modal-footer { display: none !important; }
@media (max-width: 768px) { #Display .modal-dialog { width: 95vw !important; max-width: 95vw !important; } #Display #DisplayContent .video-player-container iframe { height: 300px !important; } }
