/* 反义词页面样式 */
:root {
    --primary-color: #5a6268;
    --secondary-color: #adb5bd;
    --accent-color: #343a40;
    --light-bg: #f8f9fa;
    --dark-bg: #343a40;
    --text-color: #333;
    --light-text: #f8f9fa;
    --border-color: #adb5bd;
    --shadow-color: rgba(90, 98, 104, 0.2);
    --contrast-color: #dc3545;
}

/* 整体页面样式 */
body {
    background-color: var(--light-bg);
    color: var(--text-color);
    font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
    line-height: 1.6;
}

/* 头部搜索区域样式 */
.search-container {
    background: linear-gradient(135deg, var(--primary-color), var(--dark-bg));
    padding: 30px 0;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px var(--shadow-color);
}

.search-box {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 0 auto;
}

.search-box h2 {
    color: var(--primary-color);
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 15px;
    text-align: center;
    font-weight: bold;
}

.search-form {
    display: flex;
    margin-bottom: 10px;
}

.search-form input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px 0 0 4px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(90, 98, 104, 0.2);
}

.search-form button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-form button:hover {
    background-color: var(--accent-color);
}

.search-tips {
    text-align: center;
    font-size: 14px;
    color: #666;
}

/* 主内容区域样式 */
.main-content {
    padding: 20px 0 40px;
}

.section-header {
    margin-bottom: 20px;
}

.section-header h2 {
    color: var(--primary-color);
    font-size: 24px;
    margin-bottom: 5px;
    position: relative;
    padding-bottom: 10px;
}

.section-header h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--contrast-color);
}

.section-header p {
    color: #666;
    margin: 0;
}

/* 介绍部分样式 */
.intro-section {
    background-color: white;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 3px 10px var(--shadow-color);
    border-left: 4px solid var(--primary-color);
}

.intro-section p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.intro-section p:last-child {
    margin-bottom: 0;
}

/* 热门反义词样式 */
.popular-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.popular-items a {
    background-color: white;
    color: var(--primary-color);
    padding: 10px 15px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 15px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    text-align: center;
    box-shadow: 0 2px 5px var(--shadow-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.popular-items a:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px var(--shadow-color);
}

/* 拼音导航样式 */
.pinyin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px var(--shadow-color);
}

.pinyin-nav a {
    display: inline-block;
    width: 36px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    background-color: var(--light-bg);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.pinyin-nav a:hover {
    background-color: var(--primary-color);
    color: white;
}

.pinyin-group {
    margin-bottom: 30px;
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 3px 10px var(--shadow-color);
}

.pinyin-group h3 {
    color: var(--primary-color);
    font-size: 22px;
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.dictionary-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.dictionary-list a {
    color: var(--text-color);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
    background-color: var(--light-bg);
}

.dictionary-list a:hover {
    background-color: var(--secondary-color);
    color: var(--dark-bg);
}

/* 反义词详情页样式 */
.antonym-detail {
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 3px 15px var(--shadow-color);
}

.antonym-header {
    margin-bottom: 25px;
    text-align: center;
}

.antonym-title {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.antonym-title .word-separator {
    margin: 0 15px;
    color: var(--contrast-color);
    font-size: 24px;
}

.antonym-pinyin {
    color: #666;
    font-size: 16px;
    margin-bottom: 5px;
}

.antonym-explanation {
    margin-bottom: 30px;
}

.antonym-explanation h3 {
    color: var(--primary-color);
    font-size: 20px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-color);
}

.explanation-content {
    line-height: 1.8;
}

.word-meaning {
    margin-bottom: 20px;
    padding: 15px;
    background-color: var(--light-bg);
    border-radius: 6px;
}

.word-meaning h4 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
}

.word-meaning p {
    margin: 0;
}

.example-sentences {
    margin-top: 30px;
}

.example-sentences h3 {
    color: var(--primary-color);
    font-size: 20px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-color);
}

.sentence-item {
    margin-bottom: 15px;
    padding-left: 20px;
    position: relative;
}

.sentence-item::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--contrast-color);
    font-size: 20px;
    line-height: 1;
}

/* 相关反义词样式 */
.related-antonyms {
    margin-top: 30px;
}

.related-antonyms h3 {
    color: var(--primary-color);
    font-size: 20px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-color);
}

.related-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.related-list a {
    background-color: var(--light-bg);
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.related-list a:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 反义词对比卡片 */
.comparison-card {
    display: flex;
    margin: 30px 0;
    box-shadow: 0 4px 15px var(--shadow-color);
    border-radius: 8px;
    overflow: hidden;
}

.word-card {
    flex: 1;
    padding: 20px;
    text-align: center;
}

.word-card.left {
    background-color: var(--light-bg);
    color: var(--primary-color);
}

.word-card.right {
    background-color: var(--primary-color);
    color: white;
}

.word-card h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.word-card p {
    font-size: 15px;
    margin: 0;
}

.vs-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    background-color: var(--contrast-color);
    color: white;
    font-weight: bold;
    font-size: 18px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .popular-items {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .dictionary-list {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .comparison-card {
        flex-direction: column;
    }
    
    .vs-divider {
        width: 100%;
        height: 40px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animated {
    animation: fadeIn 0.8s ease-out forwards;
}