:root {
    --primary: #ff0000;
    --secondary: #ff00ff;
    --bg: #0a0a1f;
    --card-bg: rgba(255, 255, 255, 0.05);
    --text: #e0e0ff;
    --glass: rgba(255, 255, 255, 0.08);
}

[data-theme="light"] {
    --primary: #ff0000;
    --secondary: #ff00ff;
    --bg: #f0f2f5;
    --card-bg: rgba(255, 255, 255, 0.8);
    --text: #1a1a2e;
    --glass: rgba(255, 255, 255, 0.6);
}

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

::-webkit-scrollbar {
    width: 0;
    height: 0;
}

* {
    scrollbar-width: none;
}

* {
    -ms-overflow-style: none;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    min-height: 100vh;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(0, 255, 136, 0.15) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(255, 0, 255, 0.15) 0%, transparent 20%);
}

#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    backdrop-filter: blur(20px);
    background: rgba(10, 10, 31, 0.7);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 136, 0, 0.2);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3px;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
}

.logo-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex-wrap: nowrap;
}

.nav-links {
    display: flex;
    justify-content: flex-end;
    flex: 3;
    margin-right: 10px;
    flex-wrap: nowrap;
}

.logo-container p {
    margin-left: 0;
    font-size: 1rem;
    opacity: 0.8;
    transform: translateY(0);
}

.logo {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(65deg, #ffee00, #ff00ff, #0088ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: hue 10s infinite linear;
    text-shadow: 0 0 50px rgba(0, 255, 136, 0.5);
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    margin: 0 1rem;
    position: relative;
    transition: all 0.3s;
    display: inline-block;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -8px;
    left: 50%;
    background: linear-gradient(90deg, #ff8800, #ff00ff);
    transition: all 0.4s;
    transform: translateX(-50%);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero 区 */
.hero {
    height: 30vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
}

/* PDF预览容器 */
.pdf-preview-container {
    max-width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 100vh;
    height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* PDF预览头部 */
.pdf-preview-header {
    background-color: #13253C; 
    width: 100%;
    padding: 0.6rem 2rem; 
    display: flex;
    align-items: center;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 10;
    position: sticky;
    top: 0;
    left: 0;
    min-height: 36px; 
}

.pdf-back-btn {
    background-color: transparent; 
    color: #ffd700;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: none;
    margin-left: -10px;
    font-size: 14px; 
    line-height: 1;
    text-decoration: none;
    display: inline-flex;
    align-items: center; 
    justify-content: center;
}

.pdf-back-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* 书名 */
.pdf-book-title {
    color: white;
    font-size: 14px;
    margin: 0;
    padding: 0.5rem 1rem;
    text-align: center;
    font-weight: bold;
    line-height: 1.2;
    flex: 1;
    margin-left: 0;
    position: relative;
}

.pdf-preview-content {
    background-color: transparent;
    backdrop-filter: none;
    padding: 0 !important;
    border-radius: 0;
    border: none;
    overflow: auto;
    max-height: 100vh;
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

.pdf-preview-content::-webkit-scrollbar {
    display: none;
}

.pdf-preview-content {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.pdf-preview-content canvas {
    max-width: 100%;
    max-height: calc(100vh - 70px); 
    height: auto !important;
    display: block;
    margin: 0 auto;
    border-radius: 0;
    box-shadow: none;
    object-fit: contain;
    margin-top: 1rem;
}

.pdf-preview-content .loading {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
    padding: 3rem;
}

.hero h1 {
    font-size: 5rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #DE292E, #0e1b2c, #0088ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: hue 10s infinite linear;
    text-shadow: 0 0 50px rgba(0, 255, 136, 0.5);
}

@keyframes hue {
    0% {
        filter: hue-rotate(0deg);
    }

    100% {
        filter: hue-rotate(360deg);
    }
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 3rem;
    opacity: 0.9;
}

.search-container {
    position: relative;
    width: 100%;
    max-width: 200px;
    margin-top: -99px;
}

.search-box {
    width: 100%;
    padding: 10px 2rem;
    border: none;
    border-radius: 50px;
    background: var(--glass);
    backdrop-filter: blur(20px);
    font-size: 1rem;
    color: var(--text);
    border: 2px solid transparent;
    transition: all 0.4s;
    box-shadow: 0 20px 20px rgba(0, 0, 0, 0.3);
}

.search-box:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 30px rgba(255, 136, 0, 0.6);
}

.search-box::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.books-grid {
    max-width: 1400px;
    margin: -158px auto 4rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    column-gap: 0px;
}

.book-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    cursor: pointer;
    width: 95%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.book-info {
    flex: 1;
    padding: 5px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.book-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.2), rgba(255, 0, 255, 0.2));
    opacity: 0;
    transition: all 0.4s;
    z-index: -1;
}

.book-card:hover {
    transform: translateY(-20px) rotateX(10deg) rotateY(10deg);
    box-shadow: 0 30px 60px rgba(255, 136, 0, 0.4);
}

.book-card:hover::before {
    opacity: 1;
}

.book-cover {
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
    position: relative;
}

.book-cover img, .book-cover svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: all 0.6s;
}

.book-card:hover img {
    transform: scale(1.15);
}

.book-title {
    font-size: 12px;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #ffd700 !important;
}

.book-meta {
    font-size: 12px;
    opacity: 0.7;
    margin-top: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.download-btn {
    position: absolute;
    bottom: -30px;
    right: -30px;
    background: linear-gradient(45deg, #ff8800, #ff00ff);
    color: white;
    border: none;
    padding: 7px 18px;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.4s;
    box-shadow: 0 6px 18px rgba(255, 136, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    text-decoration: none;
    display: inline-block;
    line-height: 1.5;
}

.book-card:hover .download-btn {
    bottom: 20px;
    right: 20px;
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 3rem;
    }

    .books-grid {
        grid-template-columns: repeat(2, 1fr);
        margin-top: -138px;
        gap: 0.8rem;
        padding-left: 2px;
        padding-right: 0.5rem;
    }

    .book-card {
        width: 100%;
        margin: 0;
    }

    .book-cover {
        width: 100%;
        aspect-ratio: 3/4;
    }

    .book-title {
        font-size: 12px;
        margin-bottom: 12px;
    }

    .book-meta {
        font-size: 10px;
        margin-top: 0;
    }

    .logo-container {
        flex-wrap: nowrap;
        flex: 1;
        justify-content: center;
    }

    .logo {
        font-size: 14px;
        white-space: nowrap;
        text-align: center;
    }

    .logo-container p {
        display: none;
    }

    .nav-links a {
        display: inline-block;
    }

    .search-container {
        margin-top: -110px;
    }

    .download-btn {
        bottom: 50%;
        right: 50%;
        transform: translate(50%, 50%);
        font-size: 36px;
        padding: 18px 45px;
        border-radius: 90px;
        box-shadow: 0 18px 54px rgba(255, 136, 0, 0.4);
        line-height: 1.5;
    }

    .book-card:hover .download-btn {
        bottom: 50%;
        right: 50%;
        transform: translate(50%, 50%);
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 4rem; 
}

.detail-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 4rem;
    align-items: start;
}

.book-cover-3d {
    perspective: 1000px;
    position: sticky;
    top: 120px;
}
.cover-wrapper {
    position: relative;
    transform-style: preserve-3d;
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}
.cover-wrapper:hover {
    transform: rotateY(15deg) rotateX(10deg) translateZ(50px);
}
.cover-img {
    width: 100%;
    border-radius: 20px;
    position: relative;
    z-index: 2;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}
.cover-glow {
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(0,255,136,0.4) 0%, transparent 70%);
    opacity: 0;
    transition: all 0.4s;
    pointer-events: none;
}
.cover-wrapper:hover .cover-glow {
    opacity: 1;
}

/* 阅读区 */
.download-box {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2rem;
    margin-top: 2rem;
    border: 1px solid rgba(0,255,136,0.2);
}
.download-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, #00ff88, #ff00ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.format-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0,255,136,0.1);
    border: 1px solid rgba(0,255,136,0.3);
    border-radius: 16px;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.4s;
    position: relative;
    overflow: hidden;
}
.format-btn:hover {
    background: rgba(0,255,136,0.2);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,255,136,0.3);
}
.format-btn:active {
    transform: translateY(0);
}
.format-btn i {
    font-size: 1.8rem;
    background: linear-gradient(45deg, #00ff88, #ff00ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.copy-notify {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.9);
    color: #00ff88;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: bold;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s;
}
.copy-notify.show {
    opacity: 1;
}

/* 信息区 */
.book-info h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #00ff88, #ff00ff, #0088ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: hue 8s infinite linear;
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1.5rem 0;
    font-size: 1.1rem;
    opacity: 0.8;
}
.tag {
    background: rgba(0,255,136,0.2);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    border: 1px solid rgba(0,255,136,0.4);
}

.desc {
    line-height: 2;
    font-size: 1.1rem;
    margin: 2rem 0;
    padding: 2rem;
    background: var(--glass);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border-left: 4px solid var(--primary);
}

.related {
    margin-top: 6rem;
}
.related h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    background: linear-gradient(45deg, #00ff88, #ff00ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 2rem;
}

@media (max-width: 968px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
    .book-cover-3d {
        position: static;
    }
}

/* 登录弹窗样式 */
.login-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
}

.login-modal-content {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 0;
    border: 1px solid rgba(0, 255, 136, 0.2);
    width: 90%;
    max-width: 400px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1), rgba(255, 0, 255, 0.1));
    border-radius: 20px 20px 0 0;
}

.login-header h2 {
    margin: 0;
    font-size: 1.8rem;
    background: linear-gradient(45deg, #00ff88, #ff00ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.close-btn {
    font-size: 2rem;
    font-weight: bold;
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s;
    line-height: 1;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-btn:hover {
    background: rgba(255, 0, 0, 0.2);
    color: #ff4444;
}

.login-form {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text);
    font-size: 1rem;
    opacity: 0.9;
}

.form-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    font-size: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #00ff88;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.error-message {
    display: none;
    background: rgba(255, 0, 0, 0.2);
    color: #ff6666;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 0, 0, 0.3);
    font-size: 0.9rem;
}

.login-btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(45deg, #00ff88, #ff00ff);
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.3);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(0, 255, 136, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .login-modal-content {
        width: 65%;
        margin: 1rem;
    }
    
    .login-header {
        padding: 1.2rem 1.5rem;
    }
    
    .login-header h2 {
        font-size: 1.5rem;
    }
    
    .login-form {
        padding: 1.5rem;
    }
    
    .form-group input {
        padding: 0.7rem 0.9rem;
    }
    
    .login-btn {
        padding: 0.9rem;
        font-size: 1rem;
    }
}margin-bottom