:root {
    --bg-color: #f9f5e9;
    --text-color: #3a3a3a;
    --accent-color: #b99174;
    --header-color: #6e594a;
    --paper-color: #fff;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Merriweather', Georgia, serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    background-image: url('../images/paper-texture.png');
    background-size: 400px;
    overflow-x: hidden;
    min-height: 100vh;
}

.book-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 100%;
    margin: 0 auto;
    perspective: 1px;
    overflow-x: hidden;
}

/* Header styles */
.book-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: var(--header-color);
    color: white;
    box-shadow: 0 2px 10px var(--shadow-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.book-title a {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
}

.book-nav {
    display: flex;
    gap: 1rem;
}

.book-nav a {
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.1);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.book-nav a:hover {
    color: var(--accent-color);
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Content styles */
.book-content {
    flex: 1;
    padding: 5rem 1rem 3rem;
}

.content-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--paper-color);
    padding: 2rem;
    box-shadow: 0 0 20px var(--shadow-color);
    border-radius: 5px;
    position: relative;
}

/* Footer styles */
.book-footer {
    text-align: center;
    padding: 1.5rem;
    background-color: var(--header-color);
    color: white;
    margin-top: 2rem;
}

/* Home page styles */
.home-page {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
}

.book-cover {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.book-image img {
    max-width: 300px;
    box-shadow: 5px 5px 15px var(--shadow-color);
    transition: transform 0.3s ease;
}

.book-image img:hover {
    transform: rotate(2deg) scale(1.03);
}

.book-intro {
    text-align: center;
}

.book-intro h1 {
    color: var(--header-color);
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 3px var(--shadow-color);
}

.book-intro ul {
    list-style-type: none;
    max-width: 600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

.book-intro li {
    transition: all 0.3s ease;
}

.book-intro li:hover {
    transform: translateY(-5px);
}

.book-intro a {
    display: block;
    text-decoration: none;
    color: var(--text-color);
    background-color: rgba(255, 255, 255, 0.8);
    padding: 1rem;
    border-radius: 5px;
    box-shadow: 0 2px 8px var(--shadow-color);
    transition: all 0.3s ease;
    border-left: 3px solid var(--accent-color);
}

.book-intro a:hover {
    background-color: white;
    box-shadow: 0 5px 15px var(--shadow-color);
    border-left-width: 5px;
}

/* Chapter styles */
.chapter {
    position: relative;
}

.chapter-header {
    text-align: center;
    margin-bottom: 2rem;
}

.chapter-header h1 {
    color: var(--header-color);
    font-size: 2.2rem;
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
    padding-bottom: 0.5rem;
}

.chapter-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.chapter-content p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

/* Chapter navigation */
.chapter-navigation {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px dashed var(--accent-color);
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.nav-button {
    display: inline-flex;
    align-items: center;
    padding: 0.8rem 1.2rem;
    background-color: var(--paper-color);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 5px;
    border: 1px solid var(--accent-color);
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
    position: relative;
    min-width: 180px;
}

.nav-button i {
    margin: 0 0.5rem;
}

.prev-button {
    padding-left: 1rem;
    text-align: left;
}

.next-button {
    padding-right: 1rem;
    text-align: right;
}

.home-button {
    padding: 0.8rem 1.5rem;
    background-color: var(--header-color);
    color: white;
    min-width: auto;
}

.nav-button:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 10px var(--shadow-color);
}

.home-button:hover {
    background-color: var(--text-color);
}

.nav-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #ccc;
    background-color: #f5f5f5;
}

.nav-chapter-title {
    display: block;
    font-size: 0.85rem;
    opacity: 0.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    margin-top: 4px;
}

/* Parallax effect */
.parallax-wrapper {
    perspective: 1px;
    height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
}

.parallax-layer {
    position: relative;
    height: 100%;
    transform-style: preserve-3d;
}

@media (max-width: 768px) {
    .book-title a {
        font-size: 1.2rem;
    }
    
    .content-wrapper {
        padding: 1rem;
    }
    
    .book-intro ul {
        grid-template-columns: 1fr;
    }
    
    .chapter-header h1 {
        font-size: 1.8rem;
    }
    
    .nav-buttons {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .nav-button {
        width: 100%;
        justify-content: center;
    }
} 