/* style.css */
:root {
    --primary-color: #ff9a9e; /* soft pink */
    --secondary-color: #fecfef; /* soft lavender/pink */
    --accent-color: #a18cd1; /* soft purple */
    --text-main: #4a4a4a;
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 99%, var(--secondary-color) 100%);
    min-height: 100vh;
    overflow: hidden; /* Prevent scrolling, contain bubbles */
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Background Animated Blobs for depth */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    z-index: 0;
    opacity: 0.6;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-color);
    top: -100px;
    left: -100px;
    animation: drift 15s infinite alternate ease-in-out;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: var(--primary-color);
    bottom: -50px;
    right: -50px;
    animation: drift 20s infinite alternate-reverse ease-in-out;
}

.shape-3 {
    width: 250px;
    height: 250px;
    background: #fbc2eb;
    bottom: 20%;
    left: 20%;
    animation: drift 18s infinite alternate ease-in-out;
}

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

/* Central Content & Glassmorphism */
.center-content {
    position: relative;
    z-index: 10; /* Above blobs and behind bubbles (we will set bubble z-index carefully) */
    width: 100%;
    max-width: 500px;
    padding: 20px;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: var(--glass-shadow);
    color: var(--text-main);
}

.glass-panel h1 {
    font-weight: 600;
    font-size: 2.2rem;
    margin-bottom: 10px;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.glass-panel p {
    font-weight: 300;
    margin-bottom: 30px;
    color: #ffffff;
}

/* Form Styles */
#wish-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#wish-input {
    width: 100%;
    padding: 15px 20px;
    border-radius: 30px;
    border: none;
    background: rgba(255, 255, 255, 0.6);
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    color: var(--text-main);
    outline: none;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

#wish-input:focus {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5), inset 0 2px 4px rgba(0,0,0,0.05);
}

button {
    padding: 15px 30px;
    border-radius: 30px;
    border: none;
    background: linear-gradient(to right, #ff9a9e, #fecfef);
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(255, 154, 158, 0.4);
    text-shadow: 1px 1px 1px rgba(0,0,0,0.1);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 154, 158, 0.6);
}

button:active {
    transform: translateY(1px);
}

/* Wishes Container */
#wishes-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none; /* Let clicks pass through to the form */
    z-index: 5; /* Float BEHIND the central form */
}

/* Floating Bubble */
.wish-bubble {
    position: absolute;
    top: 0;
    left: 0;
    color: #8b0000; /* Dark red text */
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    will-change: transform, width, height;
}

.heart-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* Drop shadow to make white heart stand out gently, on top of outline */
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.05));
}

.wish-bubble span {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    /* Expanding bounding box within the heart shape so it allows text to flow nicely */
    width: 65%;
    height: 60%;
    transform: translateY(-8%); /* Nudge up into the wider upper-half of the heart */
    word-break: break-word;
    line-height: 1.25;
}

/* Admin Delete Button */
.delete-btn {
    display: none;
    position: absolute;
    top: 5%;
    right: 5%;
    background: #ff4d4d;
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 14px;
    cursor: pointer;
    z-index: 100;
    padding: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    font-weight: bold;
    text-shadow: none;
}

.delete-btn:hover {
    background: #ff1a1a;
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(0,0,0,0.4);
}

#wishes-container.admin-mode .delete-btn {
    display: flex;
    justify-content: center;
    align-items: center;
}

#wishes-container.admin-mode .wish-bubble {
    pointer-events: auto; /* Enable clicking the delete button in admin mode */
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .center-content {
        width: 80%; /* Even smaller container widths */
        max-width: 320px; /* Constrain perfectly */
        padding: 0; /* Let it sit naturally */
    }
    .glass-panel {
        padding: 15px 12px; /* Very tight spacing */
    }
    .glass-panel h1 {
        font-size: 1.3rem;
        margin-bottom: 5px;
    }
    .glass-panel p {
        font-size: 0.8rem;
        margin-bottom: 12px;
    }
    #wish-input {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    button {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
}
