* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: #fef8fa;
    color: #4a2c5b;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Book Cover Section */
.book-cover {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #ffe6ec 0%, #e8d6f0 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.book-content {
    position: relative;
    z-index: 1;
}

.book-cover h1 {
    font-family: 'Dancing Script', cursive;
    font-size: 4em;
    color: #4a2c5b;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
}

.book-cover p {
    font-size: 1.4em;
    margin: 10px 0;
    color: #6b3e7a;
    font-weight: 300;
}

.book-cover button {
    margin-top: 25px;
    padding: 14px 28px;
    font-size: 1.1em;
    background: #f7c1d0;
    color: #4a2c5b;
    border: 2px solid #fff;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.book-cover button:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    background: #ff99cc;
}

/* Love Meter */
.love-meter {
    margin: 30px 0;
    text-align: center;
}

.love-meter p {
    font-family: 'Dancing Script', cursive;
    font-size: 1.8em;
    color: #4a2c5b;
    margin-bottom: 15px;
}

.meter {
    width: 220px;
    height: 24px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    margin: 15px auto;
    border: 3px solid #f7c1d0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.meter-fill {
    height: 100%;
    background: linear-gradient(to right, #f7c1d0, #ff99cc);
    animation: fillMeter 2.5s ease-in-out forwards;
}

@keyframes fillMeter {
    0% { width: 0; }
    100% { width: 100%; }
}

/* Book Section */
.book {
    width: 100vw;
    height: 100vh;
    padding: 40px;
    background: url('https://www.transparenttextures.com/patterns/paper-fibers.png'), linear-gradient(to right, #f9f1f5 50%, #fff 50%);
    background-blend-mode: overlay;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.book-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page {
    width: 90%;
    max-width: 700px;
    height: auto;
    max-height: 90vh;
    background: transparent;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    position: absolute;
    transform: translateX(100vw);
    transition: transform 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform-style: preserve-3d;
    overflow-y: auto;
}

.page.left-page {
    transform-origin: right;
}

.page.right-page {
    transform-origin: left;
}

.page.active {
    transform: translateX(0);
}

.page.hidden {
    transform: translateX(100vw);
}

.page-content {
    background: #fff;
    border: 4px solid #f7c1d0;
    border-radius: 20px;
    padding: 40px;
    height: 100%;
    background-image: url('https://www.transparenttextures.com/patterns/lace.png');
    background-size: cover;
    opacity: 0.95;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(3px);
}

.page-content.locked .coming-soon-card {
    display: flex;
}

.page-content.locked h2,
.page-content.locked img,
.page-content.locked p,
.page-content.locked .text-content,
.page-content.locked .read-more-btn {
    display: none;
}

.coming-soon-card {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ffe6ec, #f7c1d0);
    border: 3px solid #ff99cc;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    width: 100%;
    height: 100%;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Special Style for Card 5 (Valentine's Day) */
#page-4 .coming-soon-card {
    background: linear-gradient(135deg, #ffe6ec, #ff6f91);
}

.coming-soon-card h3 {
    font-family: 'Dancing Script', cursive;
    font-size: 2.8em;
    color: #4a2c5b;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.15);
    margin-bottom: 15px;
}

.coming-soon-card .countdown {
    font-size: 1.3em;
    color: #333;
    font-style: italic;
    margin: 15px 0;
}

.coming-soon-card .milestone-message {
    font-family: 'Dancing Script', cursive;
    font-size: 2.2em;
    color: #4a2c5b;
    margin: 20px 0;
    display: none;
}

.coming-soon-card .unlock-section {
    display: none;
    margin-top: 25px;
    width: 85%;
}

.coming-soon-card .unlock-section p {
    font-size: 1.3em;
    color: #333;
    margin-bottom: 15px;
    font-style: italic;
}

.coming-soon-card .unlock-section input {
    padding: 10px;
    font-size: 1.1em;
    border: 2px solid #ff99cc;
    border-radius: 10px;
    width: 100%;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.9);
    color: #4a2c5b;
    transition: border-color 0.3s ease;
}

.coming-soon-card .unlock-section input:focus {
    outline: none;
    border-color: #ff6f91;
}

.coming-soon-card .unlock-section button {
    padding: 10px 20px;
    font-size: 1.1em;
    background: #f7c1d0;
    color: #4a2c5b;
    border: 2px solid #ffe6ec;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.coming-soon-card .unlock-section button:hover {
    transform: translateY(-3px);
    background: #ff99cc;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.coming-soon-card::before {
    content: '✨';
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 1.8em;
    color: #ff99cc;
    animation: sparkle 2s infinite ease-in-out;
}

.coming-soon-card::after {
    content: '💖';
    position: absolute;
    bottom: 15px;
    right: 15px;
    font-size: 1.8em;
    color: #ff99cc;
    animation: floatSmall 3s infinite ease-in-out;
}

@keyframes sparkle {
    0% { opacity: 0; transform: scale(0.5) rotate(0deg); }
    50% { opacity: 1; transform: scale(1.2) rotate(10deg); }
    100% { opacity: 0; transform: scale(0.5) rotate(0deg); }
}

@keyframes floatSmall {
    0% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(-15px); opacity: 0.7; }
    100% { transform: translateY(0); opacity: 1; }
}

.page-content::before {
    content: '💞';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2.2em;
    color: #ff99cc;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.15);
}

.page img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 30px;
    border: 3px solid #ffe6ec;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.page img:hover {
    transform: scale(1.02);
}

.page h2 {
    font-family: 'Dancing Script', cursive;
    font-size: 3.2em;
    color: #4a2c5b;
    margin-bottom: 25px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.15);
    text-align: center;
}

.page .text-content {
    flex-grow: 1;
    text-align: center;
}

.page .text-content p {
    font-size: 1.4em;
    line-height: 1.8;
    color: #333;
    margin: 0;
}

.page .text-content.truncated p {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
}

.page .text-content.truncated p::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(to bottom, transparent, #fff 90%);
    pointer-events: none;
}

.page .date {
    font-size: 1.2em;
    color: #4a2c5b;
    margin-top: 25px;
    font-style: italic;
    text-align: center;
}

.read-more-btn {
    margin: 20px auto 0;
    padding: 10px 20px;
    font-size: 1.1em;
    background: #f7c1d0;
    color: #4a2c5b;
    border: 2px solid #ffe6ec;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.read-more-btn:hover {
    transform: translateY(-3px);
    background: #ff99cc;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.nav-button {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: #f7c1d0;
    color: #4a2c5b;
    border: 2px solid #fff;
    padding: 18px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 2em;
    transition: all 0.3s ease;
    z-index: 100;
}

.nav-button:hover {
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.25);
}

.prev-page {
    left: 25px;
}

.next-page {
    right: 25px;
}

/* Animated Animals */
.bird {
    position: fixed;
    font-size: 2.2em;
    animation: fly 12s infinite ease-in-out;
}

.cat {
    position: fixed;
    font-size: 2.2em;
    bottom: 25px;
    animation: walk 18s infinite ease-in-out;
}

.butterfly {
    position: fixed;
    font-size: 1.8em;
    animation: flutter 15s infinite ease-in-out;
}

@keyframes fly {
    0% { transform: translateX(-100vw) translateY(15vh); }
    100% { transform: translateX(100vw) translateY(10vh); }
}

@keyframes walk {
    0% { transform: translateX(-100vw); }
    100% { transform: translateX(100vw); }
}

@keyframes flutter {
    0% { transform: translateX(-100vw) translateY(25vh); }
    50% { transform: translateX(50vw) translateY(10vh); }
    100% { transform: translateX(100vw) translateY(25vh); }
}

/* Animated Hearts */
.heart {
    position: fixed;
    color: #ff99cc;
    font-size: 1.2em;
    animation: float 5s infinite ease-in-out;
}

@keyframes float {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(-120vh); opacity: 0; }
}

.hidden {
    display: none;
}

/* Responsive Design */
@media (max-width: 800px) {
    .book-cover {
        padding: 50px 15px;
    }
    .book-cover h1 {
        font-size: 2.8em;
    }
    .book-cover p {
        font-size: 1.1em;
    }
    .book-cover button {
        padding: 12px 24px;
        font-size: 1em;
    }
    .love-meter p {
        font-size: 1.5em;
    }
    .meter {
        width: 180px;
        height: 20px;
    }
    .book {
        padding: 30px;
    }
    .page {
        width: 95%;
        max-height: 85vh;
    }
    .page-content {
        padding: 30px;
        border-width: 3px;
    }
    .page-content::before {
        font-size: 1.8em;
    }
    .page h2 {
        font-size: 2.5em;
    }
    .page .text-content p {
        font-size: 1.2em;
        line-height: 1.6;
    }
    .page .date {
        font-size: 1em;
    }
    .page img {
        max-height: 300px;
    }
    .read-more-btn {
        padding: 8px 16px;
        font-size: 1em;
    }
    .nav-button {
        padding: 14px;
        font-size: 1.6em;
    }
    .prev-page {
        left: 20px;
    }
    .next-page {
        right: 20px;
    }
    .bird, .cat, .butterfly {
        font-size: 1.5em;
    }
    .heart {
        font-size: 1em;
    }
    .coming-soon-card h3 {
        font-size: 2.2em;
    }
    .coming-soon-card .countdown, .coming-soon-card .milestone-message {
        font-size: 1.1em;
    }
    .coming-soon-card .unlock-section p {
        font-size: 1.1em;
    }
    .coming-soon-card .unlock-section input, .coming-soon-card .unlock-section button {
        font-size: 1em;
    }
    .coming-soon-card::before, .coming-soon-card::after {
        font-size: 1.4em;
    }
}

@media (max-width: 500px) {
    .book-cover {
        padding: 40px 10px;
    }
    .book-cover h1 {
        font-size: 2.2em;
    }
    .book-cover p {
        font-size: 0.95em;
    }
    .book-cover button {
        padding: 10px 20px;
        font-size: 0.9em;
    }
    .love-meter p {
        font-size: 1.3em;
    }
    .meter {
        width: 140px;
        height: 16px;
    }
    .book {
        padding: 20px;
    }
    .page {
        width: 92%;
        max-height: 80vh;
    }
    .page-content {
        padding: 25px;
    }
    .page-content::before {
        font-size: 1.5em;
    }
    .page h2 {
        font-size: 2em;
    }
    .page .text-content p {
        font-size: 1em;
        line-height: 1.5;
    }
    .page .text-content.truncated p {
        -webkit-line-clamp: 3;
    }
    .page .date {
        font-size: 0.9em;
    }
    .page img {
        max-height: 220px;
    }
    .read-more-btn {
        padding: 7px 14px;
        font-size: 0.9em;
    }
    .nav-button {
        padding: 12px;
        font-size: 1.4em;
    }
    .prev-page {
        left: 15px;
    }
    .next-page {
        right: 15px;
    }
    .bird, .cat, .butterfly {
        font-size: 1.2em;
    }
    .heart {
        font-size: 0.8em;
    }
    .coming-soon-card h3 {
        font-size: 1.8em;
    }
    .coming-soon-card .countdown, .coming-soon-card .milestone-message {
        font-size: 0.95em;
    }
    .coming-soon-card .unlock-section p {
        font-size: 0.95em;
    }
    .coming-soon-card .unlock-section input, .coming-soon-card .unlock-section button {
        font-size: 0.9em;
    }
    .coming-soon-card::before, .coming-soon-card::after {
        font-size: 1.2em;
    }
}

@media (max-width: 400px) {
    .book-cover {
        padding: 30px 10px;
    }
    .book-cover h1 {
        font-size: 1.8em;
    }
    .book-cover p {
        font-size: 0.85em;
    }
    .book-cover button {
        padding: 8px 16px;
        font-size: 0.8em;
    }
    .love-meter p {
        font-size: 1.1em;
    }
    .meter {
        width: 120px;
        height: 14px;
    }
    .book {
        padding: 15px;
    }
    .page {
        width: 90%;
        max-height: 75vh;
    }
    .page-content {
        padding: 20px;
    }
    .page-content::before {
        font-size: 1.2em;
    }
    .page h2 {
        font-size: 1.7em;
    }
    .page .text-content p {
        font-size: 0.9em;
        line-height: 1.4;
    }
    .page .text-content.truncated p {
        -webkit-line-clamp: 3;
    }
    .page .date {
        font-size: 0.8em;
    }
    .page img {
        max-height: 180px;
    }
    .read-more-btn {
        padding: 6px 12px;
        font-size: 0.85em;
    }
    .nav-button {
        padding: 10px;
        font-size: 1.2em;
    }
    .prev-page {
        left: 10px;
    }
    .next-page {
        right: 10px;
    }
    .coming-soon-card h3 {
        font-size: 1.6em;
    }
    .coming-soon-card .countdown, .coming-soon-card .milestone-message {
        font-size: 0.85em;
    }
    .coming-soon-card .unlock-section p {
        font-size: 0.85em;
    }
    .coming-soon-card .unlock-section input, .coming-soon-card .unlock-section button {
        font-size: 0.8em;
    }
    .coming-soon-card::before, .coming-soon-card::after {
        font-size: 1em;
    }
}