/* Frontend CSS for English Countdown Plugin - Header Menu Style */

.insig-countdown-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    transition: gap 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 滾動時的縮小樣式 */
.insig-countdown-container.scrolled {
    gap: 8px;
}

.insig-countdown-card {
    background: linear-gradient(135deg, #D90632 0%, #B8052A 60%, #A0041F 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 6px 3px;
    color: #ffffff;
    box-shadow:
        0 4px 12px rgba(217, 6, 50, 0.25),
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 90px;
    text-align: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

/* 滾動時卡片縮小 */
.insig-countdown-container.scrolled .insig-countdown-card {
    padding: 4px 2px;
    min-width: 70px;
    border-radius: 6px;
    box-shadow:
        0 2px 8px rgba(217, 6, 50, 0.2),
        0 1px 2px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.insig-countdown-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    opacity: 0.6;
}

.insig-countdown-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    transition: all 0.4s ease;
    opacity: 0;
}

.insig-countdown-card:hover {
    box-shadow:
        0 8px 20px rgba(217, 6, 50, 0.35),
        0 4px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: translateY(-2px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.25);
}

.insig-countdown-card:hover::after {
    opacity: 1;
    top: -30%;
    right: -30%;
}

.countdown-header {
    margin-bottom: 4px;
    transition: margin 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 滾動時 header 縮小 */
.insig-countdown-container.scrolled .countdown-header {
    margin-bottom: 2px;
}

.countdown-title {
    font-size: 11px;
    font-weight: 600;
    margin: 0;
    color: #ffffff;
    line-height: 1.2;
    text-shadow: none;
    position: relative;
    z-index: 3;
    letter-spacing: 0.3px;
    transition: font-size 0.3s cubic-bezier(0.4, 0, 0.2, 1), letter-spacing 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 滾動時標題縮小 */
.insig-countdown-container.scrolled .countdown-title {
    font-size: 9px;
    letter-spacing: 0.2px;
}

.countdown-body {
    text-align: center;
    position: relative;
    z-index: 3;
}

.countdown-prefix {
    font-size: 9px;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 1px;
    text-shadow: none;
    letter-spacing: 0.5px;
    transition: font-size 0.3s cubic-bezier(0.4, 0, 0.2, 1), letter-spacing 0.3s cubic-bezier(0.4, 0, 0.2, 1), margin 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 滾動時隱藏前綴 */
.insig-countdown-container.scrolled .countdown-prefix {
    display: none;
}

.countdown-display {
    margin: 0;
}

.countdown-number {
    font-size: 24px;
    font-weight: 900;
    line-height: 0.8;
    color: #ffffff;
    margin: 1px 0;
    text-shadow: none;
    font-feature-settings: 'tnum';
    letter-spacing: -1px;
    transition: font-size 0.3s cubic-bezier(0.4, 0, 0.2, 1), margin 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 滾動時數字縮小 */
.insig-countdown-container.scrolled .countdown-number {
    font-size: 18px;
    margin: 0;
}

.countdown-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #ffffff;
    margin: 1px 0 0 0;
    text-shadow: none;
    transition: font-size 0.3s cubic-bezier(0.4, 0, 0.2, 1), letter-spacing 0.3s cubic-bezier(0.4, 0, 0.2, 1), margin 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 滾動時隱藏標籤 */
.insig-countdown-container.scrolled .countdown-label {
    display: none;
}

.countdown-date {
    display: none;
}


/* 空狀態樣式 */
.insig-countdown-empty {
    text-align: center;
    padding: 20px;
    color: #D90632;
    font-size: 14px;
    background: rgba(217, 6, 50, 0.05);
    border-radius: 6px;
    border: 1px solid rgba(217, 6, 50, 0.2);
}

/* 響應式設計 - 適應 header menu */
@media (max-width: 768px) {
    .insig-countdown-container {
        gap: 8px;
    }

    .insig-countdown-card {
        min-width: 100px;
        padding: 6px 10px;
    }

    .countdown-title {
        font-size: 11px;
    }

    .countdown-prefix {
        font-size: 9px;
    }

    .countdown-number {
        font-size: 22px;
    }

    .countdown-label {
        font-size: 9px;
    }

}

@media (max-width: 480px) {
    .insig-countdown-card {
        min-width: 80px;
        padding: 4px 8px;
    }

    .countdown-title {
        font-size: 10px;
    }

    .countdown-prefix {
        font-size: 8px;
    }

    .countdown-number {
        font-size: 20px;
    }

    .countdown-label {
        font-size: 8px;
    }
}

/* 動畫效果 */
@keyframes countdownPulse {
    0% {
        transform: scale(1);
        text-shadow:
            0 2px 8px rgba(0, 0, 0, 0.4),
            0 1px 0 rgba(255, 255, 255, 0.2),
            0 0 12px rgba(255, 255, 255, 0.3);
    }
    50% {
        transform: scale(1.08);
        text-shadow:
            0 3px 12px rgba(0, 0, 0, 0.5),
            0 1px 0 rgba(255, 255, 255, 0.3),
            0 0 20px rgba(255, 255, 255, 0.5);
    }
    100% {
        transform: scale(1);
        text-shadow:
            0 2px 8px rgba(0, 0, 0, 0.4),
            0 1px 0 rgba(255, 255, 255, 0.2),
            0 0 12px rgba(255, 255, 255, 0.3);
    }
}

@keyframes shimmer {
    0% { background-position: -100% 0; }
    100% { background-position: 100% 0; }
}

.countdown-number.updating {
    animation: countdownPulse 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.countdown-number::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}