/* static/style.css */
:root {
    --primary-color: #2563eb;       /* 现代蓝 */
    --primary-hover: #1d4ed8;
    --bg-color: #f8fafc;            /* 极淡的灰背景 */
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-sub: #64748b;
    --border-radius: 12px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* 导航栏 */
.navbar {
    background: var(--card-bg);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 搜索区域 Hero Section */
.hero {
    text-align: center;
    padding: 4rem 1rem;
    background: linear-gradient(to bottom, #eff6ff, var(--bg-color));
}
.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}
.hero p {
    color: var(--text-sub);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* 搜索框美化 */
.search-wrapper {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}
.search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}
.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}
.search-btn {
    position: absolute;
    right: 8px;
    top: 8px;
    bottom: 8px;
    padding: 0 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}
.search-btn:hover { background: var(--primary-hover); }

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

/* 卡片网格布局 */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* 卡片样式 */
.card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}
.card-tag {
    display: inline-block;
    background: #eff6ff;
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    margin-bottom: 0.75rem;
    width: fit-content;
}
.card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}
.card p {
    color: var(--text-sub);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}
.card-link {
    margin-top: auto;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
}
.card-link:hover { text-decoration: underline; }

/* 详情页样式 */
.detail-header {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
    text-align: center;
}
.detail-word {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}
.detail-phonetic {
    font-size: 1.2rem;
    color: var(--text-sub);
    font-family: monospace;
    background: #f1f5f9;
    padding: 0.2rem 0.8rem;
    border-radius: 6px;
    display: inline-block;
}
.audio-box {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px dashed #cbd5e1;
}
audio { width: 100%; outline: none; }

/* 页脚 */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-sub);
    font-size: 0.9rem;
    margin-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

/* 移动端适配 */
@media (max-width: 600px) {
    .hero h1 { font-size: 1.8rem; }
    .grid { grid-template-columns: 1fr; }
}

