:root {
    --bg-color: #0b0205;
    --text-color: #f8f1f1;
    --accent-red: #d42a44;
    --accent-gold: #c5a059;
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Inter', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-sans);
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    max-width: 900px;
    width: 90%;
    z-index: 10;
    text-align: center;
}

h1 {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 400;
    line-height: 1.4;
    margin-bottom: 2rem;
    color: var(--accent-gold);
    text-shadow: 0 0 20px rgba(197, 160, 89, 0.3);
}

.image-wrapper {
    position: relative;
    display: inline-block;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(212, 42, 68, 0.2);
    transition: transform 0.5s ease;
    cursor: pointer;
}

.image-wrapper:hover {
    transform: scale(1.02);
    box-shadow: 0 0 70px rgba(212, 42, 68, 0.4);
}

img {
    max-width: 100%;
    display: block;
    height: auto;
    max-height: 70vh;
}

/* Animations */
.fade-in {
    opacity: 0;
    animation: fadeIn 2s forwards ease-out;
}

.fade-in-delayed {
    opacity: 0;
    animation: fadeIn 2s 1s forwards ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Petals */
#petal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.petal {
    position: absolute;
    background-color: var(--accent-red);
    border-radius: 150% 0 150% 0;
    opacity: 0.6;
    filter: drop-shadow(0 0 5px rgba(212, 42, 68, 0.3));
    animation: fall linear infinite;
}

@keyframes fall {
    0% {
        transform: translate(0, -10%) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    100% {
        transform: translate(100px, 110vh) rotate(360deg);
        opacity: 0;
    }
}

/* Sparkles */
.sparkle {
    position: absolute;
    width: 5px;
    height: 5px;
    background: white;
    border-radius: 50%;
    pointer-events: none;
    box-shadow: 0 0 10px white;
    animation: twinkle 1s infinite alternate;
}

@keyframes twinkle {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@media (max-width: 600px) {
    h1 {
        font-size: 1.8rem;
    }
}

/* Poem Generator Styles */
.poem-section {
    margin-top: 3rem;
    padding-bottom: 2rem;
}

.instruction {
    font-size: 1.1rem;
    color: var(--accent-gold);
    margin-bottom: 1rem;
    opacity: 0.8;
}

.mood-selector {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.mood-btn {
    background: transparent;
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.mood-btn:hover {
    background: var(--accent-gold);
    color: var(--bg-color);
    box-shadow: 0 0 15px rgba(197, 160, 89, 0.4);
}

#poem-display {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

#poem-display.visible {
    opacity: 1;
    pointer-events: auto;
}

.poem-card {
    background: rgba(20, 5, 10, 0.9);
    border: 1px solid var(--accent-gold);
    padding: 3rem;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 0 40px rgba(212, 42, 68, 0.3);
    transform: translateY(20px);
    transition: transform 0.5s ease;
}

#poem-display.visible .poem-card {
    transform: translateY(0);
}

#poem-text {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    line-height: 1.8;
    color: var(--text-color);
    font-style: italic;
    white-space: pre-line;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    color: var(--accent-gold);
    cursor: pointer;
    line-height: 1;
}

.hidden {
    display: none !important;
}
