/* CSS Variables */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #e74c3c;
    --accent-color: #c0392b;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #f8f9fa;
    --white: #fff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --border-radius: 12px;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-color);
}

h1, h2, h3, h4 {
    font-family: 'Noto Serif SC', serif;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo-icon {
    font-size: 2rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-links a {
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: var(--transition);
}

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 20px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 30px;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-description {
    font-size: 1.1rem;
    line-height: 2;
    margin-bottom: 40px;
    opacity: 0.8;
    animation: fadeInUp 1s ease 0.4s both;
}

.hero-decoration {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.floating-book {
    position: absolute;
    font-size: 4rem;
    animation: float 6s ease-in-out infinite;
    opacity: 0.1;
}

.floating-book:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-book:nth-child(2) {
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.floating-book:nth-child(3) {
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 15px 35px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(231, 76, 60, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Section Styles */
.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    color: var(--primary-color);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--secondary-color);
}

/* Featured Books */
.featured-books {
    padding: 100px 0;
    background: var(--white);
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.featured-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.featured-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.book-cover {
    height: 250px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 20px;
}

.book-rank {
    background: var(--white);
    color: var(--primary-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
}

.book-info {
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.book-info h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.book-year {
    color: var(--text-light);
    margin-bottom: 5px;
}

.book-rating {
    color: #f39c12;
    margin-bottom: 15px;
    font-weight: 500;
}

.book-desc {
    color: var(--text-light);
    margin-bottom: 20px;
    flex: 1;
}

.book-info .btn {
    text-align: center;
}

/* All Books Section */
.all-books {
    padding: 100px 0;
    background: var(--bg-color);
}

.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 25px;
    border: none;
    background: var(--white);
    color: var(--text-color);
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--secondary-color);
    color: var(--white);
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.book-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.book-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.book-card .book-cover {
    height: 180px;
    font-size: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-card .book-info {
    padding: 20px;
}

.book-card h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.book-card .book-rating {
    font-size: 0.9rem;
}

/* Awards Section */
.awards-section {
    padding: 100px 0;
    background: var(--white);
}

.awards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.award-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 40px 30px;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
}

.award-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.award-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.award-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.award-card p {
    color: var(--text-light);
}

/* Quote Section */
.quote-section {
    padding: 100px 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: var(--white);
}

.author-quote {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.5rem;
    font-style: italic;
    line-height: 1.8;
    position: relative;
}

.author-quote::before {
    content: '"';
    font-size: 6rem;
    position: absolute;
    top: -40px;
    left: -30px;
    opacity: 0.2;
    font-family: serif;
}

.author-quote cite {
    display: block;
    margin-top: 30px;
    font-size: 1.1rem;
    opacity: 0.7;
    font-style: normal;
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-section p,
.footer-section li {
    opacity: 0.8;
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    opacity: 0.6;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .nav-links {
        display: none;
    }

    .featured-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 2rem;
    }

    .author-quote {
        font-size: 1.2rem;
        padding: 0 20px;
    }
}

/* Book Detail Page Styles */
.book-detail {
    padding: 120px 0 60px;
    background: var(--bg-color);
}

.book-detail-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
    margin-bottom: 30px;
    transition: var(--transition);
}

.back-link:hover {
    color: var(--secondary-color);
}

.book-detail-header {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 50px;
    margin-bottom: 60px;
}

.book-detail-cover {
    width: 100%;
    aspect-ratio: 3/4;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    box-shadow: var(--shadow-hover);
}

.book-detail-info h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.book-detail-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
}

.book-detail-rating {
    font-size: 1.2rem;
    color: #f39c12;
    margin-bottom: 25px;
}

.book-detail-desc {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 30px;
}

.book-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tag {
    background: var(--white);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.book-content h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.chapter-list {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.chapter-item {
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    transition: var(--transition);
    cursor: pointer;
}

.chapter-item:last-child {
    border-bottom: none;
}

.chapter-item:hover {
    background: var(--bg-color);
    padding-left: 30px;
}

.chapter-item h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.chapter-item p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Author Page Styles */
.author-hero {
    padding: 150px 0 80px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: var(--white);
    text-align: center;
}

.author-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    margin: 0 auto 30px;
    box-shadow: 0 10px 30px rgba(231, 76, 60, 0.3);
}

.author-hero h1 {
    font-size: 3rem;
    margin-bottom: 15px;
}

.author-hero .subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 20px;
}

.author-intro {
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.8;
    line-height: 1.8;
}

.author-section {
    padding: 80px 0;
}

.author-section h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 50px;
    color: var(--primary-color);
}

.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: var(--secondary-color);
}

.timeline-item {
    display: flex;
    justify-content: flex-end;
    padding-right: calc(50% + 30px);
    position: relative;
    margin-bottom: 40px;
}

.timeline-item:nth-child(even) {
    justify-content: flex-start;
    padding-right: 0;
    padding-left: calc(50% + 30px);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background: var(--secondary-color);
    border-radius: 50%;
    top: 5px;
}

.timeline-content {
    background: var(--white);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.timeline-content h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.timeline-content .year {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .book-detail-header {
        grid-template-columns: 1fr;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item,
    .timeline-item:nth-child(even) {
        padding-left: 50px;
        padding-right: 0;
        justify-content: flex-start;
    }

    .timeline-item::before,
    .timeline-item:nth-child(even)::before {
        left: 20px;
    }
}
