/* 页面标题区域样式 - 与about-jianjie.html保持一致 */
.page-hero {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
    padding: 50px 20px;
    position: relative;
    overflow: hidden;
}

.page-hero-bg {
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.page-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.page-hero-content {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.page-title {
    font-size: 36px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.page-desc {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.8);
}

/* 页面容器 */
.cp-wrapper {
    min-height: calc(100vh - 300px);
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 40px 20px;
}

.cp-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* 卡片样式 */
.cp-card {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.cp-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.cp-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
}

.cp-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: linear-gradient(135deg, #7c3aed 0%, #00d4ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.cp-card-title {
    font-size: 22px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 6px 0;
}

.cp-card-subtitle {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

/* 语言选择器头部 */
.aifanyi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.aifanyi-language-selector {
    display: flex;
    align-items: center;
    gap: 12px;
}

.aifanyi-language-select {
    padding: 12px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    color: #334155;
    background: #fff;
    cursor: pointer;
    min-width: 180px;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

.aifanyi-language-select:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.aifanyi-swap-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #7c3aed 0%, #00d4ff 100%);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 18px;
}

.aifanyi-swap-btn:hover {
    transform: rotate(180deg);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.aifanyi-action-btn {
    padding: 12px 20px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #64748b;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.aifanyi-action-btn:hover {
    background: #e2e8f0;
    color: #334155;
}

.aifanyi-clear-btn {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    color: #fff;
    font-weight: 500;
}

.aifanyi-clear-btn:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

/* 翻译主区域 */
.aifanyi-main {
    display: flex;
    gap: 20px;
    align-items: stretch;
}

.aifanyi-input-section,
.aifanyi-output-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.aifanyi-textarea {
    flex: 1;
    min-height: 200px;
    padding: 20px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    font-size: 15px;
    line-height: 1.6;
    color: #334155;
    resize: none;
    transition: all 0.3s ease;
    font-family: inherit;
}

.aifanyi-textarea:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.aifanyi-textarea::placeholder {
    color: #94a3b8;
}

.aifanyi-textarea:read-only {
    background: #f8fafc;
}

.aifanyi-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 10px;
}

.aifanyi-footer span {
    font-size: 13px;
    color: #64748b;
}

.aifanyi-actions {
    display: flex;
    gap: 8px;
}

.aifanyi-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    color: #94a3b8;
}

.aifanyi-arrow svg {
    width: 24px;
    height: 24px;
}

/* 文件上传区域 */
.aifanyi-upload-area {
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 30px;
    background: #fafafa;
}

.aifanyi-upload-area:hover {
    border-color: #7c3aed;
    background: rgba(124, 58, 237, 0.05);
}

.aifanyi-upload-area.dragover {
    border-color: #7c3aed;
    background: rgba(124, 58, 237, 0.1);
    transform: scale(1.01);
}

.aifanyi-upload-content p {
    margin: 10px 0;
    color: #475569;
    font-size: 15px;
}

.aifanyi-upload-hint {
    color: #94a3b8 !important;
    font-size: 13px !important;
}

.aifanyi-upload-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 15px;
    border-radius: 16px;
    background: linear-gradient(135deg, #7c3aed 0%, #00d4ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

/* 文件类型图标 */
.aifanyi-file-icons {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 25px;
}

.aifanyi-file-icon {
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.aifanyi-file-icon:hover {
    transform: translateY(-5px);
}

.aifanyi-icon-word,
.aifanyi-icon-excel,
.aifanyi-icon-ppt,
.aifanyi-icon-pdf {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    color: #fff;
    transition: all 0.3s ease;
}

.aifanyi-icon-word {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.aifanyi-icon-excel {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
}

.aifanyi-icon-ppt {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
}

.aifanyi-icon-pdf {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.aifanyi-file-icon span {
    color: #64748b;
    font-size: 13px;
}

/* 文件列表 */
.aifanyi-file-list {
    margin-bottom: 30px;
}

.aifanyi-file-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.aifanyi-file-list-title {
    font-weight: 600;
    color: #1e293b;
    font-size: 16px;
}

.aifanyi-file-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.aifanyi-file-table th,
.aifanyi-file-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
}

.aifanyi-file-table th {
    background: #f8fafc;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 12px;
}

.aifanyi-file-table tbody tr:hover {
    background: #fafafa;
}

.aifanyi-file-table tbody tr:last-child td {
    border-bottom: none;
}

.aifanyi-file-remove {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.aifanyi-file-remove:hover {
    background: #fef2f2;
}

/* 翻译设置 */
.aifanyi-translate-settings {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 25px;
    border-top: 1px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 20px;
}

.aifanyi-translate-language {
    display: flex;
    align-items: center;
    gap: 12px;
}

.aifanyi-arrow-icon {
    color: #94a3b8;
    font-size: 18px;
    font-weight: bold;
}

.aifanyi-translate-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.user-score-info {
    font-size: 14px;
    color: #64748b;
}

.user-score {
    color: #7c3aed;
    font-weight: 600;
    font-size: 16px;
}

.aifanyi-translate-btn {
    background: linear-gradient(135deg, #7c3aed 0%, #00d4ff 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.aifanyi-translate-btn:hover:not(:disabled) {
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
    transform: translateY(-2px);
}

.aifanyi-translate-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
}

.aifanyi-translate-btn-secondary {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

.aifanyi-get-result {
    display: flex;
    align-items: center;
    gap: 12px;
}

.aifanyi-login-prompt {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #fff3e0;
    border-radius: 10px;
    color: #ea580c;
    font-weight: 500;
}

/* 功能说明 */
.aifanyi-function-description {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
}

.aifanyi-guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.aifanyi-guide-card {
    background: #fff;
    padding: 24px;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.aifanyi-guide-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.aifanyi-guide-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #7c3aed 0%, #00d4ff 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 12px;
}

.aifanyi-guide-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 8px 0;
}

.aifanyi-guide-card p {
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

.aifanyi-notice {
    display: flex;
    gap: 12px;
    padding: 20px;
    background: #fef3c7;
    border-radius: 12px;
    border-left: 4px solid #f59e0b;
    color: #92400e;
}

.aifanyi-notice svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.aifanyi-notice strong {
    color: #b45309;
}

.aifanyi-notice p {
    margin: 4px 0 0 0;
    font-size: 14px;
    line-height: 1.5;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .aifanyi-main {
        flex-direction: column;
    }

    .aifanyi-arrow {
        padding: 15px 0;
        transform: rotate(90deg);
    }

    .aifanyi-header {
        flex-direction: column;
        align-items: stretch;
    }

    .aifanyi-language-selector {
        justify-content: center;
    }

    .aifanyi-translate-settings {
        flex-direction: column;
        align-items: stretch;
    }

    .aifanyi-translate-buttons {
        justify-content: center;
    }

    .aifanyi-file-icons {
        flex-wrap: wrap;
        gap: 20px;
    }

    .aifanyi-file-table {
        display: block;
        overflow-x: auto;
    }

    .cp-card {
        padding: 20px;
    }

    .page-title {
        font-size: 28px;
    }
}

/* Toast 提示样式 */
.aifanyi-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #1e293b;
    color: #fff;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 14px;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* 加载状态 */
.aifanyi-loading {
    color: #7c3aed !important;
}

/* 状态标签样式 */
.aifanyi-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-pending {
    background: #f1f5f9;
    color: #64748b;
}

.status-uploading {
    background: #dbeafe;
    color: #2563eb;
}

.status-processing {
    background: #fef3c7;
    color: #d97706;
    animation: pulse 1.5s infinite;
}

.status-success {
    background: #dcfce7;
    color: #16a34a;
}

.status-error {
    background: #fee2e2;
    color: #dc2626;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 下载链接样式 */
.aifanyi-download {
    color: #7c3aed;
    text-decoration: none;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 6px;
    background: rgba(124, 58, 237, 0.1);
    transition: all 0.2s ease;
}

.aifanyi-download:hover {
    background: #7c3aed;
    color: #fff;
}