/* 通用样式 */
.container {
width: 90%;
max-width: 1100px;
margin: 30px auto;
}
.fade-in {
animation: fadeIn 0.6s ease;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}

body.dark {
    background: #1e1e1e;
    <!--background: url("https://t.alcy.cc/pc") no-repeat center center fixed;-->
    color: #fff;
    background: linear-gradient(135deg, #121212, #1a1a2e, #16213e);
    background-size: 400% 400%;
    animation: gradientMove 12s ease infinite;
    color: #fff;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.banner {
    width: 100%;
    height: 280px;
    background: url("https://t.alcy.cc/fj") no-repeat center center;
    background-size: cover;
    border-radius: 0 0 10px 10px;
    margin-bottom: 20px;
}

footer {
    text-align: center;
    padding: 20px 0;
    color: #ccc;
}

nav {
    display: flex;
    justify-content: center;   /* 水平居中 */
    gap: 20px;                  /* 链接间距，可自调 */
}

h3 {
    text-align: center;
}

h1{
    text-align: center;
}

/* 卡片/书籍样式 */
.buy-now-btn {display:inline-block;padding:10px 18px;background:#27ae60;color:#fff;border:0;border-radius:6px;cursor:pointer;font-size:15px;margin-top:10px;transition:0.25s;}
.buy-now-btn:hover {background:#2ecc71;}


.books {
    display: flex;
    justify-content: center; /* ⭐ 水平居中 */
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px; /* 书籍之间间距 */
    padding: 20px 0;
}

.book {
    background: #2a2a2a;
    padding: 15px;
    border-radius: 10px;
    width: 200px;
    text-align: center; /* ⭐ 内容居中 */
    box-shadow: 0 0 10px rgba(255,255,255,0.08);
}

.book:hover { transform: translateY(-6px); }

.book img {
width: 100%;
height: 240px;
object-fit: cover;
}

.book-info { padding: 15px; }
.price { color: #ff7675; font-weight: bold; }
.buy-btn {
display: inline-block;
padding: 10px 18px;
background: linear-gradient(135deg, #1e90ff, #0066cc);
color: #fff;
border-radius: 8px;
font-size: 15px;
font-weight: bold;
letter-spacing: 1px;
text-align: center;
text-decoration: none;
cursor: pointer;
transition: 0.25s ease;
box-shadow: 0 4px 10px rgba(0,0,0,0.35);
}
.buy-btn:hover {
transform: translateY(-2px);
background: linear-gradient(135deg, #4ea3ff, #1c7ed6);
box-shadow: 0 6px 14px rgba(0,0,0,0.45);
}
.buy-btn:hover { background: #74b9ff; }

.book img {
    width: 100%;
    border-radius: 6px;
}

/* 分类按钮 */
.category-list {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
gap: 15px;
}
.category-list a {
padding: 15px;
background: #333;
border-radius: 10px;
text-align: center;
color: #fff;
text-decoration: none;
font-size: 18px;
}
.category-list a:hover {
background: #555;
}

.buy-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 12px;
    background: #4a90e2;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
}

.purchase-btn {
    margin-left: 8px; /* “购买”按钮右移一点 */
    background: #e67e22;
}

/* 页面加载遮罩层 */
#loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* 旋转动画 */
.loader {
    width: 48px;
    height: 48px;
    border: 4px solid #4aa3ff;
    border-top: 4px solid transparent;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
