/* 整体信纸风格：淡黄色网格背景 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "微软雅黑", SimHei, sans-serif;
}

body {
    background-color: #fff9e6; /* 淡黄底色 */
    background-image: 
        linear-gradient(#e8dcb8 1px, transparent 1px),
        linear-gradient(90deg, #e8dcb8 1px, transparent 1px);
    background-size: 25px 25px; /* 网格大小 */
    min-height: 100vh;
    padding: 20px;
}

/* 容器布局：左日历 右日记 */
.main-container {
    display: flex;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255,252,235,0.92);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(139,117,79,0.2);
    /* 入场动效 */
    animation: fadeIn 0.8s ease;
}

/* 动画定义 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes hoverUp {
    0% { transform: translateY(0); }
    100% { transform: translateY(-4px); }
}

/* 左侧日历区域 */
.calendar-box {
    width: 380px;
    flex-shrink: 0;
    background: #fffef0;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px #d9cba9;
    animation: scaleIn 0.6s ease;
}
.calendar-title {
    text-align: center;
    font-size: 20px;
    color: #8c6d31;
    margin-bottom: 15px;
    font-weight: bold;
}
.calendar-nav {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}
.calendar-nav button {
    border: none;
    background: #f0e2bc;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    color: #6b5427;
    transition: all 0.3s ease;
}
.calendar-nav button:hover {
    background: #e8d4a0;
    animation: hoverUp 0.3s ease forwards;
}
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}
.calendar-day {
    text-align: center;
    padding: 10px 0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #5a4622;
}
.calendar-day:hover {
    background: #f3e4b8;
    animation: hoverUp 0.2s ease forwards;
}
.calendar-day.active {
    background: #d4b97c;
    color: #fff;
    font-weight: bold;
}
.calendar-day.empty {
    background: transparent;
    cursor: default;
}

/* 右侧日记内容区 */
.diary-box {
    flex: 1;
    background: #fffef0;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 8px #d9cba9;
    animation: scaleIn 0.6s ease 0.2s both;
}
.diary-date {
    font-size: 22px;
    color: #8c6d31;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #d9cba9;
}
.mood-item, .content-item {
    margin: 18px 0;
}
.mood-title, .content-title {
    font-size: 16px;
    color: #70592c;
    margin-bottom: 8px;
}
.mood-text, .diary-text {
    padding: 15px;
    background: rgba(255,255,255,0.6);
    border-radius: 8px;
    min-height: 80px;
    line-height: 1.8;
    color: #443318;
}
.no-data {
    color: #b8a278;
    font-style: italic;
}

/* 登录/后台按钮 */
.top-btn {
    text-align: right;
    margin-bottom: 15px;
}
.top-btn a {
    display: inline-block;
    padding: 8px 18px;
    background: #d4b97c;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
}
.top-btn a:hover {
    background: #c2a364;
    animation: hoverUp 0.3s ease forwards;
}

/* 表单样式（登录/后台/安装页） */
.form-box {
    max-width: 500px;
    margin: 50px auto;
    background: #fffef0;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 3px 12px #d9cba9;
    animation: fadeIn 0.7s ease;
}
.form-box h2 {
    text-align: center;
    color: #8c6d31;
    margin-bottom: 25px;
}
.form-item {
    margin: 15px 0;
}
.form-item label {
    display: block;
    color: #70592c;
    margin-bottom: 6px;
}
.form-item input, .form-item textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #e0cd9f;
    border-radius: 6px;
    background: #fffdf2;
    outline: none;
    transition: border 0.3s ease;
}
.form-item input:focus, .form-item textarea:focus {
    border-color: #d4b97c;
}
.submit-btn {
    width: 100%;
    padding: 12px;
    border: none;
    background: #d4b97c;
    color: #fff;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}
.submit-btn:hover {
    background: #c2a364;
    animation: hoverUp 0.3s ease forwards;
}

/* 提示信息 */
.tips {
    text-align: center;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
}
.success {
    background: #e6f4e6;
    color: #2a722a;
}
.error {
    background: #fde8e8;
    color: #a83232;
}
