:root {
    --primary: #ff3366;
    --primary-light: #ff6699;
    --bg-gradient-1: #ffe6ea;
    --bg-gradient-2: #ffccdc;
    --text-dark: #4a0e1b;
    --text-light: #8a2be2;
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.8);
    --glass-shadow: rgba(255, 105, 135, 0.2);
}

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

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-gradient-1), var(--bg-gradient-2));
    color: var(--text-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* Animated Background Shapes */
.bg-shape {
    position: absolute;
    filter: blur(80px);
    z-index: -1;
    border-radius: 50%;
    animation: float 10s infinite ease-in-out alternate;
}

.shape1 {
    width: 400px;
    height: 400px;
    background: rgba(255, 102, 153, 0.4);
    top: -100px;
    left: -100px;
}

.shape2 {
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.6);
    bottom: -150px;
    right: -100px;
    animation-delay: -5s;
}

.shape3 {
    width: 300px;
    height: 300px;
    background: rgba(255, 153, 204, 0.5);
    top: 50%;
    left: 40%;
    animation-duration: 15s;
}

@keyframes float {
    0% {
        transform: translateY(0) scale(1);
    }

    100% {
        transform: translateY(-30px) scale(1.1);
    }
}

.container {
    text-align: center;
    z-index: 10;
    padding: 2rem;
    max-width: 1200px;
    width: 100%;
}

.fade-in {
    animation: fadeInSlideUp 1s ease-out forwards;
}

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

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

h1 {
    font-family: 'Dancing Script', cursive;
    font-size: 3.5rem;
    color: var(--primary);
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.6);
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.2rem;
    color: #6d1c31;
    font-weight: 400;
    margin-bottom: 3rem;
    background: rgba(255, 255, 255, 0.4);
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    backdrop-filter: blur(5px);
}

.gift-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    perspective: 1000px;
}

/* Glassmorphism Gift Box */
.gift-item {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 30px var(--glass-shadow);
    border-radius: 24px;
    width: 160px;
    height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    transform-style: preserve-3d;
}

.gift-item::before {
    content: "🎁";
    font-size: 4.5rem;
    transition: all 0.5s ease;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.gift-item:hover {
    transform: translateY(-12px) scale(1.05) rotateY(10deg);
    box-shadow: 0 20px 40px rgba(255, 105, 135, 0.4);
    background: rgba(255, 255, 255, 0.85);
}

.gift-item:hover::before {
    transform: scale(1.1) rotate(-5deg);
}

.gift-item .box-number {
    position: absolute;
    bottom: 15px;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary-light);
    background: rgba(255, 255, 255, 0.8);
    padding: 4px 12px;
    border-radius: 20px;
}

.gift-item.opened {
    opacity: 0.8;
    transform: scale(0.95);
    background: rgba(240, 240, 240, 0.6);
    border-color: rgba(255, 105, 135, 0.4);
    box-shadow: 0 5px 15px rgba(255, 105, 135, 0.2);
}

.gift-item.opened::before {
    content: "✨";
}

/* Beautiful Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -40%) scale(0.9);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    width: 90%;
    max-width: 500px;
    border-radius: 30px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 101;
    text-align: center;
}

.modal.active,
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal.active {
    transform: translate(-50%, -50%) scale(1);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover {
    color: var(--primary);
}

.modal-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.modal-title {
    font-family: 'Dancing Script', cursive;
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.modal-message {
    font-size: 1.2rem;
    line-height: 1.5;
    color: #444;
}

.modal-image {
    width: 100%;
    border-radius: 15px;
    margin-top: 1.5rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    object-fit: cover;
    max-height: 350px;
}

/* Responsive */
@media (max-width: 600px) {
    h1 {
        font-size: 2.5rem;
    }

    .gift-item {
        width: 130px;
        height: 150px;
    }

    .gift-item::before {
        font-size: 3.5rem;
    }
}