/* 防止FOUC (Flash of Unstyled Content) */
html {
    visibility: hidden;
    opacity: 0;
}

/* 頁面加載完成後顯示 */
html.loaded {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f4f6;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}



/* 模態框基礎樣式 - 防止初始化閃爍 */
.modal-common {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow-y: auto;
    overflow-x: hidden;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-common.show {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.modal-content-common {
    position: relative;
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 90%;
    max-width: 450px;
    margin: 32px auto;
    transform: scale(0.95);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.modal-common.show .modal-content-common {
    transform: scale(1);
}


/* 移動裝置樣式 */
@media (max-width: 576px ) {
    .modal-content-common {
        max-width: 90%;
        margin: 20px auto;
    }
} 

@media (min-width: 1400px) {
    .container2 {
        max-width: 1400px;
        margin: 0 auto;
    }
}