* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ========== 下雪特效 ========== */
.snowflake {
    position: fixed;
    top: -50px;
    z-index: 9999;
    user-select: none;
    cursor: default;
    animation-name: snowfall;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1em;
    pointer-events: none;
    --drift: 0px;
}

@keyframes snowfall {
    0% {
        transform: translate3d(0, -50px, 0) rotateZ(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translate3d(var(--drift), 100vh, 0) rotateZ(360deg);
        opacity: 0;
    }
}

/* ========== 超炸裂閃爍背景 ========== */
@keyframes bodySeizure {
    0% { background: #ff0000; filter: brightness(2) contrast(2); }
    12.5% { background: #00ff00; filter: brightness(2) contrast(2); }
    25% { background: #0000ff; filter: brightness(2) contrast(2); }
    37.5% { background: #ffff00; filter: brightness(2) contrast(2); }
    50% { background: #ff00ff; filter: brightness(2) contrast(2); }
    62.5% { background: #00ffff; filter: brightness(2) contrast(2); }
    75% { background: #ffffff; filter: brightness(3) contrast(3); }
    87.5% { background: #ff0000; filter: brightness(2) contrast(2); }
    100% { background: #00ff00; filter: brightness(2) contrast(2); }
}

body {
    animation: bodySeizure 0.15s infinite;
    position: relative;
    will-change: background, filter;
}

/* ========== 發光效果 ========== */
.glow {
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(168, 85, 247, 0.5), 0 0 40px rgba(236, 72, 153, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(168, 85, 247, 0.8), 0 0 60px rgba(236, 72, 153, 0.5);
    }
}

/* ========== 霓虹文字效果 ========== */
.neon-text {
    text-shadow: 
        0 0 10px rgba(168, 85, 247, 0.8),
        0 0 20px rgba(168, 85, 247, 0.6),
        0 0 30px rgba(168, 85, 247, 0.4),
        0 0 40px rgba(236, 72, 153, 0.4);
    animation: neonFlicker 3s infinite;
}

@keyframes neonFlicker {
    0%, 100% { opacity: 1; }
    41%, 43%, 45%, 47%, 49% { opacity: 0.95; }
    42%, 44%, 46%, 48% { opacity: 0.85; }
}

/* ========== 掃描線效果 ========== */
.scanline {
    position: relative;
    overflow: hidden;
}

.scanline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(168, 85, 247, 0.1) 50%,
        transparent 100%
    );
    animation: scan 3s linear infinite;
    pointer-events: none;
}

@keyframes scan {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

/* ========== 脈搏動畫 ========== */
.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* ========== 滾動條樣式 ========== */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.5);
    border-left: 1px solid rgba(168, 85, 247, 0.2);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #a855f7, #ec4899);
    border-radius: 6px;
    border: 2px solid rgba(0, 0, 0, 0.5);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #9333ea, #db2777);
}

/* ========== 頁面載入動畫 ========== */
.animate-in {
    animation: pageLoad 0.8s ease-out forwards;
    opacity: 0;
}

@keyframes pageLoad {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ========== 漸入動畫 ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* ========== 滑入動畫 ========== */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-up {
    animation: slideInUp 0.8s ease-out;
}

/* ========== 旋轉動畫 ========== */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spin {
    animation: spin 2s linear infinite;
}

/* ========== 數據流效果 ========== */
.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.03;
    z-index: 0;
}

/* ========== 邊框發光動畫 ========== */
.border-glow {
    position: relative;
    border: 2px solid transparent;
    background: 
        linear-gradient(rgba(17, 24, 39, 0.95), rgba(17, 24, 39, 0.95)) padding-box,
        linear-gradient(45deg, #a855f7, #ec4899, #a855f7) border-box;
    animation: borderRotate 3s linear infinite;
}

@keyframes borderRotate {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

/* ========== 懸浮卡片效果 ========== */
.hover-card {
    transition: all 0.3s ease;
}

.hover-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(168, 85, 247, 0.3),
        0 0 60px rgba(236, 72, 153, 0.2);
}

button {
    transition: all 0.3s ease;
}

button:active {
    transform: scale(0.95);
}

/* Link styles */
a {
    text-decoration: none;
    color: inherit;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    nav .space-x-6 {
        gap: 1rem;
    }
    
    .text-6xl {
        font-size: 3rem;
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
}

/* ========== 致死量特效動畫 ========== */
@keyframes blob {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(20px, -50px) scale(1.1);
    }
    50% {
        transform: translate(-20px, 20px) scale(0.9);
    }
    75% {
        transform: translate(50px, 50px) scale(1.05);
    }
}

.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* 超強發光效果 */
@keyframes mega-glow {
    0%, 100% {
        box-shadow: 
            0 0 20px rgba(255, 215, 0, 0.8),
            0 0 40px rgba(255, 215, 0, 0.6),
            0 0 60px rgba(255, 215, 0, 0.4),
            0 0 80px rgba(255, 215, 0, 0.2);
    }
    50% {
        box-shadow: 
            0 0 40px rgba(255, 215, 0, 1),
            0 0 80px rgba(255, 215, 0, 0.8),
            0 0 120px rgba(255, 215, 0, 0.6),
            0 0 160px rgba(255, 215, 0, 0.4);
    }
}

/* 彩虹文字效果 */
@keyframes rainbow {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

.rainbow-text {
    animation: rainbow 3s linear infinite;
}

/* ========== 超炸裂全局閃爍 ========== */
/* 導航欄炸裂閃爍 */
@keyframes navFlash {
    0% { background: #ff0000; border-color: #00ff00; box-shadow: 0 0 50px #ff0000; }
    20% { background: #00ff00; border-color: #0000ff; box-shadow: 0 0 50px #00ff00; }
    40% { background: #0000ff; border-color: #ffff00; box-shadow: 0 0 50px #0000ff; }
    60% { background: #ffff00; border-color: #ff00ff; box-shadow: 0 0 50px #ffff00; }
    80% { background: #ff00ff; border-color: #00ffff; box-shadow: 0 0 50px #ff00ff; }
    100% { background: #ff0000; border-color: #00ff00; box-shadow: 0 0 50px #ff0000; }
}

nav {
    animation: navFlash 0.2s infinite;
    will-change: background, border-color, box-shadow;
}

/* 卡片炸裂閃爍 */
@keyframes cardFlash {
    0% { background: rgba(255, 0, 0, 0.8); border-color: #00ff00; box-shadow: 0 0 30px #ff0000, inset 0 0 30px #ff0000; }
    20% { background: rgba(0, 255, 0, 0.8); border-color: #0000ff; box-shadow: 0 0 30px #00ff00, inset 0 0 30px #00ff00; }
    40% { background: rgba(0, 0, 255, 0.8); border-color: #ffff00; box-shadow: 0 0 30px #0000ff, inset 0 0 30px #0000ff; }
    60% { background: rgba(255, 255, 0, 0.8); border-color: #ff00ff; box-shadow: 0 0 30px #ffff00, inset 0 0 30px #ffff00; }
    80% { background: rgba(255, 0, 255, 0.8); border-color: #00ffff; box-shadow: 0 0 30px #ff00ff, inset 0 0 30px #ff00ff; }
    100% { background: rgba(255, 0, 0, 0.8); border-color: #00ff00; box-shadow: 0 0 30px #ff0000, inset 0 0 30px #ff0000; }
}

.bg-white\/10, .bg-white\/5, section, div[class*="bg-"] {
    animation: cardFlash 0.2s infinite !important;
    will-change: background, border-color, box-shadow;
}

/* 文字炸裂閃爍 */
@keyframes textFlash {
    0% { color: #ff0000; text-shadow: 0 0 20px #ff0000, 0 0 40px #ff0000, 0 0 60px #ff0000; }
    16% { color: #00ff00; text-shadow: 0 0 20px #00ff00, 0 0 40px #00ff00, 0 0 60px #00ff00; }
    33% { color: #0000ff; text-shadow: 0 0 20px #0000ff, 0 0 40px #0000ff, 0 0 60px #0000ff; }
    50% { color: #ffff00; text-shadow: 0 0 20px #ffff00, 0 0 40px #ffff00, 0 0 60px #ffff00; }
    66% { color: #ff00ff; text-shadow: 0 0 20px #ff00ff, 0 0 40px #ff00ff, 0 0 60px #ff00ff; }
    83% { color: #00ffff; text-shadow: 0 0 20px #00ffff, 0 0 40px #00ffff, 0 0 60px #00ffff; }
    100% { color: #ff0000; text-shadow: 0 0 20px #ff0000, 0 0 40px #ff0000, 0 0 60px #ff0000; }
}

h1, h2, h3, h4, h5, h6, p, span, a {
    animation: textFlash 0.2s infinite;
    will-change: color, text-shadow;
}

/* 按鈕炸裂閃爍 */
@keyframes buttonFlash {
    0% { background: #ff0000; border-color: #00ff00; box-shadow: 0 0 40px #ff0000, 0 0 80px #ff0000; transform: scale(1); }
    16% { background: #00ff00; border-color: #0000ff; box-shadow: 0 0 40px #00ff00, 0 0 80px #00ff00; transform: scale(1.05); }
    33% { background: #0000ff; border-color: #ffff00; box-shadow: 0 0 40px #0000ff, 0 0 80px #0000ff; transform: scale(0.95); }
    50% { background: #ffff00; border-color: #ff00ff; box-shadow: 0 0 40px #ffff00, 0 0 80px #ffff00; transform: scale(1.03); }
    66% { background: #ff00ff; border-color: #00ffff; box-shadow: 0 0 40px #ff00ff, 0 0 80px #ff00ff; transform: scale(0.97); }
    83% { background: #00ffff; border-color: #ffffff; box-shadow: 0 0 40px #00ffff, 0 0 80px #00ffff; transform: scale(1.02); }
    100% { background: #ff0000; border-color: #00ff00; box-shadow: 0 0 40px #ff0000, 0 0 80px #ff0000; transform: scale(1); }
}

button, a[class*="bg-gradient"], a[href*="download"] {
    animation: buttonFlash 0.15s infinite !important;
    will-change: background, border-color, box-shadow, transform;
}


/* ========== 超震撼紅藍閃爍效果 ========== */
@keyframes redBlueFlash {
    0%, 100% {
        background: radial-gradient(circle at center, rgba(255, 0, 0, 0.4) 0%, transparent 70%);
    }
    25% {
        background: radial-gradient(circle at center, rgba(255, 0, 0, 0.8) 0%, transparent 70%);
    }
    50% {
        background: radial-gradient(circle at center, rgba(0, 0, 255, 0.8) 0%, transparent 70%);
    }
    75% {
        background: radial-gradient(circle at center, rgba(0, 0, 255, 0.4) 0%, transparent 70%);
    }
}

#flashBg {
    animation: redBlueFlash 0.5s infinite;
}

/* 超大數字震撼效果 */
@keyframes megaShake {
    0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
    10% { transform: translate(-10px, -10px) rotate(-2deg) scale(1.05); }
    20% { transform: translate(10px, 10px) rotate(2deg) scale(0.95); }
    30% { transform: translate(-10px, 10px) rotate(-1deg) scale(1.02); }
    40% { transform: translate(10px, -10px) rotate(1deg) scale(0.98); }
    50% { transform: translate(-5px, -5px) rotate(-0.5deg) scale(1.03); }
    60% { transform: translate(5px, 5px) rotate(0.5deg) scale(0.97); }
    70% { transform: translate(-5px, 5px) rotate(-0.3deg) scale(1.01); }
    80% { transform: translate(5px, -5px) rotate(0.3deg) scale(0.99); }
    90% { transform: translate(-2px, -2px) rotate(-0.1deg) scale(1.01); }
}

#megaCountdown {
    animation: megaShake 2s infinite;
}

/* 數字顏色變化 */
@keyframes colorShift {
    0%, 100% {
        filter: hue-rotate(0deg) brightness(1.5) saturate(2);
    }
    50% {
        filter: hue-rotate(180deg) brightness(2) saturate(3);
    }
}

#megaMinutesMain, #megaSecondsMain {
    animation: colorShift 1s infinite, pulse 0.5s infinite;
}

/* ========== 致死量癲癇閃爍效果 ========== */
@keyframes seizureFlash {
    0% { background: #ff0000; }
    10% { background: #00ff00; }
    20% { background: #0000ff; }
    30% { background: #ffff00; }
    40% { background: #ff00ff; }
    50% { background: #00ffff; }
    60% { background: #ffffff; }
    70% { background: #ff0000; }
    80% { background: #00ff00; }
    90% { background: #0000ff; }
    100% { background: #ffff00; }
}

#seizureFlash {
    animation: seizureFlash 0.1s infinite;
    opacity: 0.3;
}

/* 超大文字閃爍 */
@keyframes textSeizure {
    0% { color: #ff0000; transform: scale(1) rotate(0deg); }
    10% { color: #00ff00; transform: scale(1.1) rotate(5deg); }
    20% { color: #0000ff; transform: scale(0.9) rotate(-5deg); }
    30% { color: #ffff00; transform: scale(1.05) rotate(3deg); }
    40% { color: #ff00ff; transform: scale(0.95) rotate(-3deg); }
    50% { color: #00ffff; transform: scale(1.1) rotate(5deg); }
    60% { color: #ffffff; transform: scale(0.9) rotate(-5deg); }
    70% { color: #ff0000; transform: scale(1.05) rotate(3deg); }
    80% { color: #00ff00; transform: scale(0.95) rotate(-3deg); }
    90% { color: #0000ff; transform: scale(1.1) rotate(5deg); }
    100% { color: #ffff00; transform: scale(1) rotate(0deg); }
}

#megaFreeText {
    animation: textSeizure 0.15s infinite;
}

/* 閃爍盒子 */
@keyframes boxFlash1 {
    0%, 100% { background: #ff0000; border-color: #00ff00; color: #ffff00; }
    50% { background: #00ff00; border-color: #ff0000; color: #0000ff; }
}

@keyframes boxFlash2 {
    0%, 100% { background: #0000ff; border-color: #ffff00; color: #ff00ff; }
    50% { background: #ffff00; border-color: #0000ff; color: #00ff00; }
}

@keyframes boxFlash3 {
    0%, 100% { background: #ff00ff; border-color: #00ffff; color: #ff0000; }
    50% { background: #00ffff; border-color: #ff00ff; color: #00ff00; }
}

#flashBox1 {
    animation: boxFlash1 0.2s infinite;
}

#flashBox2 {
    animation: boxFlash2 0.2s infinite;
}

#flashBox3 {
    animation: boxFlash3 0.2s infinite;
}

/* 超大按鈕閃爍 */
@keyframes btnSeizure {
    0% { background: linear-gradient(45deg, #ff0000, #00ff00); color: #ffff00; border-color: #0000ff; }
    25% { background: linear-gradient(45deg, #0000ff, #ffff00); color: #ff00ff; border-color: #00ff00; }
    50% { background: linear-gradient(45deg, #ff00ff, #00ffff); color: #ff0000; border-color: #ffff00; }
    75% { background: linear-gradient(45deg, #00ffff, #ff0000); color: #00ff00; border-color: #ff00ff; }
    100% { background: linear-gradient(45deg, #ff0000, #00ff00); color: #ffff00; border-color: #0000ff; }
}

#megaDownloadBtn {
    animation: btnSeizure 0.15s infinite;
}

/* 警告文字閃爍 */
@keyframes warningFlash {
    0%, 100% { color: #ff0000; text-shadow: 0 0 50px #ff0000; }
    20% { color: #00ff00; text-shadow: 0 0 50px #00ff00; }
    40% { color: #0000ff; text-shadow: 0 0 50px #0000ff; }
    60% { color: #ffff00; text-shadow: 0 0 50px #ffff00; }
    80% { color: #ff00ff; text-shadow: 0 0 50px #ff00ff; }
}

#flashWarning {
    animation: warningFlash 0.1s infinite;
}
