/* Special Day Events - Overlay Container */
#special-day-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

/* Base themed element */
.special-day-element {
    position: fixed;
    cursor: pointer;
    pointer-events: auto;
    font-size: 40px;
    line-height: 1;
    user-select: none;
    transition: transform 0.2s ease;
    opacity: 0.7;
}

.special-day-element:hover {
    transform: scale(1.3);
    opacity: 1;
}

.special-day-element.revealed {
    opacity: 1;
    transform: scale(1.1);
    cursor: default;
}

/* Heart theme */
.special-day-element.heart::before {
    content: "\2764";
    color: #e74c6f;
}

.special-day-element.heart.revealed::before {
    color: #d63384;
}

/* Pumpkin theme */
.special-day-element.pumpkin::before {
    content: "\1F383";
    color: #e67e22;
}

.special-day-element.pumpkin.revealed::before {
    color: #d35400;
}

/* Tooltip / message popup */
.special-day-tooltip {
    position: fixed;
    background: #fff;
    color: #2c2c2c;
    border-radius: 8px;
    padding: 8px 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    max-width: 200px;
    font-size: 14px;
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.4;
    z-index: 1003;
    pointer-events: none;
    animation: tooltipFadeIn 0.3s ease;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Celebration Animation Container */
#celebration-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
    overflow: hidden;
}

/* Base celebration particle */
.celebration-particle {
    position: absolute;
    top: -60px;
    font-size: 28px;
    line-height: 1;
    opacity: 1;
    animation: celebrationFall linear forwards;
}

/* Heart celebration particle */
.celebration-particle.heart::before {
    content: "\2764";
    color: #e74c6f;
}

.celebration-particle.heart:nth-child(odd)::before {
    color: #d63384;
}

.celebration-particle.heart:nth-child(3n)::before {
    color: #ff6b9d;
}

/* Pumpkin celebration particle */
.celebration-particle.pumpkin::before {
    content: "\1F383";
    color: #e67e22;
}

.celebration-particle.pumpkin:nth-child(odd)::before {
    color: #d35400;
}

/* Cake celebration particle */
.celebration-particle.cake::before {
    content: "\1F382";
    color: #c0841f;
}

.celebration-particle.cake:nth-child(odd)::before {
    color: #e6a020;
}

.celebration-particle.cake:nth-child(3n)::before {
    color: #f0c040;
}

/* Birthday cake overlay */
#birthday-cake-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1002;
    pointer-events: auto;
    animation: overlayFadeIn 0.4s ease;
}

@keyframes overlayFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

#birthday-cake-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 220px;
    padding-top: 20px;
}

.candle-row {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: flex-end;
    padding: 0 16px;
    box-sizing: border-box;
    z-index: 2;
}

.candle {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    width: 13px;
}

.candle-flame {
    width: 13px;
    height: 18px;
    background: radial-gradient(ellipse at 50% 70%, #fff176 0%, #ffb300 50%, #ff6f00 100%);
    border-radius: 50% 50% 30% 30% / 60% 60% 40% 40%;
    animation: flicker 0.7s ease-in-out infinite alternate;
    transform-origin: bottom center;
}

@keyframes flicker {
    0%   { transform: scaleX(1) scaleY(1); opacity: 1; }
    33%  { transform: scaleX(0.85) scaleY(1.08); opacity: 0.92; }
    66%  { transform: scaleX(1.1) scaleY(0.95); opacity: 0.97; }
    100% { transform: scaleX(0.9) scaleY(1.05); opacity: 0.88; }
}

.candle.blown .candle-flame {
    visibility: hidden;
}

.candle-stick {
    width: 13px;
    height: 32px;
    background: linear-gradient(to bottom, #f5d76e, #e8c04a);
    border-radius: 3px 3px 2px 2px;
    flex-shrink: 0;
}

.candle-smoke {
    position: fixed;
    width: 8px;
    height: 20px;
    background: radial-gradient(ellipse, rgba(180,180,180,0.7) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1003;
    animation: smokeRise 0.9s ease-out forwards;
}

@keyframes smokeRise {
    0%   { opacity: 0.8; transform: translateY(0) scaleX(1); }
    100% { opacity: 0;   transform: translateY(-28px) scaleX(2.5); }
}

#birthday-cake-svg {
    display: block;
}

@keyframes celebrationFall {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        transform: translateY(110vh) translateX(var(--drift, 30px)) rotate(var(--rotation, 360deg));
        opacity: 0;
    }
}

/* Responsive scaling */
@media (max-width: 768px) {
    .special-day-element {
        font-size: 30px;
    }

    .special-day-tooltip {
        max-width: 160px;
        font-size: 13px;
        padding: 6px 10px;
    }

    .celebration-particle {
        font-size: 22px;
    }
}
