/* style.css - 现代风格Excel翻译工具界面 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

body {
    background: #f0f2f5;
    padding: 2rem 1.5rem;
    color: #1e293b;
}

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

/* 头部 */
header {
    margin-bottom: 1.8rem;
}

header h1 {
    font-size: 1.9rem;
    font-weight: 600;
    background: linear-gradient(135deg, #0f2b3d, #1b4d6e);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    letter-spacing: -0.3px;
}

header p {
    color: #475569;
    margin-top: 0.4rem;
    font-size: 0.95rem;
}

/* 按钮组 */
.toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 1.5rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
}

.upload-area, .export-area {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.55rem 1.2rem;
    border-radius: 2rem;
    font-weight: 500;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #eef2ff;
    color: #1e40af;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.btn-primary {
    background: #1e3a8a;
    color: white;
}
.btn-primary:hover {
    background: #1e40af;
    transform: translateY(-1px);
}
.btn-secondary {
    background: #e2e8f0;
    color: #334155;
}
.btn-secondary:hover:not(:disabled) {
    background: #cbd5e1;
}
.btn-success {
    background: #15803d;
    color: white;
}
.btn-success:hover:not(:disabled) {
    background: #166534;
}
.btn-accent {
    background: #8b5cf6;
    color: white;
    box-shadow: 0 2px 5px rgba(139,92,246,0.2);
}
.btn-accent:hover:not(:disabled) {
    background: #7c3aed;
    transform: translateY(-1px);
}
.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.file-info {
    font-size: 0.85rem;
    background: #f1f5f9;
    padding: 0.3rem 0.9rem;
    border-radius: 2rem;
    color: #334155;
}

/* 预览卡片 */
.preview-card {
    background: white;
    border-radius: 1.25rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
    margin-bottom: 1.8rem;
    overflow: hidden;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 1rem 1.5rem;
    background: #fafcff;
    border-bottom: 1px solid #e9edf2;
    font-weight: 500;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.dimension-badge {
    background: #e6f0ff;
    padding: 0.25rem 0.7rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: normal;
    color: #1e3a8a;
}

.table-wrapper {
    overflow-x: auto;
    max-height: 380px;
    overflow-y: auto;
    border-radius: 0 0 1rem 1rem;
}

.preview-table-container {
    min-width: 600px;
}

.preview-table-container table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.preview-table-container th, .preview-table-container td {
    border: 1px solid #e2e8f0;
    padding: 0.6rem 0.8rem;
    text-align: left;
    background-color: white;
}

.preview-table-container th {
    background-color: #f8fafc;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.placeholder-text {
    padding: 3rem;
    text-align: center;
    color: #94a3b8;
}

/* 操作面板 */
.operation-panel {
    background: white;
    border-radius: 1.25rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
    overflow: hidden;
}

.operation-form {
    padding: 1.2rem 1.5rem 1rem;
    background: #ffffff;
    border-bottom: 1px solid #edf2f7;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    align-items: flex-end;
}

.form-group {
    flex: 1;
    min-width: 130px;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #4b5563;
    margin-bottom: 0.3rem;
}

.col-input, .lang-select {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border-radius: 0.8rem;
    border: 1px solid #cbd5e1;
    background: #fff;
    font-size: 0.85rem;
    transition: 0.2s;
}

.col-input:focus, .lang-select:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 2px rgba(139,92,246,0.2);
}

.action-group {
    flex: 0.8;
    min-width: 150px;
}

.action-group button {
    width: 100%;
}

small {
    display: block;
    font-size: 0.65rem;
    color: #6c757d;
    margin-top: 0.2rem;
}

/* 日志区域 */
.log-section {
    background: #fefefe;
    border-top: 1px solid #ecf3f9;
}

.log-header {
    font-weight: 600;
    padding: 0.8rem 1.5rem;
    background: #f9fbfd;
    font-size: 0.85rem;
    border-bottom: 1px solid #eef3fc;
    color: #0f172a;
}

.log-list {
    max-height: 200px;
    overflow-y: auto;
    padding: 0.6rem 1.2rem;
    background: #ffffff;
    font-size: 0.8rem;
}

.log-empty {
    color: #9aa9bb;
    text-align: center;
    padding: 0.8rem;
}

.log-item {
    padding: 0.5rem 0.7rem;
    margin: 0.3rem 0;
    background: #f8fafc;
    border-radius: 0.8rem;
    border-left: 3px solid #8b5cf6;
    font-family: monospace;
    font-size: 0.75rem;
    word-break: break-word;
}

.log-item.warning {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.progress-info {
    padding: 0.8rem 1.2rem;
    background: #eef2ff;
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 0.5rem;
    border-radius: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

/* 响应式 */
@media (max-width: 750px) {
    body {
        padding: 1rem;
    }
    .form-row {
        flex-direction: column;
        align-items: stretch;
    }
    .action-group button {
        margin-top: 0.5rem;
    }
    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }
}