/* =============================================
   Loveroom Gift Card — Card Template Styles
   ============================================= */

/* Base card — A5 landscape ratio (210x148mm => ~1.42:1) */
.lgc-card {
    width: 100%;
    aspect-ratio: 1.42 / 1;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.lgc-card__inner {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 28px 32px;
    position: relative;
    z-index: 2;
}

.lgc-card__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

/* Header / Badge */
.lgc-card__header {
    display: flex;
    justify-content: flex-start;
}

.lgc-card__badge {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 4px 14px;
    border: 1.5px solid;
    border-radius: 20px;
}

/* Photo frame */
.lgc-card__photo-frame {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    margin: 8px auto;
    border: 3px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.lgc-card__photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Body */
.lgc-card__body {
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    min-height: 0;
}

.lgc-card__room {
    font-size: 26px;
    font-weight: 700;
    margin: 0;
    text-transform: capitalize;
}

.lgc-card__dates {
    font-size: 12px;
    opacity: 0.8;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lgc-card__message {
    font-size: 14px;
    line-height: 1.5;
    margin-top: 8px;
    opacity: 0.9;
    max-height: 80px;
    overflow: hidden;
    word-wrap: break-word;
}

/* Footer / QR */
.lgc-card__footer {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.lgc-card__qr {
    width: 64px;
    height: 64px;
    background: #fff;
    border-radius: 6px;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lgc-card__qr svg {
    width: 100%;
    height: 100%;
}

.lgc-card__qr-hint {
    font-size: 11px;
    opacity: 0.6;
    margin: 0;
}

/* ===========================================
   TEMPLATE: Candlelight
   =========================================== */
.lgc-card--candlelight {
    background: linear-gradient(160deg, #1a0a00 0%, #2d1600 40%, #1a0a00 100%);
}

.lgc-card--candlelight .lgc-card__overlay {
    background: radial-gradient(ellipse at 50% 30%, rgba(245, 158, 11, 0.15) 0%, transparent 60%);
}

/* ===========================================
   TEMPLATE: Roses
   =========================================== */
.lgc-card--roses {
    background: linear-gradient(160deg, #2d0a0a 0%, #4a0e0e 40%, #2d0a0a 100%);
}

.lgc-card--roses .lgc-card__overlay {
    background: radial-gradient(ellipse at 70% 80%, rgba(225, 29, 72, 0.12) 0%, transparent 50%),
                radial-gradient(ellipse at 20% 20%, rgba(225, 29, 72, 0.08) 0%, transparent 40%);
}

/* ===========================================
   TEMPLATE: Champagne
   =========================================== */
.lgc-card--champagne {
    background: linear-gradient(160deg, #1c1917 0%, #292524 40%, #1c1917 100%);
}

.lgc-card--champagne .lgc-card__overlay {
    background: radial-gradient(ellipse at 50% 0%, rgba(212, 168, 67, 0.1) 0%, transparent 50%);
}

/* ===========================================
   TEMPLATE: Starry Night
   =========================================== */
.lgc-card--starry-night {
    background: linear-gradient(160deg, #0c0a1d 0%, #1e1b4b 50%, #0c0a1d 100%);
}

.lgc-card--starry-night .lgc-card__overlay {
    background: radial-gradient(ellipse at 30% 20%, rgba(129, 140, 248, 0.08) 0%, transparent 40%),
                radial-gradient(ellipse at 80% 60%, rgba(167, 139, 250, 0.06) 0%, transparent 40%);
}

/* Star particles via CSS */
.lgc-card--starry-night .lgc-card__stars {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
}

.lgc-card--starry-night .lgc-card__stars::before,
.lgc-card--starry-night .lgc-card__stars::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 2px;
    background: #e0e7ff;
    border-radius: 50%;
    box-shadow:
        20px 30px 0 #e0e7ff,
        60px 80px 0 rgba(224, 231, 255, 0.6),
        120px 20px 0 #e0e7ff,
        180px 60px 0 rgba(224, 231, 255, 0.4),
        250px 40px 0 rgba(224, 231, 255, 0.7),
        310px 90px 0 rgba(224, 231, 255, 0.5),
        80px 130px 0 rgba(224, 231, 255, 0.3),
        200px 150px 0 rgba(224, 231, 255, 0.6),
        340px 20px 0 rgba(224, 231, 255, 0.4),
        400px 100px 0 rgba(224, 231, 255, 0.5),
        50px 200px 0 rgba(224, 231, 255, 0.4),
        150px 220px 0 rgba(224, 231, 255, 0.3),
        280px 180px 0 rgba(224, 231, 255, 0.5),
        370px 160px 0 rgba(224, 231, 255, 0.4);
    animation: lgc-twinkle 4s ease-in-out infinite alternate;
}

.lgc-card--starry-night .lgc-card__stars::after {
    left: 15px;
    top: 10px;
    animation-delay: 2s;
}

@keyframes lgc-twinkle {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* ===========================================
   TEMPLATE: Minimalist
   =========================================== */
.lgc-card--minimalist {
    background: #ffffff;
    border: 1px solid #e5e7eb;
}

.lgc-card--minimalist .lgc-card__badge {
    border-color: currentColor;
}

.lgc-card--minimalist .lgc-card__dates {
    opacity: 0.6;
}

.lgc-card--minimalist .lgc-card__message {
    opacity: 0.8;
}

.lgc-card--minimalist .lgc-card__photo-frame {
    border-color: #e5e7eb;
}

/* ===========================================
   RESPONSIVE — Mobile card preview
   =========================================== */
@media (max-width: 639px) {
    .lgc-card {
        aspect-ratio: auto;
    }

    .lgc-card__inner {
        padding: 20px 18px;
        gap: 10px;
    }

    .lgc-card__badge {
        font-size: 9px;
        padding: 3px 10px;
        letter-spacing: 1.5px;
    }

    .lgc-card__photo-frame {
        width: 70px;
        height: 70px;
        margin: 4px auto;
        border-width: 2px;
    }

    .lgc-card__room {
        font-size: 18px;
    }

    .lgc-card__dates {
        font-size: 10px;
    }

    .lgc-card__message {
        font-size: 12px;
        margin-top: 4px;
        max-height: none;
    }

    .lgc-card__footer {
        gap: 8px;
    }

    .lgc-card__qr {
        width: 48px;
        height: 48px;
        padding: 3px;
    }

    .lgc-card__qr-hint {
        font-size: 9px;
    }
}
