/* css/main.css */
/* 包含所有页面共享的全局样式：:root, body, container, 按钮, 链接, 首页布局, 页脚等 */

:root {
    --primary-color: #007bff;
    --hover-color: #0056b3;
    --border-color: #ddd;
    --bg-light: #f9f9f9;
    --text-color: #333;
    --text-light: #555;
    --text-kana: #000;
    --kana-bg: #fff;
    --kana-hover-bg: #f4faff;
    --kana-border: #d0d7de;
    --correct-color: #28a745;
    --wrong-color: #dc3545;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #fdfdfd;
    color: var(--text-color);
}

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

h1 {
    color: #222;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

h3 {
    color: #444;
    margin-top: 2.5em;
    border-bottom: 1px solid #ccc;
    padding-bottom: 5px;
}

/* --- 首页/列表页的链接 --- */
nav.book-list, nav.lesson-nav {
    margin-bottom: 2em;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}
a:hover {
    color: var(--hover-color);
    text-decoration: underline;
}

.book-list {
    display: grid;
    gap: 15px;
}

/* 首页链接 (index.html) */
.book-link {
    display: block;
    background: var(--bg-light);
    padding: 20px 25px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: 500;
    transition: all 0.2s ease;
}
.book-link:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    text-decoration: none;
    transform: translateY(-2px);
}

/* --- 优化主页文案的样式 (index.html) --- */
#site-introduction {
    background: #fffbef;
    border: 1px solid #ffeeba;
    border-radius: 8px;
    padding: 25px 35px;
    margin-bottom: 2.5em;
}

#site-introduction h2 {
    margin-top: 0;
    color: #856404;
    text-align: center;
    border-bottom: none;
    font-size: 1.4em;
}

#site-introduction p,
#site-introduction ul {
    line-height: 1.7;
    color: #66512c;
    font-size: 1.05em;
    margin-top: 1em;
}

#site-introduction ul {
    padding-left: 25px;
    list-style-type: '✓ ';
}

/* --- 网站页脚 (所有页面共享) --- */
.site-footer {
    text-align: center;
    margin-top: 4em;
    padding-top: 2em;
    border-top: 1px solid #eee;
    font-size: 0.9em;
    color: #888;
}

.site-footer p {
    line-height: 1.6;
}

.site-footer a {
    color: #777;
    text-decoration: underline;
}

.site-footer a:hover {
    color: #333;
}

/* --- 全局按钮 (用于 Gojuon 页面) --- */
/* 保持在 main.css 因为按钮样式最好全局统一 */
.btn-primary, .btn-secondary, .btn-danger {
    font-size: 1.1em;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}
.btn-primary {
    background-color: var(--primary-color);
    color: white;
    width: 100%;
}
.btn-primary:hover {
    background-color: var(--hover-color);
}
.btn-secondary {
    background-color: #e9ecef;
    color: var(--text-color);
    margin-right: 10px;
}
.btn-secondary:hover {
    background-color: #d1d5da;
}
.btn-danger {
    background-color: var(--wrong-color);
    color: white;
}
.btn-danger:hover {
    background-color: #c82333;
}
