/* --- 弹窗样式 (Modal Styles) --- */

/* 弹窗遮罩层 */
.modal {
    display: none; /* 默认隐藏 */
    position: fixed;
    z-index: 2000; /* 保证在导航栏之上 */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.4); /* 柔和的白色遮罩 */
    backdrop-filter: blur(10px); /* 毛玻璃模糊效果 */
    -webkit-backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* 弹窗显示时的状态 */
.modal[style*="display: flex"] {
    opacity: 1;
}

/* 弹窗内容卡片 */
.modal-content {
    background-color: #fff;
    padding: 40px;
    border-radius: var(--radius-lg); /* 24px 圆角 */
    width: 90%;
    max-width: 480px;
    box-shadow: var(--shadow-hover); /* 使用原有的悬浮阴影 */
    position: relative;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.8);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal[style*="display: flex"] .modal-content {
    transform: scale(1);
}

/* 关闭按钮 (X) */
.close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 32px;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.3s;
    line-height: 1;
}

.close-btn:hover {
    color: var(--primary-color);
}

/* 弹窗头部 */
.modal-header h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--text-main);
}

.modal-header p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 30px;
}

/* 下载行布局 */
.download-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #f5f5f5;
    text-align: left;
}

.download-row:last-child {
    border-bottom: none;
}

.download-info h4 {
    font-size: 1rem;
    color: var(--text-main);
    margin-bottom: 4px;
}

.download-info span {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* 弹窗内的按钮样式微调 */
.download-row .btn {
    min-width: 100px;
    font-size: 0.9rem;
    padding: 10px 20px;
}

/* 响应式调整 */
@media (max-width: 480px) {
    .modal-content {
        padding: 30px 20px;
    }
    
    .download-row {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .download-row .btn {
        width: 100%;
    }
}
/* --- 下载弹窗样式 (Modal Styles) --- */

/* 遮罩层：覆盖全屏，背景半透明模糊 */
.modal-overlay {
    display: none; /* 默认隐藏 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.6); /* 柔和的白色背景 */
    backdrop-filter: blur(8px); /* 毛玻璃效果 */
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000; /* 确保在所有内容之上 */
    justify-content: center; /* Flex 居中 */
    align-items: center; /* Flex 居中 */
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* 当 JS 设置 display:flex 时触发显示 */
.modal-overlay[style*="flex"] {
    opacity: 1;
}

/* 弹窗卡片容器 */
.modal-container {
    background: #ffffff;
    width: 90%;
    max-width: 400px;
    padding: 30px;
    border-radius: var(--radius-lg); /* 使用全局圆角变量 */
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    position: relative;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.8);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* 弹窗显示时的动画 */
.modal-overlay[style*="flex"] .modal-container {
    transform: scale(1);
}

/* 关闭按钮 (X) */
.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    color: var(--text-light);
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}
.modal-close:hover {
    color: var(--primary-color);
}

/* 弹窗标题 */
.modal-content h2 {
    margin-bottom: 10px;
    color: var(--text-main);
    font-size: 1.5rem;
}

.modal-content p {
    color: var(--text-light);
    margin-bottom: 30px;
    font-size: 0.95rem;
}

/* 下载选项列表 */
.download-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.download-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-color); /* 使用浅灰背景区分 */
    padding: 15px;
    border-radius: var(--radius-md);
    text-align: left;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.download-item:hover {
    background: #fff;
    border-color: rgba(255, 140, 148, 0.2);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.item-info h3 {
    font-size: 1rem;
    color: var(--text-main);
    margin-bottom: 4px;
}

.item-info span {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* 小尺寸按钮样式 */
.btn-sm {
    padding: 8px 20px;
    font-size: 0.85rem;
}

/* 次级按钮样式 (网盘下载) */
.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    box-shadow: none;
}

.btn-outline:hover {
    background: rgba(255, 140, 148, 0.05);
    transform: translateY(-2px);
}
