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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 导航栏样式 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-brand h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #ffd700;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #ffd700;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
    transition: 0.3s;
}

/* 主要内容区域 */
.main-content {
    flex: 1;
    margin-top: 80px;
}

.section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* 英雄区域样式 */
.hero {
    text-align: center;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border-radius: 20px;
    margin: 2rem auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.hero-content {
    padding: 3rem 2rem;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

/* 按钮样式 */
.btn {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

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

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

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #f5576c;
}

/* 批改功能样式 */
.correction-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tab-btn {
    padding: 0.8rem 2rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: transparent;
    color: white;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* 上传区域样式 */
.upload-area {
    margin: 2rem 0;
    position: relative;
}

.upload-box {
    border: 3px dashed rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
}

.upload-box:hover {
    border-color: white;
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.upload-box.dragover {
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.upload-text {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.upload-hint {
    font-size: 0.9rem;
    opacity: 0.8;
    margin: 0;
}

/* 上传方式说明 */
.upload-methods {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(5px);
}

.upload-method {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}

.method-icon {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* 粘贴提示 */
.paste-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background: rgba(102, 126, 234, 0.95);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    animation: fadeInScale 0.3s ease-out;
}

.paste-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.paste-icon {
    font-size: 3rem;
    animation: pulse 1s infinite;
}

.paste-text {
    font-size: 1.2rem;
    font-weight: 600;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

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

.image-preview {
    position: relative;
    margin: 1rem 0;
    display: inline-block;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.image-preview img {
    max-width: 100%;
    max-height: 400px;
    display: block;
}

.remove-image {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remove-image:hover {
    background: rgba(255, 0, 0, 1);
    transform: scale(1.1);
}

/* 多图片网格布局 */
.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.image-slot {
    position: relative;
    aspect-ratio: 4/3;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.image-slot:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}

.image-slot.has-image {
    border-color: rgba(255, 215, 0, 0.6);
}

.image-slot .image-preview {
    position: relative;
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 8px;
    box-shadow: none;
}

.image-slot .image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-slot .image-preview:hover img {
    transform: scale(1.05);
}

.image-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
}

/* 添加更多图片按钮 */
.add-more-btn {
    margin-top: 1rem;
    padding: 1rem;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-weight: 600;
}

.add-more-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* 批改控制按钮 */
.correction-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.btn {
    position: relative;
    overflow: hidden;
}

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

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

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

/* 结果显示区域 */
.result-area {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: slideInUp 0.5s ease-out;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eee;
}

.result-header h3 {
    margin: 0;
    color: #2d3748;
    font-size: 1.5rem;
}

.copy-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: #5a67d8;
    transform: translateY(-2px);
}

.result-content {
    line-height: 1.8;
    font-size: 1.1rem;
    color: #4a5568;
    white-space: pre-wrap;
    min-height: 100px;
    max-height: 500px;
    overflow-y: auto;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.result-status {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
}

.result-status.success {
    background: rgba(72, 187, 120, 0.1);
    color: #2f855a;
    border: 1px solid rgba(72, 187, 120, 0.3);
}

.result-status.error {
    background: rgba(245, 101, 101, 0.1);
    color: #c53030;
    border: 1px solid rgba(245, 101, 101, 0.3);
}

.result-status.processing {
    background: rgba(66, 153, 225, 0.1);
    color: #3182ce;
    border: 1px solid rgba(66, 153, 225, 0.3);
}

/* 多结果布局样式 */
.result-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* 批改进度条 */
.correction-progress {
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 10px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

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

.progress-text {
    text-align: center;
    font-size: 0.9rem;
    color: #4a5568;
    font-weight: 600;
}

/* 结果容器 */
.results-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.result-item {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 1.5rem;
    border: 2px solid rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
}

.result-item:hover {
    border-color: rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.result-item.processing {
    border-color: rgba(255, 193, 7, 0.6);
    background: rgba(255, 193, 7, 0.05);
}

.result-item.completed {
    border-color: rgba(72, 187, 120, 0.6);
    background: rgba(72, 187, 120, 0.05);
}

.result-item.error {
    border-color: rgba(245, 101, 101, 0.6);
    background: rgba(245, 101, 101, 0.05);
}

.result-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.result-item-header h4 {
    margin: 0;
    color: #2d3748;
    font-size: 1.2rem;
}

.copy-single-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.copy-single-btn:hover {
    background: #5a67d8;
    transform: translateY(-1px);
}

.result-item .result-content {
    margin: 0;
    max-height: 300px;
    font-size: 1rem;
}

.result-item .result-status {
    margin-top: 1rem;
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
    text-align: center;
}

/* 流式输出动画 */
.typing-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #667eea;
    animation: typing 1.4s infinite;
    margin-left: 4px;
}

.typing-indicator:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.3;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计更新 */
@media (max-width: 768px) {
    .correction-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .tab-btn {
        width: 200px;
    }
    
    .upload-box {
        padding: 2rem 1rem;
    }
    
    .upload-icon {
        font-size: 2rem;
    }
    
    .correction-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .result-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .result-content {
        font-size: 1rem;
    }
}

/* 状态消息 */
.status-message {
    padding: 1rem;
    border-radius: 10px;
    margin-top: 1rem;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.status-message.success {
    background-color: rgba(72, 187, 120, 0.2);
    color: #2f855a;
    border: 1px solid rgba(72, 187, 120, 0.3);
}

.status-message.error {
    background-color: rgba(245, 101, 101, 0.2);
    color: #c53030;
    border: 1px solid rgba(245, 101, 101, 0.3);
}

/* 内容区域样式 */
.content {
    padding: 2rem 0;
}

.content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-align: center;
    color: #2d3748;
}

.content p {
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 2rem;
    color: #4a5568;
}

/* 特性网格 */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #2d3748;
}

.feature-card p {
    color: #718096;
    margin-bottom: 0;
}

/* 服务列表 */
.service-list {
    list-style: none;
    max-width: 600px;
    margin: 0 auto;
}

.service-list li {
    background: white;
    padding: 1rem 2rem;
    margin-bottom: 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-left: 4px solid #667eea;
    font-size: 1.1rem;
}

/* 联系表单 */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2d3748;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

/* 页脚样式 */
.footer {
    background-color: #2d3748;
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: auto;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background-color: rgba(102, 126, 234, 0.95);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 1rem 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .section {
        padding: 2rem 1rem;
    }

    .navbar {
        padding: 1rem;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content {
    animation: fadeInUp 1s ease-out;
}

.feature-card {
    animation: fadeInUp 1s ease-out;
}

.feature-card:nth-child(2) {
    animation-delay: 0.2s;
}

.feature-card:nth-child(3) {
    animation-delay: 0.4s;
}
