/* ========================================
   金牛奇迹 - 官方公告横幅与倒计时弹窗样式
   ======================================== */

/* 顶部公告横幅 */
.announcement-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: linear-gradient(90deg, 
        #1a1a2e 0%, 
        #2d1b4e 25%, 
        #1a1a2e 50%, 
        #2d1b4e 75%, 
        #1a1a2e 100%);
    background-size: 200% 100%;
    animation: bannerGradient 3s linear infinite;
    border-bottom: 2px solid #C2B59B;
    box-shadow: 0 4px 30px rgba(194, 181, 155, 0.4);
    padding: 12px 0;
    overflow: hidden;
}

@keyframes bannerGradient {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.announcement-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(194, 181, 155, 0.3) 50%, 
        transparent 100%);
    animation: bannerShine 2s ease-in-out infinite;
}

@keyframes bannerShine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.announcement-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
    padding: 0 20px;
}

.announcement-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #C2B59B 0%, #d4c9b3 50%, #a8997d 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: iconPulse 1s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(194, 181, 155, 0.6);
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(194, 181, 155, 0.6); }
    50% { transform: scale(1.1); box-shadow: 0 0 30px rgba(194, 181, 155, 0.9); }
}

.announcement-icon svg {
    width: 24px;
    height: 24px;
    color: #1a1a2e;
}

.announcement-text {
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    text-shadow: 0 0 10px rgba(194, 181, 155, 0.5);
}

.announcement-text .highlight {
    color: #C2B59B;
    font-weight: 700;
    font-size: 1.1rem;
}

.announcement-text .date-highlight {
    color: #ff6b6b;
    font-weight: 700;
    animation: dateBlink 1s ease-in-out infinite;
}

@keyframes dateBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.announcement-close {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #C2B59B;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.announcement-close:hover {
    background: rgba(194, 181, 155, 0.3);
    transform: translateY(-50%) rotate(90deg);
}

.announcement-close svg {
    width: 18px;
    height: 18px;
}

/* 页面内容下移 */
body.has-announcement {
    padding-top: 64px;
}

body.has-announcement #mainNav {
    top: 64px;
}

body.has-announcement .hero-section {
    padding-top: 214px;
}

/* ========================================
   毛玻璃倒计时弹窗
   ======================================== */
.countdown-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.countdown-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.countdown-modal {
    width: 90%;
    max-width: 600px;
    background: linear-gradient(145deg, rgba(30, 30, 40, 0.95) 0%, rgba(20, 20, 30, 0.98) 100%);
    border: 1px solid rgba(194, 181, 155, 0.2);
    border-radius: 20px;
    padding: 35px 30px;
    position: relative;
    transform: scale(0.9) translateY(30px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(194, 181, 155, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.countdown-modal-overlay.active .countdown-modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* 关闭按钮 */
.countdown-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.countdown-modal-close:hover {
    background: rgba(255, 107, 107, 0.2);
    border-color: rgba(255, 107, 107, 0.4);
    color: #ff6b6b;
    transform: rotate(90deg);
}

.countdown-modal-close svg {
    width: 18px;
    height: 18px;
}

/* 弹窗标题 */
.countdown-modal-header {
    text-align: center;
    margin-bottom: 25px;
}

.countdown-modal-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.countdown-modal-title span {
    color: #C2B59B;
}

.countdown-modal-subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.countdown-modal-subtitle .version {
    color: #C2B59B;
    font-weight: 600;
}

/* ========================================
   翻页时钟倒计时
   ======================================== */
.countdown-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 8px;
    margin: 25px 0;
}

.countdown-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 目标时间显示 */
.countdown-target-time {
    color: rgba(194, 181, 155, 0.8);
    font-size: 0.9rem;
    margin-top: 8px;
    letter-spacing: 1px;
}

/* 翻页时钟容器 */
.flip-clock {
    width: 70px;
    height: 90px;
    perspective: 400px;
    position: relative;
}

@media (min-width: 480px) {
    .flip-clock {
        width: 80px;
        height: 100px;
    }
}

@media (min-width: 768px) {
    .flip-clock {
        width: 90px;
        height: 110px;
    }
}

/* 翻页时钟内部 */
.flip-clock-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
}

/* 翻页时钟前后两面 */
.flip-clock-front,
.flip-clock-back {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: linear-gradient(180deg, #2a2a3a 0%, #1f1f2e 100%);
    border: 1px solid rgba(194, 181, 155, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', monospace;
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.5),
        0 4px 15px rgba(0, 0, 0, 0.3);
    backface-visibility: hidden;
    overflow: hidden;
}

@media (min-width: 480px) {
    .flip-clock-front,
    .flip-clock-back {
        font-size: 2rem;
    }
}

@media (min-width: 768px) {
    .flip-clock-front,
    .flip-clock-back {
        font-size: 2.4rem;
    }
}

/* 中间分隔线效果 */
.flip-clock-front::after,
.flip-clock-back::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(0, 0, 0, 0.5) 10%, 
        rgba(0, 0, 0, 0.5) 90%, 
        transparent 100%
    );
    z-index: 2;
}

/* 背面初始状态 */
.flip-clock-back {
    transform: rotateX(180deg);
}

/* 翻页动画 */
.flip-clock-inner.flipping .flip-clock-front {
    animation: flipFront 0.6s ease-in-out forwards;
}

.flip-clock-inner.flipping .flip-clock-back {
    animation: flipBack 0.6s ease-in-out forwards;
}

@keyframes flipFront {
    0% {
        transform: rotateX(0deg);
    }
    100% {
        transform: rotateX(-180deg);
    }
}

@keyframes flipBack {
    0% {
        transform: rotateX(180deg);
    }
    100% {
        transform: rotateX(0deg);
    }
}

/* 旧版兼容 - 普通数字倒计时 */
.countdown-number {
    width: 70px;
    height: 90px;
    background: linear-gradient(180deg, #2a2a3a 0%, #1f1f2e 100%);
    border: 1px solid rgba(194, 181, 155, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', monospace;
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.5),
        0 4px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.countdown-number::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(0, 0, 0, 0.5) 10%, 
        rgba(0, 0, 0, 0.5) 90%, 
        transparent 100%
    );
}

@media (min-width: 480px) {
    .countdown-number {
        width: 80px;
        height: 100px;
        font-size: 2rem;
    }
}

@media (min-width: 768px) {
    .countdown-number {
        width: 90px;
        height: 110px;
        font-size: 2.4rem;
    }
}

/* 时间单位标签 */
.countdown-label {
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* 分隔符 */
.countdown-separator {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 300;
    color: rgba(194, 181, 155, 0.6);
    margin-bottom: 30px;
    animation: separatorPulse 1s ease-in-out infinite;
}

@media (min-width: 768px) {
    .countdown-separator {
        font-size: 2.5rem;
        margin-bottom: 35px;
    }
}

@keyframes separatorPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* 毫秒显示 */
.countdown-milliseconds {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-left: 5px;
}

.ms-display {
    width: 55px;
    height: 45px;
    background: linear-gradient(145deg, #1a1a24 0%, #12121a 100%);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: #ff6b6b;
    text-shadow: 0 0 8px rgba(255, 107, 107, 0.4);
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.5),
        0 0 15px rgba(255, 107, 107, 0.15);
}

@media (min-width: 768px) {
    .ms-display {
        width: 60px;
        height: 50px;
        font-size: 1.2rem;
    }
}

.ms-label {
    margin-top: 10px;
    color: rgba(255, 107, 107, 0.7);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 弹窗底部 */
.countdown-modal-footer {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

.countdown-notice {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    line-height: 1.7;
    margin-bottom: 18px;
}

.countdown-notice .highlight {
    color: #C2B59B;
    font-weight: 600;
}

.countdown-notice .warning {
    color: #ff6b6b;
    font-weight: 600;
}

.countdown-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #C2B59B 0%, #a8997d 100%);
    color: #1a1a2e;
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(194, 181, 155, 0.3);
}

.countdown-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(194, 181, 155, 0.4);
}

.countdown-cta svg {
    width: 18px;
    height: 18px;
}

/* 响应式设计 */
@media (max-width: 767px) {
    .announcement-content {
        gap: 10px;
        padding: 0 50px 0 15px;
    }
    
    .announcement-text {
        font-size: 0.85rem;
        text-align: center;
    }
    
    .announcement-text .highlight,
    .announcement-text .date-highlight {
        font-size: 0.95rem;
    }
    
    .announcement-icon {
        width: 32px;
        height: 32px;
    }
    
    .announcement-icon svg {
        width: 18px;
        height: 18px;
    }
    
    body.has-announcement {
        padding-top: 80px;
    }
    
    body.has-announcement #mainNav {
        top: 80px;
    }
    
    body.has-announcement .hero-section {
        padding-top: 200px;
    }
    
    .countdown-modal {
        padding: 25px 20px;
    }
    
    .countdown-modal-title {
        font-size: 1.3rem;
    }
    
    .countdown-wrapper {
        gap: 6px;
    }
    
    .countdown-number {
        width: 55px;
        height: 70px;
        font-size: 1.5rem;
    }
    
    .countdown-separator {
        font-size: 1.5rem;
        margin-bottom: 25px;
    }
    
    .ms-display {
        width: 45px;
        height: 35px;
        font-size: 0.9rem;
    }
}

/* 隐藏状态 */
.announcement-banner.hidden {
    transform: translateY(-100%);
    opacity: 0;
}

/* 倒计时结束状态 */
.countdown-ended .countdown-modal-title {
    color: #52c41a;
}

.countdown-ended .countdown-wrapper {
    display: none;
}

.countdown-ended-message {
    display: none;
    text-align: center;
    padding: 30px 20px;
}

.countdown-ended .countdown-ended-message {
    display: block;
}

.countdown-ended-message h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    color: #52c41a;
    margin-bottom: 10px;
}

.countdown-ended-message p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
}
