* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: #333;
}

/* 导航栏 */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

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

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-brand i {
    font-size: 1.8rem;
}

.nav-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: #667eea;
}

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

.nav-menu a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #667eea;
}

/* 主内容 */
.main-content {
    padding-top: 80px;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 4rem 2rem;
    text-align: center;
    color: white;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
}

.hero-content p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* 翻译卡片 */
.translation-section {
    padding: 3rem 0;
}

.translation-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

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

.input-wrapper {
    position: relative;
}

.input-wrapper textarea {
    width: 100%;
    padding: 1.2rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1.1rem;
    resize: vertical;
    transition: border-color 0.3s;
    font-family: inherit;
}

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

.input-actions {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.3s;
    color: #667eea;
    font-size: 1.2rem;
}

.btn-icon:hover {
    background: #f0f0f0;
}

.translate-btn-wrapper {
    text-align: center;
    margin: 1.5rem 0;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

.output-group {
    margin-top: 1.5rem;
}

.output-wrapper {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #555;
}

.output-actions {
    display: flex;
    gap: 0.5rem;
}

.output-text {
    font-size: 1.3rem;
    line-height: 1.6;
    min-height: 60px;
}

.error-message {
    color: #e74c3c;
    padding: 1rem;
    text-align: center;
}

/* 例句区域 */
.examples-section,
.synonyms-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.examples-section h3,
.synonyms-section h3 {
    margin-bottom: 1rem;
    color: #555;
}

.examples-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.example-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.synonyms-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.synonym-tag {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* 历史记录 */
.history-section {
    padding: 3rem 0;
    background: white;
}

.history-section h2 {
    margin-bottom: 2rem;
    color: #333;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
    transition: transform 0.3s;
}

.history-item:hover {
    transform: translateX(5px);
}

.history-input,
.history-output {
    flex: 1;
    font-weight: 500;
}

.history-arrow {
    color: #667eea;
}

.history-time {
    color: #999;
    font-size: 0.9rem;
}

.no-history {
    text-align: center;
    color: #999;
    padding: 2rem;
}

/* 功能亮点 */
.features-section {
    padding: 4rem 0;
    background: #f8f9fa;
}

.features-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

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

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

.feature-card i {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: #666;
}

/* 页脚 */
.footer {
    background: #333;
    color: white;
    padding: 2rem;
    text-align: center;
}

.footer-links {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

/* 内页样式 */
.page-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 4rem 2rem;
    text-align: center;
    color: white;
}

.page-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.about-content,
.features-detail,
.contact-section {
    padding: 4rem 0;
}

.about-card,
.feature-detail-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.about-card h2,
.feature-detail-card h3 {
    margin-bottom: 1rem;
    color: #667eea;
}

.about-card ul {
    list-style: none;
}

.about-card ul li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.about-card ul li i {
    color: #2ecc71;
}

.feature-detail-card i {
    font-size: 2rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.contact-card {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info h2 {
    margin-bottom: 1.5rem;
    color: #667eea;
}

.contact-info p {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-info i {
    color: #667eea;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

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

/* 滚动动画 */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

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

/* 响应式 */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu a {
        padding: 0.8rem 0;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .translation-card {
        padding: 1.5rem;
    }
    
    .contact-card {
        grid-template-columns: 1fr;
    }
    
    .history-item {
        flex-direction: column;
        text-align: center;
    }
    
    .history-arrow {
        transform: rotate(90deg);
    }
}