/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #FAF0EC 0%, #F5E0D8 30%, #f5f5f5 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

/* 头部样式 */
header {
    text-align: center;
    color: #D97757;
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 2px solid #F0C4A0;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: none;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
    text-shadow: none;
    color: #C56343;
    font-weight: 500;
}

.download-quota {
    margin-top: 15px;
    padding: 10px 20px;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    display: inline-block;
    font-size: 0.95em;
}

.download-quota.unlimited {
    background: rgba(76, 175, 80, 0.3);
}

.download-quota.limited {
    background: rgba(255, 152, 0, 0.3);
}

/* 拖拽区域 */
.drop-zone {
    background: white;
    border: 3px dashed #ED8B6B;
    border-radius: 15px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.drop-zone:hover {
    border-color: #D97757;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(217, 119, 87, 0.15);
}

.drop-zone.drag-over {
    border-color: #D97757;
    background: #FAF0EC;
}

.upload-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    stroke: #D97757;
}

.drop-text {
    font-size: 1.3em;
    color: #333;
    margin-bottom: 10px;
    font-weight: 500;
}

.drop-subtext {
    color: #666;
    font-size: 0.95em;
}

/* 文件列表 */
.file-list-container {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.file-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.file-list-header h2 {
    font-size: 1.3em;
    color: #333;
}

.file-list {
    list-style: none;
    max-height: 350px;
    overflow-y: auto;
    padding-right: 5px;
}

/* 滚动条样式 */
.file-list::-webkit-scrollbar {
    width: 8px;
}

.file-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.file-list::-webkit-scrollbar-thumb {
    background: #D97757;
    border-radius: 4px;
}

.file-list::-webkit-scrollbar-thumb:hover {
    background: #C56343;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.file-item:hover {
    background: #e9ecef;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-source {
    font-size: 0.75em;
    padding: 2px 8px;
    border-radius: 10px;
    background: #D97757;
    color: white;
}

.file-source.netease {
    background: #C56343;
}

.file-source.qqmusic {
    background: #D97757;
}

.file-source.standard {
    background: #B84B33;
}

.file-meta {
    font-size: 0.85em;
    color: #666;
}

.file-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-remove {
    width: 30px;
    height: 30px;
    border: none;
    background: #ff5252;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2em;
    line-height: 1;
    transition: all 0.3s ease;
}

.file-remove:hover {
    background: #d32f2f;
    transform: scale(1.1);
}

.status-badge {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: 500;
}

.status-pending {
    background: #ED8B6B;
    color: #8B4513;
}

.status-processing {
    background: linear-gradient(135deg, #F0C4A0 0%, #ED8B6B 100%);
    color: #8B4513;
    animation: pulse 1.5s ease-in-out infinite;
    position: relative;
}

.status-processing::after {
    content: ' ⏳';
    animation: spin 1.5s linear infinite;
    display: inline-block;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.85;
        transform: scale(1.02);
    }
}

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

.status-success {
    background: #c8e6c9;
    color: #2e7d32;
}

.status-error {
    background: #ED8B6B;
    color: #8B4513;
}

/* 按钮样式 */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #D97757 0%, #C56343 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(217, 119, 87, 0.4);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: #f5f5f5;
    color: #666;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

/* 进度条 */
.overall-progress {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 500;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #D97757 0%, #C56343 100%);
    transition: width 0.3s ease;
}

/* 操作区域 */
.actions {
    text-align: center;
    margin-bottom: 20px;
}

/* 页脚 */
footer {
    text-align: center;
    color: white;
    padding: 20px;
}

.footer-note {
    margin-top: 10px;
    font-size: 0.9em;
    opacity: 0.9;
}

/* 工具类 */
.hidden {
    display: none !important;
}

/* 额度和操作区域 */
.quota-actions-section {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    box-shadow: 0 5px 20px rgba(217, 119, 87, 0.15);
    border: 1px solid rgba(217, 119, 87, 0.2);
}

.quota-display {
    flex: 1;
    min-width: 200px;
}

.quota-text {
    font-size: 1.1em;
    font-weight: 500;
    color: #333;
    display: inline-block;
    padding: 10px 20px;
    border-radius: 25px;
    background: #f0f0f0;
}

.quota-text.unlimited {
    background: #e8f5e9;
    color: #388e3c;
}

.quota-text.limited {
    background: #ffebee;
    color: #d32f2f;
}

.actions-buttons {
    display: flex;
    gap: 10px;
}

.btn-unlimited {
    background: linear-gradient(135deg, #D97757 0%, #C56343 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(217, 119, 87, 0.3);
    pointer-events: auto !important;
}

.btn-unlimited:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(217, 119, 87, 0.5);
}

.btn-unlimited:active {
    transform: translateY(0);
}

/* 响应式设计 */
@media (max-width: 600px) {
    .quota-actions-section {
        flex-direction: column;
        align-items: stretch;
    }

    .actions-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

/* 支付模块（展开式） */
.payment-section {
    margin-bottom: 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, opacity 0.3s ease;
    opacity: 0;
}

.payment-section:not(.hidden) {
    max-height: 600px;
    opacity: 1;
    transition: max-height 0.5s ease-in, opacity 0.3s ease;
}

.payment-section-content {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.payment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.payment-header h3 {
    margin: 0;
    font-size: 1.3em;
    color: #333;
}

.close-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5em;
    line-height: 1;
    color: #666;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.close-btn:hover {
    background: #e0e0e0;
    color: #333;
}

.payment-section-desc {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.quota-info-inline {
    padding: 12px 16px;
    background: linear-gradient(135deg, #ED8B6B 0%, #F0C4A0 100%);
    color: #8B4513;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 500;
    text-align: center;
}

.quota-info-inline.used {
    background: linear-gradient(135deg, #D97757 0%, #B84B33 100%);
    color: white;
}

.payment-options-inline {
    margin-bottom: 20px;
}

.payment-option-inline {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: white;
    border: 2px solid #D97757;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(217, 119, 87, 0.1);
}

.payment-option-inline:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(217, 119, 87, 0.3);
    background: #FAF0EC;
    border-color: #C56343;
}

.payment-option-icon {
    font-size: 2em;
    flex-shrink: 0;
}

.payment-option-text {
    flex: 1;
}

.payment-option-title {
    font-weight: 600;
    font-size: 1.05em;
    color: #333;
    margin-bottom: 4px;
}

.payment-option-desc {
    font-size: 0.9em;
    color: #666;
}

.payment-option-arrow {
    font-size: 1.5em;
    color: #C56343;
    flex-shrink: 0;
}

.invite-divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.invite-divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: #e0e0e0;
}

.invite-divider span {
    background: white;
    padding: 0 15px;
    color: #999;
    font-size: 0.9em;
    position: relative;
    z-index: 1;
}

.invite-code-inline {
    margin-top: 15px;
}

.invite-code-input-wrapper {
    display: flex;
    gap: 10px;
}

.invite-code-input-inline {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.invite-code-input-inline:focus {
    outline: none;
    border-color: #D97757;
}

.invite-code-submit-inline {
    padding: 12px 25px;
    background: linear-gradient(135deg, #D97757 0%, #C56343 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.invite-code-submit-inline:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(217, 119, 87, 0.4);
}

.invite-code-message-inline {
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.9em;
    display: none;
}

.invite-code-message-inline.success {
    display: block;
    background: #e8f5e9;
    color: #388e3c;
}

.invite-code-message-inline.error {
    display: block;
    background: #ffebee;
    color: #d32f2f;
}
