/* --- Overlay + Box --- */
.mdlrecap-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.mdlrecap-box {
    background: #fff;
    padding: 24px;
    border-radius: 14px;
    max-width: 640px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 6px 28px rgba(0,0,0,0.4);
    animation: fadeIn 0.5s ease;
    font-family: "Segoe UI", sans-serif;
}

/* --- Titles --- */
#mdlrecap-title {
    text-align: center;
    font-size: 1.6rem;
    font-weight: bold;
    color: #2e3b55;
    margin-bottom: 0.25rem;
    letter-spacing: 0.5px;
}

#mdlrecap-subtitle {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 500;
    color: #546e7a;
    margin-bottom: 1rem;
}

/* --- Stylish HR --- */
.mdlrecap-box hr {
    border: none;
    height: 2px;
    background: linear-gradient(to right, transparent, #90caf9, transparent);
    margin: 1rem 0;
}

/* --- Body --- */
.mdlrecap-body {
    white-space: pre-line;
    line-height: 1.6;
    color: #37474f;
    margin-bottom: 0.5rem;
}

/* --- Status --- */
.mdlrecap-status {
    text-align: center;
    font-style: italic;
    margin-top: 0.5rem;
    color: #78909c;
}

/* --- Footer Note --- */
.mdlrecap-footer small {
    color: #999;
}

/* --- Incentive Box (with gift animation) --- */
.mdlrecap-pro3d {
    margin-top: 1.5rem;
    padding: 16px;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.6;
    background: linear-gradient(135deg, #e0f7fa, #ffffff);
    border: 2px solid #00acc1;
    text-align: center;
    color: #004d40;
    animation: fadeIn 0.8s ease;
    position: relative;
}

/* Gift box wrapper */
.gift-box {
    display: inline-block;
    width: 44px;
    height: 44px;
    margin-right: 10px;
    vertical-align: middle;
    position: relative;
    animation: bounceIn 0.9s ease;
}

/* Box body */
.gift-box .box {
    width: 100%;
    height: 70%;
    background: #ff7043;
    position: absolute;
    bottom: 0;
    border-radius: 4px;
    animation: glowPulse 3s ease-in-out infinite;
}

/* Box lid (slower opening) */
.gift-box .lid {
    width: 110%;
    height: 40%;
    background: #d84315;
    position: absolute;
    top: 0;
    left: -5%;
    border-radius: 4px 4px 0 0;
    transform-origin: bottom center;
    animation: lidOpen 3s ease forwards;
}

/* Ribbon */
.gift-box .ribbon {
    position: absolute;
    top: 0;
    left: 50%;
    width: 6px;
    height: 100%;
    background: #fff176;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* Sparkles */
.gift-box .sparkle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #ffd600;
    border-radius: 50%;
    opacity: 0;
    animation: sparkleBurst 2s ease infinite;
}

.gift-box .sparkle:nth-child(4) { top: -10px; left: 10px; animation-delay: 0.4s; }
.gift-box .sparkle:nth-child(5) { top: -15px; left: 20px; animation-delay: 1.2s; }
.gift-box .sparkle:nth-child(6) { top: -20px; left: 0px;  animation-delay: 2s; }
.gift-box .sparkle:nth-child(7) { top: -10px; left: -10px; animation-delay: 2.8s; }
.gift-box .sparkle:nth-child(8) { top: -25px; left: 15px; animation-delay: 3.6s; }

/* Incentive link */
.mdlrecap-pro3d a {
    font-weight: bold;
    color: #00796b;
    text-decoration: none;
    border-bottom: 2px dashed #00bfa5;
    transition: color 0.3s, border-color 0.3s;
}
.mdlrecap-pro3d a:hover {
    color: #004d40;
    border-color: #004d40;
}

/* --- Dark theme --- */
[data-theme="dark"] .mdlrecap-box {
    background: #1a1a1a;
    color: #ccc;
    box-shadow: 0 6px 28px rgba(0,0,0,0.8);
}
[data-theme="dark"] #mdlrecap-title {
    color: #90caf9;
}
[data-theme="dark"] #mdlrecap-subtitle {
    color: #b0bec5;
}
[data-theme="dark"] .mdlrecap-box hr {
    background: linear-gradient(to right, transparent, #4db6ac, transparent);
}
[data-theme="dark"] .mdlrecap-body {
    color: #e0e0e0;
}
[data-theme="dark"] .mdlrecap-status {
    color: #9e9e9e;
}
[data-theme="dark"] .mdlrecap-footer small {
    color: #777;
}
[data-theme="dark"] .mdlrecap-pro3d {
    background: linear-gradient(135deg, rgba(0,150,136,0.25), rgba(0,150,136,0.05));
    border: 2px solid #00e676;
    color: #c8e6c9;
}
[data-theme="dark"] .mdlrecap-pro3d a {
    color: #80cbc4;
    border-color: #4db6ac;
}
[data-theme="dark"] .mdlrecap-pro3d a:hover {
    color: #00e676;
    border-color: #00e676;
}

/* --- Animations --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes bounceIn {
    0%   { transform: scale(0.5); opacity: 0; }
    60%  { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); }
}
@keyframes lidOpen {
    0%   { transform: rotate(0); }
    30%  { transform: rotate(-10deg); }
    60%  { transform: rotate(-25deg); }
    100% { transform: rotate(-35deg); }
}
@keyframes sparkleBurst {
    0%   { opacity: 0; transform: scale(0.5) translateY(0); }
    30%  { opacity: 1; transform: scale(1.2) translateY(-15px); }
    60%  { opacity: 0; transform: scale(0.3) translateY(-30px); }
    100% { opacity: 0; }
}
@keyframes glowPulse {
    0%   { box-shadow: 0 0 0px rgba(255, 255, 0, 0.4); }
    50%  { box-shadow: 0 0 15px rgba(255, 255, 0, 0.8); }
    100% { box-shadow: 0 0 0px rgba(255, 255, 0, 0.4); }
}

/* Flex wrapper for gift + text */
.mdlrecap-setter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px; /* space between box and text */
    text-align: left;
}

/* Keep giftbox sized and centered */
.giftbox-wrap {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Scale gift box slightly smaller */
.gift-box {
    transform: scale(0.9);
}

/* Text styles */
.pro3d-text {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #004d40;
}

/* Dark mode text */
[data-theme="dark"] .pro3d-text {
    color: #c8e6c9;
}

