/**
 * 半糖书屋 - 3D立体书架页面
 * 书香阁楼设计 - 真实书架体验
 *
 * 设计特色：
 * - 3D透视书架，书籍以书脊形式竖立展示
 * - 木质纹理书架板，温暖照明效果
 * - 抽取式交互，hover时书籍轻微抽出
 * - 点击展开详情面板，流畅的物理动画
 * - 可爱的书虫吉祥物和空状态设计
 */

/* ========================================
   Google Fonts 导入 - 优雅字体
   ======================================== */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Ma+Shan+Zheng&display=swap');

/* ========================================
   书架页面专用 CSS 变量
   ======================================== */
:root {
    /* 木质纹理色（书架板专用） */
    --wood-light: #b8885f;
    --wood-medium: #a0753e;
    --wood-medium-dark: #8b6332;
    --wood-dark: #7a5528;
    --wood-darker: #6b4820;
    --wood-darkest: #5a3b18;

    /* 金色系（置顶标记） */
    --gold: #d4af37;
    --gold-medium: #c9a634;
    --gold-dark: #b8952e;
    --gold-muted: #8b7355;
    --gold-muted-dark: #6f5d45;

    /* 状态色 */
    --color-success: #27ae60;
    --color-success-dark: #1e8449;
    --color-error: #ef4444;
    --color-error-dark: #dc2626;
    --color-error-light: #fee2e2;
    --color-error-lighter: #fecaca;
}

/* ========================================
   页面容器
   ======================================== */
.bookshelf-page {
    min-height: calc(100vh - 180px);
    padding: 32px 0 80px;
}

.bookshelf-page .page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ========================================
   页面头部
   ======================================== */
.bookshelf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 48px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--border-color);
}

.bookshelf-header .header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.page-title {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 36px;
    font-weight: 700;
    font-family: 'Ma Shan Zheng', 'Noto Serif SC', serif;
    color: var(--text-dark);
    margin: 0;
    letter-spacing: 2px;
}

.page-title i {
    font-size: 38px;
    color: var(--primary-color);
}

.book-count {
    font-size: 15px;
    color: var(--text-light);
    background: linear-gradient(135deg, var(--accent-cream) 0%, var(--primary-light) 100%);
    padding: 8px 18px;
    border-radius: 24px;
    font-weight: 600;
    box-shadow: var(--shadow-card);
}

.bookshelf-header .header-right {
    display: flex;
    gap: 12px;
}

.btn-edit-mode {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 30px;
    color: var(--text-color);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow);
}

.btn-edit-mode:hover {
    background: var(--accent-cream);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-edit-mode.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-warm) 100%);
    border-color: var(--primary-color);
    color: var(--white);
}

/* ========================================
   3D书架容器
   ======================================== */
.bookshelf-3d-wrapper {
    position: relative;
    perspective: 1800px;
    perspective-origin: center 40%;
    min-height: 400px;
    margin-bottom: 60px;
}

/* 顶部照明效果 */
.shelf-lighting {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    height: 120px;
    background: radial-gradient(
        ellipse at center top,
        rgba(255, 237, 204, 0.6) 0%,
        rgba(255, 237, 204, 0.3) 30%,
        transparent 70%
    );
    pointer-events: none;
    z-index: 1;
}

/* 书架层 */
.bookshelf-layer {
    position: relative;
    transform-style: preserve-3d;
    padding-top: 60px;
}

/* 书架板 - 木质纹理 */
.shelf-board {
    position: relative;
    height: 24px;
    background: linear-gradient(
        to bottom,
        var(--wood-light) 0%,
        var(--wood-medium) 20%,
        var(--wood-medium-dark) 50%,
        var(--wood-dark) 80%,
        var(--wood-darker) 100%
    );
    border-radius: 4px 4px 0 0;
    box-shadow:
        0 4px 8px rgba(61, 46, 31, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2);
    transform: rotateX(8deg);
    transform-style: preserve-3d;
}

/* 木纹细节 */
.shelf-board::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 80px,
        rgba(0, 0, 0, 0.03) 80px,
        rgba(0, 0, 0, 0.03) 81px
    );
    border-radius: 4px 4px 0 0;
}

/* 书架板前沿 */
.shelf-board::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(
        to bottom,
        var(--wood-darker) 0%,
        var(--wood-darkest) 100%
    );
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* 书脊容器 */
.book-spines-container {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    padding: 0 20px 30px;
    margin-top: -50px;
    transform-style: preserve-3d;
}

/* ========================================
   书脊设计 - 3D立体书籍
   ======================================== */
.book-spine {
    position: relative;
    width: 48px;
    height: 280px;
    transform-style: preserve-3d;
    transform-origin: bottom center;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: bookDrop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

/* 书籍落下动画 - 错开时间 */
@keyframes bookDrop {
    0% {
        transform: translateY(-400px) rotateX(-90deg);
        opacity: 0;
    }
    100% {
        transform: translateY(0) rotateX(0);
        opacity: 1;
    }
}

/* hover时书籍抽出（非管理模式） */
.book-spine:hover {
    transform: translateY(-12px) translateZ(20px);
    z-index: 10;
}

/* 管理模式下禁用抽出效果 */
.bookshelf-manage-mode .book-spine:hover {
    transform: translateY(0);
}

/* 书脊正面 */
.spine-face {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        var(--spine-color, #c48b4a) 0%,
        var(--spine-color-dark, #a0522d) 100%
    );
    border-radius: 4px;
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
    padding: 16px 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    overflow: hidden;
}

/* 书脊装饰线 */
.spine-face::before,
.spine-face::after {
    content: '';
    position: absolute;
    left: 8px;
    right: 8px;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3) 50%,
        transparent
    );
}

.spine-face::before {
    top: 12px;
}

.spine-face::after {
    bottom: 12px;
}

/* 书名文字（竖排） */
.spine-title {
    writing-mode: vertical-rl;
    text-orientation: upright;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Noto Serif SC', serif;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    letter-spacing: 2px;
    max-height: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 作者标签 */
.spine-author {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    max-height: 40px;
    overflow: hidden;
}

/* 阅读进度指示器 */
.spine-progress-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(0, 0, 0, 0.2);
}

.spine-progress-fill {
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.4) 0%,
        rgba(255, 255, 255, 0.6) 100%
    );
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
    transition: width 0.4s ease;
}

/* 置顶标记（书脊上的丝带） */
.book-spine.is-top .spine-face::after {
    content: '';
    position: absolute;
    top: 0;
    right: 8px;
    width: 12px;
    height: 60px;
    background: linear-gradient(
        to bottom,
        var(--gold) 0%,
        var(--gold-medium) 50%,
        var(--gold-dark) 100%
    );
    box-shadow: -1px 2px 4px rgba(0, 0, 0, 0.3);
    clip-path: polygon(0 0, 100% 0, 100% 85%, 50% 100%, 0 85%);
}

/* ========================================
   管理模式
   ======================================== */
/* 管理模式下的书脊遮罩 */
.book-spine .spine-manage-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(2px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border-radius: 4px;
    padding: 12px 6px;
}

/* 管理模式激活时显示遮罩 */
.bookshelf-manage-mode .book-spine .spine-manage-overlay {
    opacity: 1;
    visibility: visible;
}

/* 管理模式下hover时增强效果 */
.bookshelf-manage-mode .book-spine:hover .spine-manage-overlay {
    background: rgba(0, 0, 0, 0.8);
}

/* 管理模式按钮 */
.spine-manage-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    color: var(--text-color);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.spine-manage-btn:hover {
    transform: scale(1.1);
}

.spine-manage-btn.btn-top {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-medium) 100%);
    color: white;
}

.spine-manage-btn.btn-top:hover {
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.5);
}

.spine-manage-btn.btn-top.is-topped {
    background: linear-gradient(135deg, var(--gold-muted) 0%, var(--gold-muted-dark) 100%);
}

.spine-manage-btn.btn-delete {
    background: linear-gradient(135deg, var(--color-error) 0%, var(--color-error-dark) 100%);
    color: white;
}

.spine-manage-btn.btn-delete:hover {
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.5);
}

/* 管理模式标签 */
.spine-manage-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    line-height: 1.2;
}

/* ========================================
   书籍详情展开面板
   ======================================== */
.book-detail-panel {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* 背景遮罩 */
.panel-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(61, 46, 31, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

/* 面板内容 */
.panel-content {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 700px;
    background: linear-gradient(
        145deg,
        var(--background-warm) 0%,
        var(--accent-paper) 100%
    );
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
    animation: panelSlideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

@keyframes panelSlideUp {
    0% {
        transform: scale(0.8) translateY(60px);
        opacity: 0;
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* 关闭按钮 */
.btn-close-panel {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    color: var(--text-color);
    font-size: 18px;
    cursor: pointer;
    z-index: 20;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.btn-close-panel:hover {
    background: var(--accent-cream);
    color: var(--primary-color);
    transform: rotate(90deg);
}

/* 面板内部布局 */
.panel-inner {
    display: flex;
    gap: 40px;
    padding: 50px;
}

/* 封面区域 */
.panel-cover {
    flex-shrink: 0;
    width: 200px;
}

.panel-cover img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: 0 12px 40px rgba(139, 90, 43, 0.25);
}

.panel-cover .cover-placeholder {
    width: 100%;
    aspect-ratio: 3 / 4;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, var(--accent-cream) 0%, var(--primary-light) 100%);
    border-radius: var(--radius);
}

.panel-cover .cover-placeholder i {
    font-size: 64px;
    color: var(--primary-color);
    opacity: 0.4;
}

/* 信息区域 */
.panel-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.panel-status {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 20px;
    letter-spacing: 1px;
}

.panel-status.finished {
    background: linear-gradient(135deg, var(--color-success) 0%, var(--color-success-dark) 100%);
    color: white;
}

.panel-status.ongoing {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}

.panel-title {
    font-size: 32px;
    font-weight: 700;
    font-family: 'Noto Serif SC', serif;
    color: var(--text-dark);
    line-height: 1.3;
    margin: 0;
}

.panel-author {
    font-size: 16px;
    color: var(--text-light);
    margin: 0;
}

.panel-author::before {
    content: '✒ ';
    color: var(--primary-color);
}

/* 进度区域 */
.panel-progress {
    margin-top: 8px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
}

.progress-text {
    color: var(--text-light);
    font-weight: 500;
}

.progress-percent {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 16px;
}

.progress-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-warm) 100%);
    border-radius: 4px;
    box-shadow: 0 0 12px rgba(196, 139, 74, 0.4);
    transition: width 0.4s ease;
}

/* 操作按钮 */
.panel-actions {
    display: flex;
    gap: 12px;
    margin-top: auto;
}

.btn-read-now {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 28px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-warm) 100%);
    border: none;
    border-radius: 30px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(196, 139, 74, 0.35);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-read-now:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(196, 139, 74, 0.45);
    color: white;
}

.btn-remove-panel {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 30px;
    color: var(--text-color);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-remove-panel:hover {
    background: linear-gradient(135deg, var(--color-error) 0%, var(--color-error-dark) 100%);
    border-color: var(--color-error-dark);
    color: white;
}

/* ========================================
   空书架状态 - 可爱书虫
   ======================================== */
.empty-shelf {
    text-align: center;
    padding: 100px 24px;
}

.empty-illustration {
    position: relative;
    margin-bottom: 40px;
}

/* 书虫角色 */
.bookworm-character {
    position: relative;
    display: inline-block;
    animation: wormWiggle 3s ease-in-out infinite;
}

@keyframes wormWiggle {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-8px) rotate(2deg); }
    75% { transform: translateY(-8px) rotate(-2deg); }
}

/* 书虫身体 */
.worm-body {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
    justify-content: center;
}

.worm-segment {
    width: 32px;
    height: 36px;
    background: linear-gradient(
        135deg,
        var(--accent-warm) 0%,
        var(--primary-color) 100%
    );
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(196, 139, 74, 0.3);
}

.worm-segment:nth-child(2) {
    width: 40px;
    height: 44px;
}

.worm-segment:nth-child(3) {
    width: 28px;
    height: 32px;
}

/* 书虫脸 */
.worm-face {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
}

.worm-eyes {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 6px;
}

.eye {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    position: relative;
    animation: blink 4s ease-in-out infinite;
}

@keyframes blink {
    0%, 48%, 52%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.1); }
}

.eye::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--text-dark);
    border-radius: 50%;
    top: 3px;
    left: 4px;
}

.worm-smile {
    width: 24px;
    height: 12px;
    border: 3px solid rgba(255, 255, 255, 0.8);
    border-top: none;
    border-radius: 0 0 24px 24px;
    margin: 0 auto;
}

/* 书虫手上的书 */
.worm-book {
    margin-top: 16px;
    font-size: 48px;
    color: var(--primary-dark);
    animation: bookFloat 2s ease-in-out infinite;
}

@keyframes bookFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* 灰尘粒子 */
.dust-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.dust-particles span {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent-warm);
    border-radius: 50%;
    opacity: 0;
    animation: dustFloat 5s ease-in-out infinite;
}

@keyframes dustFloat {
    0%, 100% {
        transform: translate(0, 0);
        opacity: 0;
    }
    10% { opacity: 0.5; }
    90% { opacity: 0.3; }
    100% {
        transform: translate(var(--dust-x, 20px), var(--dust-y, -80px));
        opacity: 0;
    }
}

.dust-particles span:nth-child(1) { top: 30%; left: 20%; --dust-x: -30px; --dust-y: -100px; animation-delay: 0s; }
.dust-particles span:nth-child(2) { top: 50%; left: 70%; --dust-x: 40px; --dust-y: -90px; animation-delay: 1s; }
.dust-particles span:nth-child(3) { top: 40%; right: 25%; --dust-x: 20px; --dust-y: -110px; animation-delay: 2s; }
.dust-particles span:nth-child(4) { bottom: 40%; left: 35%; --dust-x: -25px; --dust-y: -95px; animation-delay: 3s; }
.dust-particles span:nth-child(5) { bottom: 50%; right: 40%; --dust-x: 35px; --dust-y: -105px; animation-delay: 4s; }

.empty-title {
    font-size: 28px;
    font-weight: 700;
    font-family: 'Noto Serif SC', serif;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.empty-desc {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 32px;
    line-height: 1.6;
}

.btn-browse {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 40px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-warm) 100%);
    border-radius: 40px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(196, 139, 74, 0.35);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-browse:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(196, 139, 74, 0.45);
    color: white;
}

/* ========================================
   加载状态 - 书籍动画
   ======================================== */
.loading-state {
    text-align: center;
    padding: 100px 24px;
}

.loading-books {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: flex-end;
    height: 120px;
    margin-bottom: 32px;
}

.loading-book {
    width: 40px;
    height: 80px;
    background: linear-gradient(
        135deg,
        var(--primary-color) 0%,
        var(--accent-warm) 100%
    );
    border-radius: 4px;
    animation: bookBounce 1.2s ease-in-out infinite;
    box-shadow: 0 8px 24px rgba(139, 90, 43, 0.2);
}

.loading-book:nth-child(1) {
    animation-delay: 0s;
}

.loading-book:nth-child(2) {
    animation-delay: 0.2s;
    height: 100px;
}

.loading-book:nth-child(3) {
    animation-delay: 0.4s;
    height: 90px;
}

@keyframes bookBounce {
    0%, 100% {
        transform: translateY(0) scaleY(1);
    }
    50% {
        transform: translateY(-30px) scaleY(1.1);
    }
}

.loading-state p {
    font-size: 16px;
    color: var(--text-light);
    font-weight: 500;
}

/* ========================================
   未登录状态 - 钥匙图标
   ======================================== */
.login-required {
    text-align: center;
    padding: 100px 24px;
}

.login-illustration {
    margin-bottom: 32px;
}

.key-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    background: linear-gradient(145deg, var(--accent-cream) 0%, var(--primary-light) 100%);
    border-radius: 50%;
    animation: keyRotate 3s ease-in-out infinite;
}

@keyframes keyRotate {
    0%, 100% { transform: rotate(0deg); }
    25%, 75% { transform: rotate(-15deg); }
    50% { transform: rotate(15deg); }
}

.key-icon i {
    font-size: 56px;
    color: var(--primary-color);
}

.key-shine {
    position: absolute;
    top: 20%;
    left: 25%;
    width: 20px;
    height: 20px;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.8) 0%,
        transparent 70%
    );
    border-radius: 50%;
    animation: shine 2s ease-in-out infinite;
}

@keyframes shine {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

.login-title {
    font-size: 28px;
    font-weight: 700;
    font-family: 'Noto Serif SC', serif;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.login-desc {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 32px;
}

.btn-login-action {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 40px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-warm) 100%);
    border-radius: 40px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(196, 139, 74, 0.35);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-login-action:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(196, 139, 74, 0.45);
    color: white;
}

/* ========================================
   移除确认模态框
   ======================================== */
.remove-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.remove-modal-card {
    width: 100%;
    max-width: 420px;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
    animation: modalSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideUp {
    from {
        transform: scale(0.9) translateY(30px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.remove-modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(145deg, var(--color-error-light) 0%, var(--color-error-lighter) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.remove-modal-icon i {
    font-size: 36px;
    color: var(--color-error-dark);
}

.remove-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.remove-modal-desc {
    font-size: 15px;
    color: var(--text-light);
    margin-bottom: 32px;
    line-height: 1.6;
}

.remove-modal-desc strong {
    color: var(--text-dark);
    font-weight: 600;
}

.remove-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.remove-modal-btn {
    padding: 14px 32px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.remove-modal-btn.secondary {
    background: var(--background-warm);
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.remove-modal-btn.secondary:hover {
    background: var(--accent-cream);
    border-color: var(--primary-color);
}

.remove-modal-btn.danger {
    background: linear-gradient(135deg, var(--color-error) 0%, var(--color-error-dark) 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.3);
}

.remove-modal-btn.danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(220, 38, 38, 0.4);
}

/* ========================================
   Toast 通知样式
   ======================================== */
#toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10000;
}

.bookmark-toast {
    position: relative;
    padding: 16px 28px;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    color: white;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.bookmark-toast.success {
    background: linear-gradient(135deg, var(--accent-warm) 0%, var(--primary-color) 100%);
}

.bookmark-toast.error {
    background: linear-gradient(135deg, var(--color-error) 0%, var(--color-error-dark) 100%);
}

.bookmark-toast.slide-in {
    animation: toastSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bookmark-toast.slide-out {
    animation: toastSlideOut 0.3s ease forwards;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(120px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
    to {
        transform: translateX(120px) scale(0.9);
        opacity: 0;
    }
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 1200px) {
    .bookshelf-page .page-container {
        padding: 0 24px;
    }

    .book-spine {
        width: 44px;
        height: 260px;
    }

    .panel-inner {
        gap: 30px;
        padding: 40px;
    }

    .panel-cover {
        width: 160px;
    }
}

@media (max-width: 768px) {
    .bookshelf-page {
        padding: 24px 0 60px;
    }

    .bookshelf-page .page-container {
        padding: 0 16px;
    }

    .bookshelf-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        margin-bottom: 32px;
    }

    .page-title {
        font-size: 28px;
    }

    .book-spine {
        width: 40px;
        height: 240px;
    }

    .spine-title {
        font-size: 12px;
    }

    .panel-inner {
        flex-direction: column;
        padding: 30px 24px;
        gap: 24px;
    }

    .panel-cover {
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
    }

    .panel-title {
        font-size: 26px;
    }

    .panel-actions {
        flex-direction: column;
    }

    .btn-remove-panel {
        width: 100%;
        justify-content: center;
    }

    #toast-container {
        left: 16px;
        right: 16px;
    }

    .bookmark-toast {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .book-spine {
        width: 36px;
        height: 220px;
    }

    .spine-title {
        font-size: 11px;
        letter-spacing: 1px;
    }

    .empty-shelf,
    .loading-state,
    .login-required {
        padding: 80px 16px;
    }
}
