:root {
    --bg-start: #4a2f3c;
    --bg-end: #2a1d24;
    --primary-gold: #ffc857;
    --dark-brown: #5a3d31;
    --light-cream: #fff8e1;
    --storybook-red: #c83e4d;
}

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

body {
    font-family: 'Fredoka', sans-serif;
    background: linear-gradient(145deg, var(--bg-start) 0%, var(--bg-end) 100%);
    color: var(--light-cream);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Ornate border effect */
body::before,
body::after {
    content: '';
    position: fixed;
    z-index: 100;
    pointer-events: none;
    background-repeat: repeat;
    opacity: 0.15;
}

/* Language switcher */
.language-switcher {
    position: fixed;
    top: 25px;
    right: 25px;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    border-radius: 25px;
    padding: 5px;
    border: 1px solid rgba(255, 200, 87, 0.4);
    display: flex;
}

/* Move language switcher to bottom center on mobile screens */
@media (max-width: 768px) {
    .language-switcher {
        top: auto;
        bottom: 25px;
        right: auto;
        left: 50%;
        transform: translateX(-50%);
    }
}

.language-btn {
    background: transparent;
    border: none;
    color: var(--light-cream);
    padding: 8px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 14px;
}

.language-btn.active {
    background: var(--primary-gold);
    color: var(--dark-brown);
    box-shadow: 0 2px 10px rgba(255, 200, 87, 0.3);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 2;
}

.header {
    text-align: center;
    margin-bottom: 60px;
}

.title {
    font-family: 'New Rocker', cursive;
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    color: var(--primary-gold);
    text-shadow: 3px 3px 0px var(--dark-brown), 0 0 25px rgba(255, 200, 87, 0.5);
    margin-bottom: 20px;
    animation: fadeInDown 1s ease-out;
}

.subtitle {
    font-size: clamp(1rem, 3vw, 1.3rem);
    color: var(--light-cream);
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 1s ease-out 0.3s backwards;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 50px;
    align-items: center;
}

.storybook-container {
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1200px;
    padding: 20px;
    animation: bookFloat 8s ease-in-out infinite;
}

@keyframes bookFloat {

    0%,
    100% {
        transform: translateY(0px) rotateZ(-1deg);
    }

    50% {
        transform: translateY(-25px) rotateZ(1deg);
    }
}

.book {
    width: 300px;
    height: 420px;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateY(-25deg);
    transition: transform 0.5s ease;
}

.storybook-container:hover .book {
    transform: rotateY(0deg);
}

.book-cover {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--storybook-red), #a12c38);
    border-radius: 8px 15px 15px 8px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), inset 0 0 5px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px;
    border: 3px solid var(--dark-brown);
    border-left: 5px solid #3d2a23;
}

.cover-design {
    border: 2px solid var(--primary-gold);
    border-radius: 5px;
    width: 85%;
    height: 85%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.book-title {
    font-family: 'New Rocker', cursive;
    font-size: 2rem;
    color: var(--primary-gold);
    text-shadow: 2px 2px 2px var(--dark-brown);
}

.book-author {
    font-size: 1rem;
    color: var(--light-cream);
    margin-top: 10px;
}


.features-list {
    list-style: none;
}

.feature-item {
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 20px;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid rgba(255, 200, 87, 0.2);
    border-left: 5px solid var(--primary-gold);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(30px);
    animation: slideIn 0.5s forwards;
}

.feature-item:nth-child(1) {
    animation-delay: 0.5s;
}

.feature-item:nth-child(2) {
    animation-delay: 0.7s;
}

.feature-item:nth-child(3) {
    animation-delay: 0.9s;
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.feature-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.feature-item h3 {
    font-size: 1.4rem;
    color: var(--primary-gold);
    margin-bottom: 10px;
    font-weight: 600;
}

.feature-item h3 span {
    margin-right: 10px;
}

.feature-item p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--light-cream);
    font-weight: 300;
}

.cta-section {
    text-align: center;
    margin: 80px 0;
}

.cta-button {
    display: inline-block;
    background: linear-gradient(45deg, var(--primary-gold), #ffb347);
    color: var(--dark-brown);
    padding: 18px 40px;
    font-size: 1.2rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    box-shadow: 0 8px 25px rgba(255, 200, 87, 0.3);
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
    font-family: 'Fredoka', sans-serif;
}

.cta-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 35px rgba(255, 200, 87, 0.4);
}

.footer {
    text-align: center;
    margin-top: 40px;
    padding: 30px 20px;
    color: rgba(255, 248, 225, 0.7);
    border-top: 1px solid rgba(255, 200, 87, 0.2);
    font-weight: 300;
}

.en-text {
    display: none;
}

body.lang-en .es-text {
    display: none;
}

body.lang-en .en-text {
    display: inline;
}