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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background: #f5f7fa;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部导航 */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: white;
    border-radius: 16px;
    margin: 1rem 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #10b981;
}

.logo i {
    font-size: 2rem;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: #10b981;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    background: #f0fdf4;
}

.user-actions {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-primary {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid #e5e7eb;
    color: #6b7280;
}

.btn-outline:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

/* 英雄区域 */
.hero {
    background: white;
    border-radius: 24px;
    padding: 3rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    text-align: center;
}

.hero-content {
    max-width: 600px;
    margin: 0 auto;
}

.hero-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: #1f2937;
}

.hero-description {
    font-size: 1rem;
    color: #6b7280;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.search-container {
    max-width: 500px;
    margin: 0 auto;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.search-icon {
    color: #9ca3af;
    margin: 0 1rem;
    font-size: 1.2rem;
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #1f2937;
    font-size: 1.1rem;
    padding: 1rem 0;
    outline: none;
}

.search-input::placeholder {
    color: #9ca3af;
}

.search-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

/* 浮动卡片动画 */
.floating-cards {
    position: relative;
    height: 350px;
}

.card {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    animation: float 3s ease-in-out infinite;
}

.card i {
    font-size: 2rem;
}

.floating-card-1 {
    top: 30px;
    left: 50px;
    animation-delay: 0s;
}

.floating-card-2 {
    top: 120px;
    right: 60px;
    animation-delay: 1s;
}

.floating-card-3 {
    bottom: 50px;
    left: 100px;
    animation-delay: 2s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* 结果区域 */
.results-section {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

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

.word-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
}

.pronunciation {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.phonetic {
    font-size: 1.1rem;
    color: #6b7280;
    font-style: italic;
}

.audio-btn {
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.audio-btn:hover {
    background: #e5e7eb;
    transform: scale(1.1);
}

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

.action-btn {
    background: #f3f4f6;
    border: none;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: #e5e7eb;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f3f4f6;
}

/* 网格布局 */
.translations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.phrases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.related-words-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.synonyms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.translation-item {
    background: #f8fafc;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    border-left: 3px solid #3b82f6;
    font-size: 0.9rem;
}

.phrase-item {
    background: #f8fafc;
    padding: 0.75rem;
    border-radius: 6px;
    border-left: 3px solid #10b981;
    font-size: 0.9rem;
}

.phrase-item .phrase-english {
    font-weight: 500;
    color: #1f2937;
}

.phrase-item .phrase-chinese {
    color: #6b7280;
    font-size: 0.85rem;
}

.related-word-item {
    background: #f8fafc;
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    border-left: 3px solid #f59e0b;
    font-size: 0.9rem;
}

.example-item {
    background: #f8fafc;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    border-left: 3px solid #8b5cf6;
    font-size: 0.9rem;
}

.example-item .example-english {
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.example-item .example-chinese {
    color: #6b7280;
    font-size: 0.85rem;
}

.synonym-item {
    background: #f8fafc;
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    border-left: 3px solid #ec4899;
    font-size: 0.9rem;
}

/* 功能特性 */
.features-section {
    padding: 4rem 0;
    text-align: center;
}

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

.feature-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 2rem;
    color: white;
    transition: transform 0.3s ease;
}

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

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

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

/* 功能卡片导航 */
.feature-cards-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin: 2rem 0;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.feature-card-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.feature-card-nav:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 1);
}

.feature-card-nav.active {
    background: #3b82f6;
    color: white;
    transform: translateY(-3px);
}

.feature-card-nav i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.feature-card-nav span {
    font-weight: 500;
    font-size: 1rem;
}

/* 英雄区域装饰 */
.hero-decoration {
    position: relative;
    height: 300px;
}

.feature-card p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 24px;
    color: #888;
}

.footer-bottom {
    margin-bottom: 8px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    font-size: 0.9rem;
}

.footer-links a {
    color: #10b981;
    text-decoration: none;
}

.footer-links span {
    color: #ccc;
}

/* 加载动画 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.loading-spinner {
    text-align: center;
    color: white;
}

.loading-spinner i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.loading-spinner p {
    font-size: 1.2rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .nav {
        gap: 1rem;
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
        padding: 2rem 0;
    }

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

    .floating-cards {
        height: 250px;
    }

    .card {
        padding: 1rem;
        position: static !important;
        margin: 0.5rem;
        animation: none;
    }

    .floating-cards {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    /* 功能卡片导航响应式 */
    .feature-cards-nav {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 0.5rem;
    }

    .feature-card-nav {
        padding: 1rem;
        flex-direction: row;
        justify-content: flex-start;
        gap: 1rem;
    }

    .feature-card-nav i {
        font-size: 1.5rem;
        margin-bottom: 0;
    }

    .feature-card-nav span {
        font-size: 0.9rem;
    }

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

    .features-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

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

    .search-input {
        font-size: 1rem;
    }

    .word-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}