/* ==========================================
   模态框样式模块 - Modal Styles
   包含：模态框、存储选择等
   ========================================== */

/* 模态框样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1100;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-container {
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 
        0 32px 64px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transform: scale(0.9);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active .modal-container {
    transform: scale(1);
    animation: modalSlideIn 0.4s ease forwards;
}

.modal-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 30px;
    border-radius: 24px 24px 0 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 144, 0, 0.1) 0%, rgba(0, 0, 0, 0.1) 100%);
}

.modal-header h3 {
    font-size: 1.8rem;
    color: #ffffff;
    margin: 0;
    font-weight: 600;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 3;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.modal-content {
    padding: 30px;
}

.modal-storage-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.modal-storage-option {
    background: rgba(40, 40, 40, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.modal-storage-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff9000, #000000);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-storage-option:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 144, 0, 0.3);
}

.modal-storage-option:hover::before {
    opacity: 1;
}

.modal-storage-option.selected {
    border-color: rgba(255, 144, 0, 0.6);
    background: rgba(50, 45, 65, 0.9);
}

.modal-storage-option.selected::before {
    opacity: 1;
}

/* 存储选项通用样式（用于模态框） */
.storage-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.storage-description {
    color: #cccccc;
    font-size: 0.95rem;
    line-height: 1.4;
    margin-top: 10px;
}

.storage-selected-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

.modal-storage-option.selected .storage-selected-icon {
    display: flex;
}

.storage-error {
    text-align: center;
    color: #ff6b6b;
    padding: 30px;
    font-size: 1.1rem;
    grid-column: 1 / -1;
    background: rgba(255, 107, 107, 0.1);
    border-radius: 15px;
    border: 1px solid rgba(255, 107, 107, 0.2);
}

.storage-loading {
    text-align: center;
    color: #aaa;
    padding: 30px;
    font-size: 1.1rem;
    grid-column: 1 / -1;
    background: rgba(40, 40, 40, 0.5);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-storage-container .storage-loading {
    background: linear-gradient(
        90deg,
        rgba(40, 40, 40, 0.8) 25%,
        rgba(60, 60, 60, 0.8) 50%,
        rgba(40, 40, 40, 0.8) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

