.mom-magic-container {
    text-align: center;
    padding: 50px;
    background: linear-gradient(135deg, #ff9aa2, #cdb4db);
    color: #fff;
}

.mom-magic-container input {
    padding: 12px;
    width: 250px;
    border-radius: 10px;
    border: none;
}

.mom-magic-container button {
    padding: 12px 20px;
    margin-top: 10px;
    border: none;
    background: gold;
    border-radius: 20px;
    cursor: pointer;
    animation: glow 1.5s infinite alternate;
}

@keyframes glow {
    from { box-shadow: 0 0 5px gold; }
    to { box-shadow: 0 0 20px gold; }
}

/* MAGIC VIEW PAGE */
.mom-magic-view {
    position: relative;
    height: 100vh;
    text-align: center;
    background: radial-gradient(circle, #ffe0e9, #cdb4db);
    color: #4a1740;
    overflow: hidden;
}

.magic-bg {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    background: url('/wp-content/plugins/mom-magic-tribute/assets/images/magic-bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    animation: float 10s infinite linear;
    /* Fallback gradient if image doesn't load */
    background-color: #ffe0e9;
}

/* Fallback if image fails to load */
.magic-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(255, 224, 233, 0.8), rgba(205, 180, 219, 0.8));
    pointer-events: none;
}

.mom-magic-view .content {
    position: relative;
    z-index: 2;
    padding: 1px 20px 40px;
}

.gift-overlay {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: grid;
    place-items: center;
    padding: 24px;
    background: radial-gradient(circle, rgba(255, 224, 233, 0.96), rgba(205, 180, 219, 0.96));
    transition: opacity 0.55s ease, visibility 0.55s ease;
}

.gift-overlay.is-opened {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.gift-panel {
    width: min(520px, 100%);
    padding: 34px 28px;
    border: 1px solid rgba(138, 20, 84, 0.24);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 22px 60px rgba(138, 20, 84, 0.22);
}

.gift-kicker {
    margin: 0 0 8px;
    color: #6a1b4d;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.gift-panel h2 {
    margin: 0 0 22px;
    color: #8a1454;
    font-size: clamp(1.8rem, 7vw, 3rem);
    line-height: 1.1;
}

.open-gift-btn {
    min-width: 160px;
    padding: 14px 22px;
    border: 0;
    border-radius: 6px;
    background: #8a1454;
    color: #fff;
    cursor: pointer;
    font-size: 1.05rem;
    font-weight: 800;
    box-shadow: 0 10px 22px rgba(138, 20, 84, 0.24);
}

.open-gift-btn:focus-visible,
.music-toggle:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

.personalized-kicker {
    margin: 56px 0 4px;
    color: #6a1b4d;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.personalized-title {
    margin: 0;
    color: #8a1454;
    font-size: clamp(2.4rem, 8vw, 5.2rem);
    line-height: 1;
    text-shadow: 0 3px 14px rgba(255, 255, 255, 0.75);
}

.mom-dialog {
    width: min(560px, calc(100% - 32px));
    margin: 18px auto 24px;
    padding: 18px 20px;
    border: 1px solid rgba(138, 20, 84, 0.22);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 12px 30px rgba(138, 20, 84, 0.12);
}

.mom-dialog p {
    margin: 0;
}

.mom-dialog-name {
    color: #8a1454;
    font-size: 1.3rem;
    font-weight: 700;
}

.mom-dialog-text {
    margin-top: 6px;
    color: #3d1735;
    font-size: 1rem;
}

@keyframes float {
    from { transform: translateY(0); }
    to { transform: translateY(-50px); }
}

.typewriter {
    margin-top: 100px;
    font-size: 2em;
    animation: fadeIn 2s;
}

.fade-text {
    opacity: 0;
    animation: fadeIn 3s forwards;
}

.fade-text:nth-child(2) { animation-delay: 2s; }
.fade-text:nth-child(3) { animation-delay: 4s; }
.fade-text:nth-child(4) { animation-delay: 6s; }

.final-message {
    margin-top: 20px;
    font-size: 2.5em;
    color: #ff4081;
    animation: pop 2s ease-in-out;
}

@keyframes pop {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

.music-toggle {
    position: fixed;
    z-index: 20;
    top: 14px;
    right: 14px;
    min-width: 112px;
    padding: 10px 14px;
    border: 0;
    border-radius: 6px;
    background: #8a1454;
    color: #fff;
    cursor: pointer;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(138, 20, 84, 0.24);
}

.mom-magic-debug {
    position: fixed;
    left: 12px;
    bottom: 12px;
    z-index: 10;
    max-width: min(560px, calc(100vw - 24px));
    max-height: 40vh;
    overflow: auto;
    padding: 12px;
    border: 1px solid #8a1454;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.95);
    color: #222;
    font-size: 12px;
    line-height: 1.4;
    text-align: left;
    white-space: pre-wrap;
}

.mom-title {
    font-size: 2.5rem;
    margin-top: 20px;
    color: #8a1454;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.7);
}

.line {
    font-size: 1.2rem;
    margin: 10px 0;
    color: #3d1735;
}

.final-block {
    margin-top: 30px;
}

.heart {
    position: absolute;
    bottom: -20px;
    pointer-events: none;
}

canvas#confetti-canvas {
    position: fixed;
    z-index: 1;
    top: 0;
    left: 0;
    pointer-events: none;
}

.replay-btn {
    margin-top: 20px;
    padding: 10px 20px;
    border-radius: 20px;
    background: gold;
    border: none;
    cursor: pointer;
}
