/* style.css - 魅族极简风 */
:root {
    --primary: #4a3570; /* 皇家紫 */
    --text-main: #333333;
    --text-sub: #999999;
    --bg-page: #f9f9f9; /* 极淡的灰背景 */
    --bg-card: #ffffff;
    --shadow-card: 0 8px 20px rgba(0,0,0,0.03);
    --shadow-float: 0 15px 40px rgba(0,0,0,0.1);
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-main);
    padding-bottom: 40px; /* 底部留白 */
}

/* 顶栏 */
.glass-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 100;
    border-bottom: 1px solid rgba(0,0,0,0.03);
}
.logo { font-weight: 900; letter-spacing: 1px; font-size: 1.1rem; }
.wallet { font-weight: bold; color: var(--primary); }
.unit { font-size: 0.8rem; opacity: 0.7; }

/* 视觉焦点 */
.hero-section {
    margin-top: 60px;
    padding: 40px 20px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.hero-text h2 { font-weight: 300; font-size: 2rem; margin: 0 0 10px 0; letter-spacing: -1px; }
.hero-text p { color: var(--text-sub); margin: 0; font-size: 0.9rem; }
.hero-visual { font-size: 4rem; color: #eee; transform: rotate(-10deg); }

/* 书架容器 */
.container { padding: 20px; }
.section-title {
    font-size: 0.8rem;
    color: var(--text-sub);
    letter-spacing: 1px;
    margin-bottom: 20px;
    font-weight: 600;
}

.bookshelf {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 双列布局 */
    gap: 15px;
}

/* 书籍卡片 */
.book-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.book-card:active { transform: scale(0.98); }

.cover-area {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #e0e0e0;
    margin-bottom: 15px;
}

.info-area { text-align: center; }
.book-title { font-size: 0.95rem; font-weight: 700; margin-bottom: 5px; color: #333; }
.book-meta { font-size: 0.75rem; color: #bbb; margin-bottom: 10px; }
.book-price { 
    color: var(--primary); 
    font-weight: bold; 
    font-size: 0.9rem; 
}
.book-price::after { content: ' μ'; font-size: 0.7rem; opacity: 0.7; }

/* 秘典类特殊样式 */
.book-card.dark-theme {
    background: #2a2a2a;
    color: #fff;
}
.book-card.dark-theme .book-title { color: #fff; }
.book-card.dark-theme .book-price { color: #d4bbff; }
.book-card.dark-theme .cover-area { color: #555; }

/* 弹窗浮层 (Bottom Sheet) */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 200;
    display: none;
    align-items: flex-end; /* 底部对齐 */
    opacity: 0;
    transition: opacity 0.3s;
}
.modal-overlay.active { display: flex; opacity: 1; }

.modal-card {
    background: #fff;
    width: 100%;
    border-radius: 24px 24px 0 0;
    padding: 30px;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.1);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.modal-overlay.active .modal-card { transform: translateY(0); }

.modal-handle {
    width: 40px; height: 5px; background: #eee;
    border-radius: 5px; margin: 0 auto 20px auto;
}

.modal-header { display: flex; align-items: center; gap: 20px; margin-bottom: 25px; }
.modal-icon { 
    font-size: 3rem; color: var(--primary); 
    width: 80px; height: 100px; 
    background: #f4f4f4; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
}
.modal-meta h2 { margin: 5px 0 0 0; font-size: 1.5rem; }
.badge { 
    background: #eee; color: #666; 
    padding: 2px 6px; border-radius: 4px; 
    font-size: 0.7rem; font-weight: bold; 
}

.modal-reason-box {
    background: #f8f8f8;
    padding: 20px;
    border-radius: 12px;
    position: relative;
    margin-bottom: 30px;
}
.quote-mark {
    position: absolute; top: 10px; left: 10px;
    font-size: 3rem; color: #e0e0e0; font-family: serif;
    line-height: 1;
}
.modal-reason-box p {
    margin: 0; padding-left: 15px;
    color: #666; font-size: 0.95rem; line-height: 1.6;
    position: relative; z-index: 2;
}

.modal-footer {
    display: flex; justify-content: space-between; align-items: center;
}
.price-display { font-size: 1.8rem; font-weight: bold; color: var(--primary); }
.currency { font-size: 1rem; margin-right: 2px; }

.btn-buy {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 15px 40px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-buy:active { transform: scale(0.95); opacity: 0.9; }
.btn-buy:disabled { background: #ccc; cursor: not-allowed; }

footer { text-align: center; color: #ccc; font-size: 0.75rem; margin-top: 40px; }

