:root {
    --primary-color: #FF7E67;
    /* Warmer Coral */
    --secondary-color: #48DBFB;
    /* Bright Cyan */
    --accent-color: #FF9FF3;
    /* Pastel Pink */
    --dark-bg: #2d3436;
    --light-bg: #f1f2f6;
    --text-color: #2d3436;
    --card-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    --font-heading: 'Ma Shan Zheng', cursive;
    /* More calligraphic/fun Chinese font */
    --font-body: 'Noto Sans SC', sans-serif;
    /* Clean, readable body font */
}

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

body {
    font-family: var(--font-body);
    background-color: var(--light-bg);
    color: var(--text-color);
    line-height: 1.6;
    background-image: radial-gradient(#dfe6e9 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Header */
.main-header {
    background: white;
    padding: 1rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 5px solid var(--secondary-color);
}

.logo h1 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--primary-color);
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.1);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 700;
    font-size: 1.2rem;
    transition: all 0.3s;
    position: relative;
    padding-bottom: 5px;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--primary-color);
    transition: width 0.3s;
    border-radius: 2px;
}

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

nav a:hover,
nav a.active {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 6rem 2rem;
    background: linear-gradient(135deg, #fff 0%, #f7f9fc 100%);
    margin-bottom: 3rem;
    border-radius: 0 0 80px 80px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    width: 200px;
    height: 200px;
    background: var(--secondary-color);
    border-radius: 50%;
    opacity: 0.1;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 300px;
    height: 300px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0.1;
}

.hero h2 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    position: relative;
    /* z-index fix */
}

.hero .subtitle {
    font-size: 1.4rem;
    color: #636e72;
    margin-top: 1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

/* Bookshelf */
.bookshelf-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.bookshelf-container h3 {
    font-family: var(--font-heading);
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--dark-bg);
}

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

/* Book Card */
.book-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.book-card:hover {
    transform: translateY(-15px) rotate(1deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.book-cover {
    width: 100%;
    height: 380px;
    object-fit: cover;
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    border-bottom: 1px solid #eee;
}

.book-info {
    padding: 1.8rem;
    text-align: center;
}

.book-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    margin-bottom: 0.8rem;
    color: var(--dark-bg);
    line-height: 1.3;
}

.book-desc {
    font-size: 1rem;
    color: #7f8c8d;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-read-btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: linear-gradient(45deg, var(--primary-color), #ff9f43);
    color: white;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.book-read-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.6);
}

/* Footer */
footer {
    background-color: white;
    color: var(--text-color);
    text-align: center;
    padding: 3rem;
    margin-top: 5rem;
    border-top: 1px solid #eee;
}

footer p {
    font-weight: 500;
    color: #b2bec3;
}

/* Responsive */
@media (max-width: 600px) {
    .hero h2 {
        font-size: 2.5rem;
    }

    .main-header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }

    .hero {
        padding: 3rem 1rem;
        border-radius: 0 0 50px 50px;
    }
}