/* ═══════════════════════════════════════════════════════
   themes.css — 如帆科技 主题装饰样式
   节日装饰动画 + 哀悼特殊样式 + 主题过渡
   ═══════════════════════════════════════════════════════ */

/* ── 全局主题过渡 ── */
body,
.navbar,
.btn-outline,
.btn-primary,
.card-icon-wrap,
.orb-ring,
.orb-center,
.step-number,
.toast,
.platform-card,
.sol-item,
.case-card,
.file-card {
    transition: background 0.6s ease, border-color 0.6s ease, color 0.6s ease,
                box-shadow 0.6s ease, background-color 0.6s ease;
}

/* ── 装饰层通用 ── */
#decorations {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.decoration-layer {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
}

/* ── 哀悼模式 ── */
.theme-mourning body,
.theme-mourning img,
.theme-mourning svg,
.theme-mourning video,
.theme-mourning .logo,
.theme-mourning .hero-visual,
.theme-mourning .orb-center i,
.theme-mourning canvas {
    filter: grayscale(100%) !important;
    opacity: 0.8 !important;
}
.theme-mourning .hero-content h1,
.theme-mourning .section-title,
.theme-mourning .page-hero h1 {
    background: linear-gradient(135deg, #999 0%, #666 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
}
.theme-mourning .btn-primary {
    background: linear-gradient(110deg, #555, #777) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
}

/* ── 飘雪（圣诞节/冬季） ── */
.snow-flake {
    position: absolute;
    top: -10px;
    background: white;
    border-radius: 50%;
    animation: snowfall linear infinite;
    will-change: transform;
}
@keyframes snowfall {
    0% { transform: translateY(-10px) rotate(0deg) translateX(0); }
    25% { transform: translateY(25vh) rotate(90deg) translateX(15px); }
    50% { transform: translateY(50vh) rotate(180deg) translateX(-10px); }
    75% { transform: translateY(75vh) rotate(270deg) translateX(20px); }
    100% { transform: translateY(105vh) rotate(360deg) translateX(-5px); }
}

/* ── 烟花（元旦/春节） ── */
.firework {
    position: absolute;
    width: 6px; height: 6px;
    border-radius: 50%;
    animation: firework-burst ease-out infinite;
}
.firework::before,
.firework::after {
    content: '';
    position: absolute;
    width: 100%; height: 100%;
    border-radius: 50%;
}
.firework::before { animation: spark-1 1s ease-out infinite; }
.firework::after { animation: spark-2 1.2s ease-out infinite; }

@keyframes firework-burst {
    0% { opacity: 0; transform: scale(0); }
    10% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 0; transform: scale(3); }
}

@keyframes spark-1 {
    0% { transform: translate(0, 0); opacity: 1; }
    100% { transform: translate(-20px, -30px); opacity: 0; }
}
@keyframes spark-2 {
    0% { transform: translate(0, 0); opacity: 1; }
    100% { transform: translate(25px, -20px); opacity: 0; }
}

.decoration-fireworks .firework:nth-child(1),
.decoration-fireworks .firework:nth-child(5) { background: #e53e3e; box-shadow: 0 0 6px #e53e3e; }
.decoration-fireworks .firework:nth-child(2),
.decoration-fireworks .firework:nth-child(6) { background: #d69e2e; box-shadow: 0 0 6px #d69e2e; }
.decoration-fireworks .firework:nth-child(3),
.decoration-fireworks .firework:nth-child(7) { background: #ed8936; box-shadow: 0 0 6px #ed8936; }
.decoration-fireworks .firework:nth-child(4),
.decoration-fireworks .firework:nth-child(8) { background: #fbd38d; box-shadow: 0 0 6px #fbd38d; }

/* ── 月亮（中秋节） ── */
.moon-body {
    position: absolute;
    top: 40px; right: 60px;
    width: 80px; height: 80px;
    background: radial-gradient(circle at 35% 35%, #fef3c7, #f6e05e, #d69e2e);
    border-radius: 50%;
    box-shadow: 0 0 40px rgba(214, 158, 46, 0.4), 0 0 80px rgba(214, 158, 46, 0.2);
    animation: moon-glow 4s ease-in-out infinite alternate;
}
.moon-glow {
    position: absolute;
    top: 20px; right: 40px;
    width: 120px; height: 120px;
    background: radial-gradient(circle, rgba(214, 158, 46, 0.15), transparent 70%);
    border-radius: 50%;
}
@keyframes moon-glow {
    0% { box-shadow: 0 0 40px rgba(214, 158, 46, 0.3), 0 0 80px rgba(214, 158, 46, 0.15); }
    100% { box-shadow: 0 0 60px rgba(214, 158, 46, 0.5), 0 0 120px rgba(214, 158, 46, 0.25); }
}

/* ── 灯笼（元宵节） ── */
.lantern {
    position: absolute;
    top: -10px;
    width: 32px; height: 42px;
    animation: lantern-swing 3s ease-in-out infinite alternate;
}
.lantern::before {
    content: '';
    display: block;
    width: 32px; height: 42px;
    background: linear-gradient(180deg, #e53e3e, #c53030);
    border-radius: 50% 50% 45% 45%;
    box-shadow: 0 0 20px rgba(229, 62, 62, 0.5), inset 0 -5px 10px rgba(0, 0, 0, 0.2);
}
.lantern::after {
    content: '福';
    display: flex; align-items: center; justify-content: center;
    position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
    width: 18px; height: 18px;
    color: #fbd38d; font-size: 12px; font-weight: bold;
    border-radius: 50%;
}
@keyframes lantern-swing {
    0% { transform: rotate(-5deg); }
    100% { transform: rotate(5deg); }
}

/* ── 春节对联/吊饰 ── */
.spring-pendant {
    position: absolute;
    top: 0;
    width: 40px;
    height: 100vh;
    background: linear-gradient(180deg, #e53e3e, #c53030 30%, transparent 70%);
    opacity: 0.15;
}
.spring-pendant.left { left: 0; }
.spring-pendant.right { right: 0; }

/* ── 国旗彩旗（国庆节） ── */
.mini-flag {
    position: absolute;
    top: 0;
    width: 20px; height: 14px;
    background: linear-gradient(135deg, #e53e3e, #c53030);
    border-radius: 0 0 2px 2px;
    animation: flag-wave 2s ease-in-out infinite alternate;
    box-shadow: 0 2px 8px rgba(229, 62, 62, 0.3);
}
.mini-flag::before {
    content: '';
    position: absolute;
    top: -8px; left: 50%;
    width: 1px; height: 8px;
    background: rgba(229, 62, 62, 0.5);
}
@keyframes flag-wave {
    0% { transform: rotate(-3deg) scaleY(1); }
    100% { transform: rotate(3deg) scaleY(0.95); }
}

/* ── 响应式：移动端隐藏装饰 ── */
@media (max-width: 960px) {
    #decorations { display: none; }
}
