/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 650px;
    overflow: hidden;
}

/* 头部 */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 30px;
    text-align: center;
}

header h1 {
    font-size: 26px;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 14px;
    opacity: 0.9;
}

/* 主内容区 */
main {
    padding: 30px;
}

/* 选项区域 */
.options-area {
    background: #f8f9ff;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
}

.option-group {
    margin-bottom: 15px;
}

.option-group:last-child {
    margin-bottom: 0;
}

.option-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 文件类型选择器 */
.file-type-selector {
    display: flex;
    gap: 10px;
}

.type-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    color: #666;
}

.type-btn:hover {
    border-color: #667eea;
    background: #f0f2ff;
}

.type-btn.active {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.type-icon {
    font-size: 20px;
}

/* 翻译方向选择器 */
.translate-selector {
    display: flex;
    align-items: center;
    gap: 15px;
}

.select-wrapper {
    flex: 1;
}

.select-wrapper select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    color: #333;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
}

.select-wrapper select:focus {
    outline: none;
    border-color: #667eea;
}

.select-wrapper select:hover {
    border-color: #667eea;
}

.arrow-icon {
    font-size: 24px;
    color: #667eea;
    font-weight: bold;
}

/* 上传区域 */
.upload-area {
    border: 3px dashed #667eea;
    border-radius: 15px;
    padding: 50px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9ff;
}

.upload-area:hover {
    border-color: #764ba2;
    background: #f0f2ff;
    transform: scale(1.01);
}

.upload-area.drag-over {
    border-color: #764ba2;
    background: #e8eaff;
    transform: scale(1.01);
}

.upload-icon {
    font-size: 50px;
    margin-bottom: 15px;
}

.upload-content h2 {
    font-size: 18px;
    color: #333;
    margin-bottom: 8px;
}

.upload-content p {
    color: #666;
    font-size: 13px;
}

.format-hint {
    margin-top: 12px;
    padding: 6px 12px;
    background: #667eea;
    color: white;
    border-radius: 20px;
    display: inline-block;
    font-size: 12px;
}

/* 文件信息 */
.file-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9ff;
    border-radius: 10px;
    margin-bottom: 15px;
}

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

.file-icon {
    font-size: 22px;
}

.file-name span:last-child {
    font-weight: 500;
    color: #333;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

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

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

.btn-download {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    width: 100%;
    font-size: 16px;
    padding: 14px 30px;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(56, 239, 125, 0.4);
}

/* 操作区域 */
.action-area {
    margin-top: 15px;
}

/* 进度区域 */
.progress-area {
    margin-top: 25px;
}

.progress-bar-container {
    height: 10px;
    background: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 5px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    margin-top: 12px;
    color: #666;
    font-size: 13px;
}

/* 日志区域 */
.log-area {
    margin-top: 15px;
}

.log-area h3 {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.log-content {
    background: #1a1a2e;
    color: #00ff00;
    padding: 12px;
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    max-height: 120px;
    overflow-y: auto;
}

.log-item {
    padding: 2px 0;
}

/* 结果区域 */
.result-area {
    text-align: center;
    margin-top: 25px;
}

.success-message {
    margin-bottom: 25px;
}

.success-icon {
    font-size: 50px;
    display: block;
    margin-bottom: 12px;
}

.success-message h3 {
    color: #11998e;
    font-size: 22px;
    margin-bottom: 8px;
}

.success-message p {
    color: #666;
    font-size: 14px;
}

.warning-text {
    color: #e67e22 !important;
    margin-top: 8px;
    font-size: 13px !important;
}

.download-icon {
    margin-right: 8px;
}

/* 错误区域 */
.error-area {
    text-align: center;
    margin-top: 25px;
}

.error-message {
    margin-bottom: 15px;
}

.error-icon {
    font-size: 50px;
    display: block;
    margin-bottom: 12px;
}

.error-message h3 {
    color: #e74c3c;
    font-size: 22px;
    margin-bottom: 8px;
}

.error-message p {
    color: #666;
}

/* 页脚 */
footer {
    padding: 15px;
    text-align: center;
    color: #999;
    font-size: 11px;
    border-top: 1px solid #eee;
}

/* 响应式 */
@media (max-width: 480px) {
    .container {
        border-radius: 15px;
    }

    header {
        padding: 25px 20px;
    }

    header h1 {
        font-size: 22px;
    }

    main {
        padding: 20px;
    }

    .upload-area {
        padding: 35px 15px;
    }

    .file-info {
        flex-direction: column;
        gap: 12px;
    }

    .file-name {
        width: 100%;
    }

    .file-name span:last-child {
        max-width: 180px;
    }

    .translate-selector {
        flex-direction: column;
        gap: 10px;
    }

    .arrow-icon {
        transform: rotate(90deg);
    }

    .select-wrapper {
        width: 100%;
    }
}
