:root {
    --primary: #4A2B4F;
    --secondary: #2C1810;
    --accent: #1B4D3E;
    --background: #F5F0E6;
    --text: #2C1810;
    --light-text: #F5F0E6;
    --card-bg: #FFFFFF;
    --shadow: rgba(0, 0, 0, 0.08);
    --magic-glow: rgba(74, 43, 79, 0.3);
}

body {
    font-family: 'Playfair Display', serif;
    background-color: var(--background);
    color: var(--text);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.8;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="none"/><circle cx="50" cy="50" r="1" fill="%234A2B4F" opacity="0.1"/></svg>');
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Cinzel', serif;
}

header {
    background: linear-gradient(135deg, var(--primary), #5A3D5F);
    padding: 2rem 1rem;
    text-align: center;
    box-shadow: 0 4px 20px var(--shadow);
    position: relative;
    margin-bottom: 2rem;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="none"/><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.1"/></svg>') repeat;
    animation: twinkle 4s infinite;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.title-image {
    width: 100px;
    height: 100px;
    border-radius: 15px;
    object-fit: cover;
    box-shadow: 0 4px 15px var(--shadow);
    border: 3px solid var(--light-text);
    transition: transform 0.3s ease;
}

.title-image:hover {
    transform: scale(1.05) rotate(5deg);
}

.back-button {
    position: absolute;
    top: 50%;
    left: 1.5rem;
    transform: translateY(-50%);
    color: var(--light-text);
    text-decoration: none;
    font-size: 1.1rem;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    background-color: rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    display: inline-block;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Cinzel', serif;
}

.back-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.02);
    box-shadow: 0 2px 8px var(--magic-glow);
}

.back-button::before {
    content: '←';
    font-size: 1.2rem;
}

h1 {
    color: var(--light-text);
    font-size: 2.8rem;
    margin: 0;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

nav {
    margin-top: 1.5rem;
}

nav a {
    color: var(--light-text);
    text-decoration: none;
    font-size: 1.1rem;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    background-color: rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    display: inline-block;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

nav a:hover {
    background-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

main {
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    flex: 1;
    position: relative;
}

article {
    background-color: var(--card-bg);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 8px 30px var(--shadow);
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(74, 43, 79, 0.1);
}

article::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.story-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px var(--shadow);
    border: 3px solid var(--primary);
    transition: transform 0.3s ease;
}

.story-image:hover {
    transform: scale(1.02);
}

p {
    margin-bottom: 1.8rem;
    font-size: 1.15rem;
    text-align: justify;
    color: var(--text);
    position: relative;
    z-index: 1;
}

p:first-of-type::first-letter {
    font-size: 3.5rem;
    font-weight: bold;
    color: var(--primary);
    float: left;
    margin-right: 0.8rem;
    line-height: 1;
    margin-top: 0.2rem;
    text-shadow: 2px 2px 4px var(--shadow);
}

footer {
    background: linear-gradient(135deg, var(--primary), #5A3D5F);
    text-align: center;
    padding: 2rem;
    color: var(--light-text);
    margin-top: auto;
    box-shadow: 0 -4px 20px var(--shadow);
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="none"/><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.1"/></svg>') repeat;
    animation: twinkle 4s infinite;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.1;
    }
    50% {
        opacity: 0.3;
    }
}

footer p {
    margin: 0;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .title-image {
        width: 80px;
        height: 80px;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    main {
        padding: 1rem;
    }
    
    article {
        padding: 2rem;
        margin: 1rem 0;
    }
    
    p {
        font-size: 1.1rem;
    }
    
    .back-button {
        top: 50%;
        left: 1rem;
        padding: 0.6rem 1.2rem;
        transform: translateY(-50%);
    }
    
    nav a {
        padding: 0.6rem 1.2rem;
    }
} 