:root {
    --primary-color: #ff8fa3;
    /* Pastel Pink */
    --secondary-color: #ffe156;
    /* Pastel Yellow */
    --bg-color: #fff0f5;
    /* Lavender Blush */
    --text-color: #5d4037;
    /* Warm Brown for contrast */
    --font-family: 'Outfit', sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Fix scrolling issue: ensure content is scrollable */
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    text-align: center;
    /* Ensure body takes at least full height but can expand */
    min-height: 100vh;
    height: auto;
}

.content {
    z-index: 10;
    padding: 2rem;
    /* Transparent background as requested */
    background: transparent;
    box-shadow: none;
    border: none;
    max-width: 95%;
    width: 700px;
}

h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.highlight {
    color: var(--primary-color);
    text-shadow: 2px 2px 0px #ffffff;
}

.photo-container {
    width: 150px;
    height: 150px;
    margin: 0 auto 1.5rem;
    position: relative;
}

.birthday-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid #ffffff;
    box-shadow: 0 5px 15px rgba(255, 143, 163, 0.4);
    animation: bounce 2s infinite ease-in-out;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* --- Gallery Styles --- */
.gallery {
    margin: 2rem 0;
    width: 100%;
}

.gallery-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 0 #fff;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 2rem;
}

.gallery-item {
    background: rgba(255, 255, 255, 0.6);
    padding: 10px;
    border-radius: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid #fff;
}

.gallery-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    z-index: 20;
}

.gallery-item img {
    width: 100%;
    border-radius: 10px;
    display: block;
}

.caption {
    font-size: 0.9rem;
    margin-top: 8px;
    font-weight: bold;
    color: var(--text-color);
}

@media (max-width: 600px) {
    .content {
        width: 95%;
        padding: 1.5rem;
    }

    /* Make items stack on very small screens, or keep 2-col but smaller text */
    .gallery-grid {
        gap: 10px;
    }

    .caption {
        font-size: 0.8rem;
    }
}

button {
    padding: 15px 30px;
    font-size: 1.2rem;
    background-color: var(--secondary-color);
    color: #333;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-family: var(--font-family);
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

button:active {
    transform: scale(0.95);
}

#floating-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.floater {
    position: absolute;
    font-size: 2rem;
    user-select: none;
    animation-name: floatUp;
    animation-timing-function: linear;
    animation-fill-mode: forwards;
}

@keyframes floatUp {
    from {
        transform: translateY(110vh) rotate(0deg);
        opacity: 1;
    }

    to {
        transform: translateY(-10vh) rotate(360deg);
        opacity: 0;
    }
}

/* ===== Chat Widget ===== */

#chat-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff8fa3, #ff6b8a);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(255, 107, 138, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: pulse-glow 2s infinite ease-in-out;
    padding: 0;
    font-family: var(--font-family);
}

#chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(255, 107, 138, 0.7);
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(255, 107, 138, 0.5);
    }

    50% {
        box-shadow: 0 4px 30px rgba(255, 107, 138, 0.8), 0 0 10px rgba(255, 107, 138, 0.3);
    }
}

.chat-toggle-icon,
.chat-toggle-close {
    font-size: 1.6rem;
    line-height: 1;
    position: absolute;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.chat-toggle-close {
    opacity: 0;
    transform: rotate(-90deg);
    font-size: 1.4rem;
    color: white;
}

#chat-toggle.open .chat-toggle-icon {
    opacity: 0;
    transform: rotate(90deg);
}

#chat-toggle.open .chat-toggle-close {
    opacity: 1;
    transform: rotate(0deg);
}

#chat-window {
    position: fixed;
    bottom: 96px;
    right: 24px;
    width: 370px;
    max-height: 500px;
    border-radius: 20px;
    background: rgba(255, 245, 248, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(255, 143, 163, 0.15);
    display: flex;
    flex-direction: column;
    z-index: 999;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    overflow: hidden;
}

#chat-window.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.chat-header {
    background: linear-gradient(135deg, #ff8fa3, #ff6b8a);
    padding: 14px 18px;
    color: white;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-avatar {
    font-size: 2rem;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-header h3 {
    font-size: 1rem;
    margin: 0;
    font-weight: 700;
}

.chat-status {
    font-size: 0.75rem;
    opacity: 0.85;
    margin: 2px 0 0 0;
}

#chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 320px;
    min-height: 200px;
}

.message {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.45;
    animation: msgSlideIn 0.3s ease;
}

@keyframes msgSlideIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

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

.message p {
    margin: 0;
}

.bot-message {
    align-self: flex-start;
    background: white;
    color: var(--text-color);
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.user-message {
    align-self: flex-end;
    background: linear-gradient(135deg, #ff8fa3, #ff6b8a);
    color: white;
    border-bottom-right-radius: 4px;
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    align-self: flex-start;
    background: white;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.typing-indicator span {
    width: 7px;
    height: 7px;
    background: #ccc;
    border-radius: 50%;
    animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {

    0%,
    60%,
    100% {
        transform: translateY(0);
        background: #ccc;
    }

    30% {
        transform: translateY(-6px);
        background: #ff8fa3;
    }
}

#chat-form {
    display: flex;
    padding: 10px 12px;
    gap: 8px;
    border-top: 1px solid rgba(255, 143, 163, 0.15);
    background: rgba(255, 255, 255, 0.5);
}

#chat-input {
    flex: 1;
    border: 1.5px solid rgba(255, 143, 163, 0.3);
    border-radius: 24px;
    padding: 10px 16px;
    font-size: 0.9rem;
    font-family: var(--font-family);
    background: white;
    color: var(--text-color);
    outline: none;
    transition: border-color 0.2s ease;
}

#chat-input:focus {
    border-color: #ff8fa3;
}

#chat-input::placeholder {
    color: #c0a0a8;
}

#chat-send {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff8fa3, #ff6b8a);
    border: none;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    padding: 0;
    box-shadow: 0 2px 8px rgba(255, 107, 138, 0.3);
}

#chat-send:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 14px rgba(255, 107, 138, 0.5);
}

/* Mobile responsive */
@media (max-width: 600px) {
    #chat-window {
        width: calc(100vw - 24px);
        right: 12px;
        bottom: 90px;
        max-height: 60vh;
    }

    #chat-toggle {
        bottom: 16px;
        right: 16px;
        width: 54px;
        height: 54px;
    }
}