:root {
    --primary-color: #5a4a42;
    --accent-color: #d4af37;
    --bg-color: #f9f7f2;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    height: 100vh;
    height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-color);
    font-family: 'Lato', sans-serif;
    overflow: hidden;
    perspective: 1000px;
    /* Essential for 3D effect */
}

.container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.card-wrapper {
    position: relative;
    width: 350px;
    height: 550px;
    perspective: 1000px;
}

.card {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    background: #fff;
}

.layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    pointer-events: none;
    /* Let clicks pass through visual layers */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Layer 1: Background */
.layer-bg {
    transform: translateZ(0px);
    background-image: url('../assets/images/bg_texture.png');
    /* Fallback if image not yet ready */
    background-color: #fdfbf7;
}

/* Layer 2: Middle (Decorations) */
.layer-middle {
    transform: translateZ(30px) scale(0.9);
    /* Popped out slightly */
    /* Fallback since image generation failed */
    border: 2px solid rgba(212, 175, 55, 0.3);
    /* Subtle gold border */
    background: radial-gradient(circle at top right, rgba(255, 182, 193, 0.4), transparent 40%),
        radial-gradient(circle at bottom left, rgba(144, 238, 144, 0.4), transparent 40%);
    opacity: 0.9;
}

/* Additional decor for bottom left */
.layer-middle::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    /* Gradient fallback */
    background: radial-gradient(circle at bottom left, rgba(144, 238, 144, 0.4), transparent 40%);
    transform: rotate(0deg);
    /* Reset rotation as gradient handles it */
}


/* Layer 3: Foreground (Frame) */
.layer-fg {
    transform: translateZ(60px) scale(0.95);
    /* Most popped out */
    /* Fallback since image generation failed */
    border: 5px double var(--accent-color);
    box-shadow: inset 0 0 20px rgba(212, 175, 55, 0.2);
}

/* Content Layer */
.layer-content {
    transform: translateZ(80px);
    /* Floating content */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--primary-color);
    padding: 20px;
    z-index: 10;
    pointer-events: auto;
    /* Allow clicking buttons */
}

.content-inner {
    background: rgba(255, 255, 255, 0.6);
    padding: 30px;
    border-radius: 10px;
    backdrop-filter: blur(2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.greeting {
    font-family: 'Lato', sans-serif;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.8rem;
    margin-bottom: 15px;
}

.names {
    font-family: 'Great Vibes', cursive;
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    line-height: 1.2;
}

.date {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    margin-bottom: 5px;
    font-weight: 700;
}

.venue {
    font-family: 'Lato', sans-serif;
    font-size: 0.9rem;
    margin-bottom: 25px;
}

.cta-btn {
    padding: 10px 25px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    font-family: 'Cinzel', serif;
    cursor: pointer;
    transition: background 0.3s;
    border-radius: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8em;
}

.cta-btn:hover {
    background: var(--accent-color);
}

@media (max-width: 600px) {
    .card-wrapper {
        width: 90%;
        height: 70vh;
    }

    .names {
        font-size: 2.5rem;
    }
}