   /*     body {
            margin: 0;
            padding: 20px;
            font-family: 'Microsoft YaHei', Arial, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
        }*/
/* ====================
 * 1. 全局通用样式 (Global styles)
 * ==================== 
* {
    box-sizing: border-box;
    /* 统一去除粗体，除非被特定选择器覆盖 
    font-weight: normal; 
}*/
/* ====================
 * 1. 全局样式 (实现黑色背景和全屏布局)
 * ====================*/
html {
    /* 确保 html/body 占满视口 */
    height: 100%;
}

/*body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f4f4f4;
} */
body {
    margin: 0;
    font-family: Arial, sans-serif;

    /* 设为黑色背景 */
    background: black; 
    /* 确保 body 占满视口 */
    height: 100%; 
    /* 允许页面内容滚动 (如果 #page-wrapper 不够高)*/ 
    overflow-y: auto; 
}
  /*    body {
            margin: 0;
            padding: 20px;
            font-family: 'Microsoft YaHei', Arial, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
        }*/
/* ====================
 * 2. 新包裹器 (实现白色、收窄、居中)
 * ==================== */
#page-wrapper {
    /* 【核心】设置白色背景 */
    background-color: black; 
    height: 100vh;
    /* 【核心】收窄和居中设置 */
    max-width: 900px; /* 控制收窄的宽度 */
    margin: 0 auto;  /* 居中显示，两侧露出黑色背景 */
    
    /* 确保内容能撑开包裹器 */
    min-height: 100%;
}
        .diary-container {
            max-width: 900px;
            margin: 0 auto;
        }

        .diary-header {
            text-align: center;
            color: white;
            margin-bottom: 30px;
        }

        .diary-header h1 {
            font-size: 2.5em;
            margin-bottom: 10px;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
        }
        
/* 【新增】日记序号样式 */
.diary-index {
    text-align: right; 
    font-size: 0.85em;
    color: #444; 
    padding: 8px 15px 8px 15px;
    background-color: #f0f0f0; 
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    font-weight: 600;
}
        /* 使用 flex 布局 */
        .book-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 30px;
            padding: 20px;
        }

        .diary-book {
            max-width: 600px;
            width: 100%;
            background: white;
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.3);
            overflow: hidden;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            cursor: pointer;
        }

        .diary-book:hover {
            transform: translateY(-10px) rotateX(5deg);
            box-shadow: 0 20px 40px rgba(0,0,0,0.4);
        }

        .book-cover {
            height: 100px;
            background: linear-gradient(45deg, #f093fb 0%, #f5576c 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 1.2em;
            font-weight: bold;
            text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
        }

        .book-content {
            display: flex;
    flex-direction: column;
    align-items: center; 
    
    /* 补偿封面减少的高度 */
    padding-top: 44px; 
    padding-bottom: 44px; 
    padding-left: 20px;
    padding-right: 20px;
        }

        .diary-image {
            width: 100%;
            height: 300px;
            object-fit: cover;
            border-radius: 8px;
            margin: 20px auto;
        }

        .no-image-placeholder {
            height: 200px;
            background: #f0f0f0;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #666;
            border-radius: 8px;
            margin-bottom: 15px;
        }

        .diary-title {
            font-size: 1.3em;
            font-weight: bold;
            margin-bottom: 10px;
            color: #333;
        }

        .diary-date {
            color: #666;
            font-size: 0.9em;
            margin-bottom: 15px;
        }

        .diary-actions {
            display: flex;
            gap: 10px;
        }

        .btn {
            padding: 8px 16px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-size: 0.9em;
            transition: background-color 0.3s ease;
        }

        .btn-view {
            background: #4CAF50;
            color: white;
        }

        .btn-view:hover {
            background: #45a049;
        }

        .btn-delete {
            background: #f44336;
            color: white;
        }

        .btn-delete:hover {
            background: #da190b;
        }

        .empty-state {
            text-align: center;
            color: white;
            font-size: 1.2em;
            margin-top: 100px;
        }

        .empty-state a {
            display: inline-block;
            margin-top: 20px;
            padding: 12px 24px;
            background: #4CAF50;
            color: white;
            text-decoration: none;
            border-radius: 5px;
            transition: background-color 0.3s ease;
        }

        .empty-state a:hover {
            background: #45a049;
        }

        /* 翻页动画效果 */
        @keyframes pageFlip {
            0% { transform: rotateY(0deg); }
            50% { transform: rotateY(-90deg); }
            100% { transform: rotateY(0deg); }
        }

        .diary-book.flipping {
            animation: pageFlip 0.8s ease-in-out;
        }

        /* 模态框样式 */
        .modal {
            display: none;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0,0,0,0.8);
        }

        .modal-content {
            background-color: white;
            margin: 5% auto;
            padding: 30px;
            border-radius: 15px;
            width: 80%;
            max-width: 800px;
            max-height: 80vh;
            overflow: auto;
            position: relative;
        }

        .close {
            color: #aaa;
            float: right;
            font-size: 32px;
            font-weight: bold;
            cursor: pointer;
            position: absolute;
            right: 20px;
            top: 15px;
        }

        .close:hover {
            color: black;
        }

        /* 模态框内按钮样式 */
        .modal-content .btn {
            padding: 12px 24px;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-size: 14px;
            transition: all 0.3s ease;
            margin: 5px;
        }

        .modal-content .btn-view {
            background: #4CAF50;
            color: white;
        }

        .modal-content .btn-view:hover {
            background: #45a049;
            transform: translateY(-2px);
        }

        .modal-content .btn-delete {
            background: #f44336;
            color: white;
        }

        .modal-content .btn-delete:hover {
            background: #da190b;
            transform: translateY(-2px);
        }

        /* 翻页按钮样式 */
        .modal-content .btn[disabled] {
            cursor: not-allowed;
            opacity: 0.5;
        }

        .pagination-info {
            text-align: center;
            margin-top: 10px;
            color: #666;
            font-size: 14px;
        }