/* 亮色扁平风格 - MC部落x樱雨主题 */
:root {
    /* 主色调 - 樱雨粉系 */
    --sakura-pink: #FFB7C5;
    --sakura-deep: #FF9AA2;
    --sakura-light: #FFE4E9;

    /* 辅助色 - 游戏科技蓝 */
    --mc-blue: #3498DB;
    --mc-green: #2ECC71;
    --mc-yellow: #F1C40F;
    --mc-red: #E74C3C;

    /* 中性色 - 扁平化 */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8F9FF;
    --bg-card: #FFFFFF;
    --border: #E2E8F0;
    --text-primary: #2D3748;
    --text-secondary: #4A5568;
    --text-muted: #718096;

    /* 布局 */
    --radius: 8px;
    --spacing: 1rem;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部 - 扁平风格 */
.header {
    background: var(--bg-primary);
    border-bottom: 4px solid var(--sakura-pink);
    padding: 30px 0;
    margin-bottom: 40px;
    position: relative;
}

.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: repeating-linear-gradient(
        90deg,
        var(--sakura-pink) 0px,
        var(--sakura-pink) 10px,
        var(--mc-blue) 10px,
        var(--mc-blue) 20px,
        var(--mc-green) 20px,
        var(--mc-green) 30px,
        var(--mc-yellow) 30px,
        var(--mc-yellow) 40px
    );
}

.header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--sakura-deep);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.header .subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* 卡片 - 扁平纯白 */
.card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 30px;
    transition: var(--transition);
}

.card:hover {
    border-color: var(--sakura-pink);
    box-shadow: 0 4px 12px rgba(255, 183, 197, 0.1);
}

.card h2 {
    color: var(--sakura-deep);
    margin-bottom: 24px;
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 2px dashed var(--sakura-light);
}

/* 上传区域 - 扁平设计 */
.drop-zone {
    border: 3px dashed var(--sakura-pink);
    border-radius: var(--radius);
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    background: var(--sakura-light);
    transition: var(--transition);
    position: relative;
}

.drop-zone:hover {
    border-color: var(--sakura-deep);
    background: #FFE4E9;
}

.drop-zone.dragover {
    border-color: var(--mc-green);
    background: var(--sakura-light);
    transform: scale(1.01);
}

.dz-text {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
}

.btn-link {
    background: var(--sakura-pink);
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.btn-link:hover {
    background: var(--sakura-deep);
    transform: none;
}

.dz-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 8px;
}

/* 文件列表 - 扁平简洁 */
.file-list {
    margin-top: 24px;
}

.file-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 2px solid var(--border);
    margin-bottom: 12px;
}

.file-count {
    font-weight: 600;
    color: var(--sakura-deep);
}

.clear-all-btn {
    background: var(--mc-red);
    color: white;
    border: none;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: var(--transition);
}

.clear-all-btn:hover {
    background: #c0392b;
}

.file-items-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    border-left: 4px solid var(--sakura-pink);
    transition: var(--transition);
}

.file-item:hover {
    background: var(--sakura-light);
    transform: translateX(4px);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.file-icon {
    font-size: 1.2rem;
}

.file-name {
    font-family: 'Consolas', monospace;
    font-size: 0.9rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}

.file-size {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-right: 8px;
}

.file-remove {
    background: var(--text-muted);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.file-remove:hover {
    background: var(--mc-red);
    transform: rotate(90deg);
}

.file-list-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 20px;
    font-style: italic;
}

/* 配置网格 */
.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-select {
    padding: 12px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23FFB7C5' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

.form-select:focus {
    outline: none;
    border-color: var(--sakura-pink);
}

/* 按钮 - 扁平纯色 */
.btn {
    border: none;
    padding: 14px 28px;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: var(--sakura-pink);
    color: white;
}

.btn-primary:hover {
    background: var(--sakura-deep);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-success {
    background: var(--mc-green);
    color: white;
}

.btn-success:hover {
    background: #27AE60;
}

.btn-info {
    background: var(--mc-blue);
    color: white;
}

.btn-info:hover {
    background: #2980B9;
}

/* 按钮加载状态 */
.loading {
    position: relative;
    pointer-events: none;
    color: transparent !important;
}

.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.8s linear infinite;
}

@keyframes spinner {
    to { transform: rotate(360deg); }
}

/* 进度条 - 扁平设计 */
.progress-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
}

.progress-bar {
    flex: 1;
    height: 12px;
    background: var(--bg-primary);
    border: 2px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--sakura-pink);
    transition: width 0.4s ease;
}

.progress-percent {
    font-weight: 700;
    min-width: 40px;
    color: var(--sakura-deep);
}

.progress-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-icon {
    font-size: 1.1rem;
}

/* 日志输出 - 扁平深色 */
.log-output {
    max-height: 350px;
    overflow-y: auto;
    background: #1A202C;
    color: #E2E8F0;
    padding: 20px;
    border-radius: var(--radius);
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.85rem;
    margin-top: 20px;
    border: 2px solid var(--border);
}

.log-output div {
    margin-bottom: 6px;
    padding: 4px 0;
}

.log-info {
    color: #63B3ED;
}

.log-success {
    color: #68D391;
}

.log-warning {
    color: #F6AD55;
}

.log-error {
    color: #FC8181;
    font-weight: 600;
}

/* 结果区域 */
.result-info {
    padding: 20px;
    background: var(--bg-secondary);
    border: 2px solid var(--sakura-pink);
    border-radius: var(--radius);
    margin-bottom: 24px;
}

.result-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border);
}

.result-info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: var(--sakura-deep);
    font-size: 0.9rem;
}

.info-value {
    font-family: 'Consolas', monospace;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
}

.info-value.file-name {
    max-width: 60%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* 通知 - 扁平纯色 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: var(--radius);
    color: white;
    font-weight: 600;
    z-index: 1000;
    transform: translateX(400px);
    transition: var(--transition);
    max-width: 350px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    background: var(--mc-green);
}

.notification-error {
    background: var(--mc-red);
}

.notification-warning {
    background: var(--mc-yellow);
    color: var(--text-primary);
}

.notification-info {
    background: var(--mc-blue);
}

/* 页脚 - 扁平简洁 */
.footer {
    background: var(--bg-primary);
    border-top: 3px solid var(--sakura-pink);
    color: var(--text-secondary);
    padding: 30px 0;
    margin-top: 60px;
    text-align: center;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-links {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer a {
    color: var(--sakura-deep);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer a:hover {
    color: var(--mc-blue);
    text-decoration: underline;
}

.footer-info {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-top: 10px;
}

/* 备案信息 */
.beian-info {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed var(--border);
}

.beian-info a {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
}

.beian-info a:hover {
    color: var(--sakura-deep);
}

/* 隐藏类 */
.hidden {
    display: none !important;
}

/* 动画 - 简洁 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    animation: fadeIn 0.3s ease-out;
}

/* 响应式 */
@media (max-width: 768px) {
    .header {
        padding: 20px 0;
    }

    .header h1 {
        font-size: 1.8rem;
    }

    .card {
        padding: 20px;
    }

    .config-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .result-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .progress-container {
        flex-wrap: wrap;
    }

    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100px);
    }

    .notification.show {
        transform: translateY(0);
    }

    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
}

/* 滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--sakura-pink);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--sakura-deep);
}