.cloud-save-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(0.1rem);
}

.cloud-save-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.cloud-save-dialog {
    /* 移除 position: fixed; top: 0; left: 0; 等屬性，由父層 Flex 居中 */
    position: relative;
    width: 90%;
    height: 90%;
    max-width: 22rem;
    max-height: 30rem;

    /*background-size: cover;*/
    background-color: hsl(42, 50%, 85%);
    border-radius: 12px;
    padding: 1rem 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 3px solid #d4af37;
    text-align: center;

    /* 初始縮放，如果是居中定位，需包含 translate */
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

/* 處理 aspect-5-8 情況下的縮放動畫 */
.cloud-save-overlay.active .cloud-save-dialog {
    transform: scale(1);
}

/* 如果有 aspect-5-8 類別，必須確保 translate 不被 scale(1) 覆蓋 */
.cloud-save-overlay.active .cloud-save-dialog.aspect-5-8 {
    transform: translate(-50%, -50%) scale(1);
}

/*標題*/
.cloud-save-title {
    font-size: 1.8rem;
    color: hsl(30, 80%, 40%);
    font-weight: bold;
    margin-bottom: 2rem;
    text-shadow: 0px 1px 2px rgba(255, 255, 255, 0.8);
}

/*說明文字*/
.cloud-save-desc {
    font-size: 1.1rem;
    color: hsl(0, 0%, 25%);
    margin-bottom: 2.0rem;
    line-height: 1.5;
    white-space: pre-line;
}

/*輸入欄*/
.cloud-save-input-group {
    margin-bottom: 1.0rem;
    position: relative;
}

.cloud-save-input {
    width: 100%;
    padding: 0.8rem 1rem;
    font-size: 1.2rem;
    border: 2px solid #a88a53;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.8);
    color: #333;
    outline: none;
    text-align: center;
    font-family: inherit;
    transition: all 0.2s;
    box-sizing: border-box;
}

.cloud-save-input:focus {
    border-color: #d4af37;
    background: #fff;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

.cloud-save-actions {
    display: flex;
    justify-content: center;
    gap: 3rem;
}

.cloud-save-btn {
    padding: 0.4rem 1.5rem;
    font-size: 1.2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
    transition: all 0.2s;
}

.cloud-save-btn-primary {
    background: linear-gradient(to bottom, #d4af37, #a88a53);
    color: white;
    text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.3);
}

.cloud-save-btn-primary:hover {
    background: linear-gradient(to bottom, #e5c358, #bba06b);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.cloud-save-btn-secondary {
    background: #eee;
    color: #666;
    border: 1px solid #ccc;
}

.cloud-save-btn-secondary:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.cloud-save-message {
    margin-top: 1rem;
    font-size: 1rem;
    min-height: 1.5rem;
}

.msg-error {
    color: #d93838;
}

.msg-success {
    color: #28a745;
}