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

body {
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* 背景光晕 */
body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    z-index: 0;
    pointer-events: none;
}
body::before {
    width: 400px; height: 400px;
    background: #60a5fa;
    top: -100px; left: -100px;
}
body::after {
    width: 500px; height: 500px;
    background: #fbbf24;
    bottom: -150px; right: -150px;
}

/* 顶部栏 */
.top-bar {
    position: fixed;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 10;
}

.back {
    text-decoration: none;
    color: #fff;
    font-size: 14px;
    padding: 10px 20px;
    border-radius: 30px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.3);
    transition: all .3s;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    white-space: nowrap;
}

.back:hover {
    background: rgba(255,255,255,0.3);
    transform: translateX(-4px);
}

.book-title {
    color: #fff;
    font-size: 15px;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
    opacity: 0.9;
}

/* 阅读区：只放大容器 */
#book-container {
    width: 75vw;
    max-width: 2000px;
    height: 75vh;
    max-height: 1000px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

#book {
    width: 100%;
    height: 100%;
}

.page {
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0;
}

.page img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* 底部工具栏 */
#toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 12px 22px;
    border-radius: 40px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.6s ease;
}

#toolbar button {
    padding: 10px 22px;
    border: none;
    border-radius: 24px;
    background: rgba(255,255,255,0.9);
    color: #4c1d95;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .25s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    white-space: nowrap;
}

#toolbar button:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

#toolbar button:active {
    transform: translateY(0);
}

#toolbar button:disabled {
    background: rgba(255,255,255,0.4);
    color: #999;
    cursor: not-allowed;
    transform: none;
}

#page-info {
    color: #fff;
    font-size: 14px;
    margin-left: 10px;
    font-weight: 500;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
    .top-bar {
        top: 12px; left: 12px; right: 12px;
        gap: 10px;
    }
    .back { padding: 8px 14px; font-size: 13px; }
    .book-title { font-size: 13px; }
    #book-container {
        width: 95vw;
        height: 72vh;
        border-radius: 12px;
    }
    #toolbar {
        flex-wrap: wrap;
        justify-content: center;
        padding: 10px 14px;
        gap: 8px;
        border-radius: 28px;
    }
    #toolbar button {
        padding: 8px 14px;
        font-size: 12px;
    }
    #page-info { font-size: 12px; margin-left: 4px; }
}