
:root {
    --primary: #1a365d;
    --secondary: #d4af37;
    --accent: #e63946;
    --light: #f8f9fa;
    --dark: #212529;
    --gray: #6c757d;
    --success: #28a745;
    --warning: #ffc107;
    --info: #17a2b8;
    --border-radius: 12px;
    --shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
    color: var(--dark);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.lang-option a {
    text-decoration: none !important;
    color: #ffffff !important;
}

/* 头部样式 */
header {
    background: linear-gradient(to right, var(--primary), #0d253f);
    color: white;
    padding: 15px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo img {
    height: 50px;
    width: auto;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--secondary), #ffd700);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.language-selector {
    position: relative;
}

.language-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 15px;
    border-radius: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.language-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.languages-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background:  steelblue;
    width: 200px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    padding: 10px;
    display: none;
    z-index: 10;
}

.languages-dropdown.show {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.lang-option {
    padding: 8px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.lang-option:hover {
    background-color: #f0f0f0;
}

.lang-option.active {
    background: var(--primary);
    color: white;
}

nav ul {
    display: flex;
    list-style: none;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

nav a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 0;
    position: relative;
    transition: var(--transition);
}

nav a:hover, nav a.active {
    color: white;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: width 0.3s;
}

nav a:hover::after, nav a.active::after {
    width: 100%;
}

/* 主内容区 */
.main-content {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 25px;
    padding: 30px 0;
}

/* 侧边栏 */
.sidebar {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 25px;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.sidebar h2 {
    color: var(--primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--secondary);
    font-size: 1.4rem;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 12px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 8px;
    color: var(--dark);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.sidebar-menu a:hover, .sidebar-menu a.active {
    background: linear-gradient(to right, var(--primary), #2a4a7a);
    color: white;
}

.sidebar-menu i {
    width: 20px;
    text-align: center;
}

/* 内容区 */
.content {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 30px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.content-header h2 {
    color: var(--primary);
    font-size: 1.8rem;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eaeaea;
}

.section-title i {
    color: var(--secondary);
    font-size: 1.5rem;
}

/* 范文部分 */
.example-categories {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 8px 20px;
    background: #e9ecef;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.category-btn.active, .category-btn:hover {
    background: var(--primary);
    color: white;
}

.example-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.example-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    border: 1px solid #eaeaea;
}

.example-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.example-header {
    background: linear-gradient(to right, var(--primary), #2a4a7a);
    color: white;
    padding: 15px 20px;
}

.example-body {
    padding: 20px;
}

.example-text {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 15px;
    color: #444;
}

.example-translation {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid var(--secondary);
    font-style: italic;
    color: #555;
}

.example-footer {
    padding: 15px 20px;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--gray);
}

.save-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
}

.save-btn:hover {
    color: var(--accent);
}

.save-btn.saved {
    color: var(--accent);
}

.save-btn.saved i::before {
    content: "\f005";
}

/* 例句部分 */
.sentence-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.sentence-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 20px;
    border-left: 4px solid var(--secondary);
    transition: var(--transition);
}

.sentence-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.sentence-card h4 {
    color: var(--primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sentence-card h4 i {
    color: var(--secondary);
}

.sentence-card p {
    color: var(--dark);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.sentence-translation {
    color: var(--gray);
    font-style: italic;
    padding-top: 10px;
    border-top: 1px dashed #eee;
}

.sentence-info {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    color: var(--gray);
    font-size: 0.9rem;
}

/* 搜索和筛选 */
.search-filter {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

.filter-select {
    min-width: 200px;
}

.filter-select select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
}

/* 页脚 */
footer {
    background: var(--primary);
    color: white;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--secondary);
}

.footer-section p {
    margin-bottom: 15px;
    line-height: 1.6;
    opacity: 0.85;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--secondary);
    transform: translateY(-3px);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links a:hover {
    color: var(--secondary);
    padding-left: 5px;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    opacity: 0.7;
}

.wechat-qr {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
}

.qr-code {
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, #25d366, #128c7e);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    nav ul {
        gap: 15px;
        flex-wrap: wrap;
    }

    .header-top {
        flex-direction: column;
        gap: 15px;
    }

    .example-cards, .sentence-grid {
        grid-template-columns: 1fr;
    }

    .search-filter {
        flex-direction: column;
    }
}

