/* Final Result / Preview */
.result-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.canvas-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    overflow: hidden;
    position: relative;
    border-radius: var(--radius-lg);
    /* box-shadow: var(--shadow-lg); */
    margin-bottom: 2.5rem;
    background: var(--white);
}

.canvas-preview {
    width: 420px;
    height: 525px; /* exactly 420 * 5/4 */
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: var(--white);
    color: var(--navy);
    text-align: center;
    transform-origin: top left;
}

.canvas-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background-size: cover;
    background-position: center;
    border-radius: var(--radius-lg);
    transition: background 0.5s ease;
}

.canvas-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.canvas-header {
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 3px;
    padding: 2.5em;
    margin-bottom: auto;
    opacity: 0.9;
    font-weight: 600;
}

.canvas-main-content {
    padding: 0 2.5em 2.5em 2.5em;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    color: var(--navy);
    text-align: center;
}

.canvas-body {
    margin: auto 0;
}

.canvas-title {
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.canvas-quote {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    font-style: italic;
    line-height: 1.6;
    padding: 0 1rem;
}

.canvas-footer {
    margin-top: auto;
    font-size: 0.95rem;
    opacity: 0.9;
}

.canvas-sender {
    font-weight: 700;
    font-size: 1.2rem;
    margin-top: 0.35rem;
    opacity: 1;
}

.confetti {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 10;
    display: none;
}

/* Dynamic classes applied to canvas */
.text-dark {
    color: var(--navy);
}

.text-light {
    color: var(--white) !important;
}

/* Legacy gradients fallback */
.grad-1 { background: linear-gradient(135deg, #15215D 0%, #2A3B8C 100%); }
.grad-2 { background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%); }
.grad-3 { background: linear-gradient(135deg, #42C4E7 0%, #15215D 100%); }
.grad-4 { background: linear-gradient(135deg, #F2EA4B 0%, #E5A93D 100%); }
.grad-5 { background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%); }
.grad-7 { background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%); }
.grad-8 { background: linear-gradient(135deg, #fefce8 0%, #fef08a 100%); }
.grad-9 { background: #FFFFFF; border: 1px solid var(--gray-200); }

/* Mobile preview adjustments */
@media (max-width: 639px) {
    .canvas-preview {
        padding: 1.5rem 1rem;
    }

    .canvas-title {
        font-size: 1.75rem;
    }
}
