:root {
    --primary-color: #4a90d9; /* 主题蓝 */
    --primary-light: #e3f2fd;
    --bg-color: #f0f2f5;
    --text-main: #333;
    --text-sub: #666;
    --card-bg: #ffffff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: "Microsoft YaHei", -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    padding: 10px;
}

.app-container {
    width: 100%;
    max-width: 700px;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    overflow: hidden;
    min-height: 90vh;
}

.view { display: none; padding: 20px; }
.view.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* 头部样式 */
.app-header { text-align: center; margin-bottom: 20px; }
.app-header h1 { font-size: 24px; color: var(--primary-color); margin-bottom: 5px; }
.app-header p { font-size: 14px; color: var(--text-sub); }

/* 日历样式 */
.calendar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.calendar-header button { background: var(--primary-light); color: var(--primary-color); border: none; padding: 8px 12px; border-radius: 8px; cursor: pointer; font-weight: bold; }
.calendar-header button:hover { background: #bbdefb; }

.weekdays { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-weight: bold; color: var(--text-sub); margin-bottom: 10px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }

.day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    border: 1px solid transparent;
    transition: all 0.2s;
}
.day:hover { background-color: #f5f5f5; }
.day.empty { cursor: default; }
.day.empty:hover { background: transparent; }

/* 有资料的日期样式 */
.day.has-data {
    background-color: var(--primary-light);
    color: var(--primary-color);
    font-weight: bold;
    border-color: #90caf9;
    position: relative;
}
.day.has-data::after {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
    position: absolute;
    bottom: 6px;
}

/* 详情页头部 */
.detail-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}
.btn-back {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 16px;
    cursor: pointer;
    font-weight: bold;
}

/* 详情内容排版 */
.text-container {
    line-height: 1.9;
    font-size: 16px;
    color: #333;
    padding: 0 5px;
}

.text-container h2 {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 15px;
    border-bottom: 1px dashed #ccc;
    padding-bottom: 5px;
}

.text-container ul {
    padding-left: 20px;
    margin-bottom: 20px;
}

.text-container li {
    margin-bottom: 12px;
}

.text-container b {
    color: #1a73e8; /* 重点单词变蓝 */
}

.text-container span[style*="color:red"] {
    font-weight: bold;
}