/* 下载地址管理样式 */

/* ===== 下载区域容器 ===== */
.sg-download-section {
    background: white;
    border: 1px solid var(--sogame-border);
    border-radius: 12px;
    margin: 40px 0;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* ===== 下载头部 ===== */
.sg-download-header {
    background: linear-gradient(135deg, var(--sogame-dark), var(--sogame-dark-light));
    color: white;
    padding: 24px 32px;
    border-bottom: 2px solid var(--sogame-coral);
}

.sg-download-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: white;
    position: relative;
    display: inline-block;
}

.sg-download-title::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--sogame-coral);
    border-radius: 2px;
}

.sg-download-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 16px;
    backdrop-filter: blur(4px);
}

.sg-download-notice .sg-icon {
    font-size: 18px;
    color: var(--sogame-coral-light);
}

.sg-download-notice span {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}

/* ===== 标签页导航 ===== */
.sg-download-tabs {
    padding: 32px;
}

.sg-tab-nav {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--sogame-border);
    margin-bottom: 24px;
    overflow-x: auto;
    scrollbar-width: none;
}

.sg-tab-nav::-webkit-scrollbar {
    display: none;
}

.sg-tab-btn {
    background: none;
    border: none;
    color: var(--sogame-gray);
    font-size: 16px;
    font-weight: 500;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
    border-radius: 8px 8px 0 0;
}

.sg-tab-btn:hover {
    color: var(--sogame-coral);
    background: rgba(255, 82, 82, 0.05);
}

.sg-tab-btn.active {
    color: var(--sogame-coral);
    font-weight: 600;
}

.sg-tab-btn.active::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--sogame-coral);
    border-radius: 1px;
}

/* ===== 标签页内容 ===== */
.sg-tab-content {
    min-height: 200px;
}

.sg-tab-pane {
    display: none;
    animation: sg-fade-in 0.3s ease;
}

.sg-tab-pane.active {
    display: block;
}

@keyframes sg-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== 下载地址列表 ===== */
.sg-download-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sg-download-item {
    background: var(--sogame-gray-lighter);
    border: 1px solid var(--sogame-border);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    transition: all 0.3s ease;
    border-left: 4px solid var(--sogame-coral);
}

.sg-download-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--sogame-coral);
}

.sg-download-info {
    flex: 1;
    min-width: 0;
}

.sg-download-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--sogame-dark);
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.sg-download-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--sogame-gray);
}

.sg-download-size,
.sg-download-format {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: white;
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid var(--sogame-border);
}

.sg-download-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

/* ===== 下载按钮 ===== */
.sg-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--sogame-coral), var(--sogame-coral-dark));
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 140px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(255, 82, 82, 0.3);
    position: relative;
    overflow: hidden;
}

.sg-download-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.sg-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 82, 82, 0.4);
}

.sg-download-btn:hover::before {
    left: 100%;
}

.sg-download-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 82, 82, 0.3);
}

.sg-download-btn .sg-icon {
    font-size: 18px;
}

/* 备用下载按钮 */
.sg-download-btn-backup {
    background: linear-gradient(135deg, #666666, #333333);
    box-shadow: 0 4px 12px rgba(102, 102, 102, 0.3);
}

.sg-download-btn-backup:hover {
    box-shadow: 0 6px 20px rgba(102, 102, 102, 0.4);
    background: linear-gradient(135deg, #555555, #222222);
}

.sg-download-btn-backup:active {
    box-shadow: 0 2px 8px rgba(102, 102, 102, 0.3);
}

/* ===== 无下载地址状态 ===== */
.sg-no-downloads {
    text-align: center;
    padding: 60px 20px;
    border: 2px dashed var(--sogame-border);
    border-radius: 10px;
    background: var(--sogame-gray-lighter);
}

.sg-no-downloads .sg-icon {
    font-size: 48px;
    color: var(--sogame-border);
    margin-bottom: 20px;
}

.sg-no-downloads p {
    font-size: 16px;
    color: var(--sogame-gray);
    margin: 0;
    line-height: 1.6;
}

/* ===== 解压密码区域 ===== */
.sg-password-section {
    padding: 20px;
}

.sg-password-box {
    background: white;
    border: 2px solid var(--sogame-border);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.sg-password-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 16px 20px;
    border-bottom: 1px solid var(--sogame-border);
}

.sg-password-header h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--sogame-dark);
    margin: 0;
}

.sg-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--sogame-coral);
    color: white;
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sg-copy-btn:hover {
    background: var(--sogame-coral-dark);
    transform: translateY(-1px);
}

.sg-copy-btn .sg-icon {
    font-size: 14px;
}

.sg-password-content {
    padding: 20px;
    background: #f8f9fa;
}

.sg-password-text {
    display: inline-block;
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: 600;
    color: var(--sogame-dark);
    background: white;
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid var(--sogame-border);
    letter-spacing: 1px;
    word-break: break-all;
}

.sg-password-notice {
    padding: 16px 20px;
    background: #fff3cd;
    border-top: 1px solid #ffecb5;
    color: #856404;
}

.sg-password-notice p {
    margin: 0;
    line-height: 1.5;
    font-size: 14px;
}

.sg-password-notice strong {
    color: #856404;
}

/* ===== 安装说明区域 ===== */
.sg-install-guide {
    padding: 20px;
}

.sg-install-content {
    font-size: 15px;
    line-height: 1.7;
    color: var(--sogame-dark);
    margin-bottom: 24px;
}

.sg-install-content h3,
.sg-install-content h4,
.sg-install-content h5 {
    color: var(--sogame-dark);
    margin-top: 24px;
    margin-bottom: 12px;
}

.sg-install-content p {
    margin-bottom: 16px;
}

.sg-install-content ul,
.sg-install-content ol {
    padding-left: 24px;
    margin-bottom: 16px;
}

.sg-install-content li {
    margin-bottom: 8px;
}

.sg-install-notice {
    background: #e7f3ff;
    border: 1px solid #bbdefb;
    border-radius: 8px;
    padding: 20px;
}

.sg-install-tips h5 {
    color: #1976d2;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px 0;
}

.sg-install-tips ul {
    padding-left: 20px;
    margin: 0;
}

.sg-install-tips li {
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
}

/* ===== 下载页脚 ===== */
.sg-download-footer {
    padding: 24px 32px;
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border-top: 1px solid #ffecb5;
}

.sg-download-warning {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.sg-download-warning .sg-icon {
    font-size: 24px;
    color: #ff9800;
    flex-shrink: 0;
    margin-top: 2px;
}

.sg-warning-content {
    flex: 1;
}

.sg-warning-content p {
    margin: 0 0 8px 0;
    font-size: 14px;
    line-height: 1.6;
    color: #856404;
}

.sg-warning-content p:last-child {
    margin-bottom: 0;
}

.sg-warning-content strong {
    color: #856404;
    font-weight: 600;
}

/* ===== 响应式调整 ===== */
@media (max-width: 768px) {
    .sg-download-section {
        margin: 20px 0;
    }
    
    .sg-download-header {
        padding: 20px;
    }
    
    .sg-download-title {
        font-size: 24px;
    }
    
    .sg-download-tabs {
        padding: 20px;
    }
    
    .sg-tab-nav {
        flex-wrap: wrap;
        gap: 2px;
    }
    
    .sg-tab-btn {
        padding: 10px 16px;
        font-size: 14px;
        flex: 1;
        min-width: 120px;
        text-align: center;
    }
    
    .sg-download-item {
        flex-direction: column;
        text-align: center;
        padding: 16px;
    }
    
    .sg-download-info {
        text-align: center;
    }
    
    .sg-download-meta {
        justify-content: center;
    }
    
    .sg-download-actions {
        width: 100%;
        justify-content: center;
    }
    
    .sg-download-btn {
        width: 100%;
        min-width: unset;
    }
}

@media (max-width: 480px) {
    .sg-download-header {
        padding: 16px;
    }
    
    .sg-download-title {
        font-size: 20px;
    }
    
    .sg-download-notice {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .sg-download-tabs {
        padding: 16px;
    }
    
    .sg-password-box {
        margin: 0 -16px;
    }
    
    .sg-password-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .sg-copy-btn {
        width: 100%;
        justify-content: center;
    }
    
    .sg-install-content {
        font-size: 14px;
    }
}

/* ===== 动画效果 ===== */
@keyframes sg-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.sg-download-btn.pulse {
    animation: sg-pulse 1.5s ease infinite;
}

/* ===== 下载进度指示器 ===== */
.sg-download-progress {
    position: relative;
    overflow: hidden;
}

.sg-download-progress::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: sg-loading 1.5s ease infinite;
}

@keyframes sg-loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* ===== 下载确认对话框 ===== */
.sg-download-confirm {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.sg-confirm-box {
    background: white;
    border-radius: 12px;
    padding: 32px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: sg-slide-up 0.3s ease;
}

@keyframes sg-slide-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.sg-confirm-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--sogame-dark);
    margin: 0 0 16px 0;
}

.sg-confirm-message {
    font-size: 15px;
    line-height: 1.6;
    color: var(--sogame-gray);
    margin-bottom: 24px;
}

.sg-confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.sg-confirm-btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.sg-confirm-cancel {
    background: var(--sogame-gray-light);
    color: var(--sogame-gray);
}

.sg-confirm-cancel:hover {
    background: #cccccc;
}

.sg-confirm-proceed {
    background: var(--sogame-coral);
    color: white;
}

.sg-confirm-proceed:hover {
    background: var(--sogame-coral-dark);
}

/* ===== 下载成功反馈 ===== */
.sg-download-success {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--sogame-success);
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    animation: sg-slide-in-right 0.3s ease, sg-fade-out 0.3s ease 2.7s;
    animation-fill-mode: forwards;
}

@keyframes sg-slide-in-right {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes sg-fade-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

.sg-success-message {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
}

.sg-success-message .sg-icon {
    font-size: 18px;
}