/* Birthday Countdown */

/* ---------- Live countdown display ---------- */

.bcd-wrapper {
    max-width: 680px;
    margin: 0 auto 24px;
    text-align: center;
    padding: 30px 15px 20px;
}

.bcd-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.bcd-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.bcd-number {
    font-size: 64px;
    font-weight: 700;
    color: #052c65;
    font-family: 'Courier New', monospace;
    line-height: 1;
    min-width: 96px;
    text-align: center;
}

[data-bs-theme="dark"] .bcd-number {
    color: #64b5f6;
}

.bcd-separator {
    font-size: 54px;
    font-weight: 700;
    color: #052c65;
    opacity: 0.5;
    margin-top: -22px;
}

[data-bs-theme="dark"] .bcd-separator {
    color: #64b5f6;
}

.bcd-text {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #6c757d;
    font-weight: 600;
}

.bcd-status {
    padding: 10px 26px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 15px;
    background: #e3f2fd;
    color: #1976d2;
    display: inline-block;
}

.bcd-status.celebrating {
    background: #fce4ec;
    color: #c2185b;
    animation: bcd-pulse 0.6s ease 4;
}

[data-bs-theme="dark"] .bcd-status {
    background: #1e3a5f;
    color: #64b5f6;
}

[data-bs-theme="dark"] .bcd-status.celebrating {
    background: #5c2440;
    color: #f48fb1;
}

@keyframes bcd-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.bcd-info {
    margin-top: 12px;
    font-size: 17px;
    font-weight: 600;
    color: #052c65;
}

[data-bs-theme="dark"] .bcd-info {
    color: #90caf9;
}

.bcd-progress-wrap {
    max-width: 420px;
    margin: 16px auto 0;
}

.bcd-progress {
    height: 8px;
    border-radius: 4px;
    background: #e9ecef;
    overflow: hidden;
}

[data-bs-theme="dark"] .bcd-progress {
    background: #343a40;
}

.bcd-progress-bar {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, #1976d2, #e91e8c);
    transition: width 0.6s ease;
}

.bcd-progress-text {
    margin-top: 6px;
    font-size: 12px;
    color: #6c757d;
}

/* ---------- Photo preview ---------- */

.bcd-photo-preview {
    position: relative;
    display: inline-block;
}

.bcd-photo-preview img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #dee2e6;
}

.bcd-photo-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 50%;
    background: #dc3545;
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* ---------- Fullscreen countdown mode ---------- */

.bcd-wrapper.bcd-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    max-width: none;
    margin: 0;
    padding: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(180deg, #0b1026 0%, #1a1f4b 60%, #2b1a4b 100%);
    overflow: hidden;
}

.bcd-wrapper.bcd-fullscreen .bcd-number {
    font-size: 120px;
    min-width: 180px;
    color: #ffd54f;
    text-shadow: 0 0 30px rgba(255, 213, 79, 0.35);
}

.bcd-wrapper.bcd-fullscreen .bcd-separator {
    font-size: 100px;
    color: #ffd54f;
    margin-top: -28px;
}

.bcd-wrapper.bcd-fullscreen .bcd-text {
    font-size: 16px;
    letter-spacing: 3px;
    color: #b8c1ec;
}

.bcd-wrapper.bcd-fullscreen .bcd-status {
    font-size: 20px;
    padding: 14px 40px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.bcd-wrapper.bcd-fullscreen .bcd-info {
    font-size: 24px;
    color: #fff;
}

.bcd-wrapper.bcd-fullscreen .bcd-progress {
    background: rgba(255, 255, 255, 0.15);
}

.bcd-wrapper.bcd-fullscreen .bcd-progress-text {
    color: #b8c1ec;
}

/* ---------- Clock-only fullscreen mode (no text at all) ---------- */

.bcd-wrapper.bcd-fullscreen.bcd-minimal .bcd-text,
.bcd-wrapper.bcd-fullscreen.bcd-minimal .bcd-status,
.bcd-wrapper.bcd-fullscreen.bcd-minimal .bcd-info,
.bcd-wrapper.bcd-fullscreen.bcd-minimal .bcd-progress-wrap {
    display: none;
}

/* Under 24h left, drop the days block so it reads 23:59:58 */
.bcd-wrapper.bcd-fullscreen.bcd-minimal.bcd-zero-days #bcdDaysBlock,
.bcd-wrapper.bcd-fullscreen.bcd-minimal.bcd-zero-days #bcdSep1 {
    display: none;
}

.bcd-wrapper.bcd-fullscreen.bcd-minimal .bcd-number {
    font-size: clamp(44px, 11vw, 160px);
    min-width: clamp(66px, 16vw, 240px);
}

.bcd-wrapper.bcd-fullscreen.bcd-minimal .bcd-separator {
    font-size: clamp(36px, 9vw, 130px);
    margin-top: 0;
}

/* ---------- Landscape rotation on portrait screens ---------- */

@media (orientation: portrait) {
    .bcd-wrapper.bcd-fullscreen.bcd-rotate,
    .bcd-overlay.bcd-rotate {
        width: 100vh;
        height: 100vw;
        top: calc((100vh - 100vw) / 2);
        left: calc((100vw - 100vh) / 2);
        transform: rotate(90deg);
        transform-origin: center center;
    }

    .bcd-wrapper.bcd-fullscreen.bcd-rotate .bcd-number {
        font-size: 12vh;
        min-width: 18vh;
    }

    .bcd-wrapper.bcd-fullscreen.bcd-rotate .bcd-separator {
        font-size: 10vh;
        margin-top: -3vh;
    }

    .bcd-wrapper.bcd-fullscreen.bcd-rotate .bcd-text {
        font-size: 1.8vh;
    }

    .bcd-wrapper.bcd-fullscreen.bcd-rotate.bcd-minimal .bcd-number {
        font-size: 16vh;
        min-width: 23vh;
    }

    .bcd-wrapper.bcd-fullscreen.bcd-rotate.bcd-minimal .bcd-separator {
        font-size: 13vh;
        margin-top: 0;
    }

    .bcd-overlay.bcd-rotate .bcd-overlay-message {
        font-size: 6vh;
    }

    .bcd-overlay.bcd-rotate .bcd-overlay-photo img {
        width: 20vh;
        height: 20vh;
    }
}

/* ---------- Celebration overlay ---------- */

.bcd-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    background: linear-gradient(180deg, #0b1026 0%, #141a3d 55%, #2b1a4b 100%);
    overflow: hidden;
    cursor: pointer;
}

.bcd-overlay canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.bcd-overlay-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    pointer-events: none;
}

.bcd-overlay-photo img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #ffd54f;
    box-shadow: 0 0 40px rgba(255, 213, 79, 0.5);
    margin-bottom: 24px;
    animation: bcd-photo-pop 1s ease;
}

@keyframes bcd-photo-pop {
    0% { transform: scale(0); opacity: 0; }
    70% { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

.bcd-overlay-message {
    font-size: 42px;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6), 0 0 40px rgba(255, 213, 79, 0.35);
    max-width: 90vw;
    line-height: 1.25;
    animation: bcd-msg-in 1.2s ease;
}

@keyframes bcd-msg-in {
    0% { transform: translateY(30px) scale(0.8); opacity: 0; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

.bcd-overlay-exit {
    position: fixed;
    top: 18px;
    right: 18px;
    width: 46px;
    height: 46px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 30px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.bcd-overlay-exit:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ---------- Responsive ---------- */

@media (max-width: 768px) {
    .bcd-display {
        gap: 10px;
    }
    .bcd-number {
        font-size: 44px;
        min-width: 68px;
    }
    .bcd-separator {
        font-size: 36px;
        margin-top: -16px;
    }
    .bcd-text {
        font-size: 10px;
        letter-spacing: 1.5px;
    }
    .bcd-overlay-message {
        font-size: 30px;
    }
    .bcd-overlay-photo img {
        width: 110px;
        height: 110px;
    }
    .bcd-wrapper.bcd-fullscreen .bcd-number {
        font-size: 64px;
        min-width: 96px;
    }
    .bcd-wrapper.bcd-fullscreen .bcd-separator {
        font-size: 52px;
        margin-top: -18px;
    }
    .bcd-wrapper.bcd-fullscreen .bcd-text {
        font-size: 12px;
    }
    .bcd-wrapper.bcd-fullscreen .bcd-info {
        font-size: 18px;
    }
}

@media (max-width: 420px) {
    .bcd-display {
        gap: 6px;
    }
    .bcd-number {
        font-size: 34px;
        min-width: 54px;
    }
    .bcd-separator {
        font-size: 28px;
        margin-top: -12px;
    }
    .bcd-status {
        font-size: 12px;
        padding: 8px 18px;
    }
    .bcd-overlay-message {
        font-size: 24px;
    }
    .bcd-wrapper.bcd-fullscreen .bcd-number {
        font-size: 48px;
        min-width: 74px;
    }
    .bcd-wrapper.bcd-fullscreen .bcd-separator {
        font-size: 38px;
        margin-top: -12px;
    }
}
