/* ==========================================
   教师节首页样式
   墨韵、书卷台、飞花
   ========================================== */

/* 墨韵背景 canvas */
.teacher-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s infinite ease-in-out;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Hero */
.hero {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(180deg,
        var(--color-night-deep) 0%,
        var(--color-night) 40%,
        var(--color-night-mid) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* 云 */
.clouds {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.cloud {
    position: absolute;
    background: radial-gradient(ellipse, rgba(212, 175, 55, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    animation: cloudFloat 50s infinite linear;
}

.cloud-1 { width: 400px; height: 150px; top: 15%; left: -200px; animation-duration: 60s; }
.cloud-2 { width: 300px; height: 100px; top: 60%; left: -150px; animation-duration: 80s; animation-delay: -25s; }
.cloud-3 { width: 350px; height: 120px; top: 35%; left: -180px; animation-duration: 70s; animation-delay: -40s; }

@keyframes cloudFloat {
    from { transform: translateX(0); }
    to { transform: translateX(calc(100vw + 400px)); }
}

/* 书卷台 */
.teacher-stage {
    position: absolute;
    top: 12%;
    right: 12%;
    width: 280px;
    height: 280px;
    animation: stageFloat 8s ease-in-out infinite;
}

@keyframes stageFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.teacher-stage canvas {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 8px;
    cursor: grab;
}

.teacher-stage canvas:active {
    cursor: grabbing;
}

.teacher-stage-hint {
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: var(--color-gold-soft);
    letter-spacing: 2px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    text-shadow: 0 0 6px rgba(212, 175, 55, 0.5);
}

.teacher-stage:hover .teacher-stage-hint {
    opacity: 0.85;
}

/* 装饰元素：书卷 */
.scroll-deco {
    position: absolute;
    pointer-events: none;
    z-index: 2;
}

.scroll-deco-left {
    top: 18%;
    left: 4%;
    width: 60px;
    animation: scrollBob 6s ease-in-out infinite;
}

.scroll-deco-right {
    top: 22%;
    right: 4%;
    width: 60px;
    animation: scrollBob 7s ease-in-out infinite -2s;
}

.scroll-deco-center {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 80px;
    opacity: 0.65;
}

@keyframes scrollBob {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-12px) rotate(2deg); }
}

/* 桃李瓣 */
.peach-petal {
    position: absolute;
    width: 12px;
    height: 12px;
    background: radial-gradient(ellipse, rgba(220, 180, 180, 0.9) 0%, rgba(180, 100, 100, 0.4) 100%);
    border-radius: 50% 0 50% 50%;
    opacity: 0;
    animation: petalFall linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes petalFall {
    0% {
        opacity: 0;
        transform: translateY(-30px) translateX(0) rotate(0deg);
    }
    10% {
        opacity: 0.85;
    }
    90% {
        opacity: 0.85;
    }
    100% {
        opacity: 0;
        transform: translateY(100vh) translateX(60px) rotate(360deg);
    }
}

/* 灯笼风格改为"卷轴吊饰" */
.lantern {
    position: absolute;
    width: 60px;
    z-index: 3;
    animation: lanternSway 5s ease-in-out infinite;
}

.lantern-left { top: 0; left: 12%; }
.lantern-right { top: 0; right: 12%; animation-delay: -2.5s; }

.lantern-string {
    width: 2px;
    height: 60px;
    background: linear-gradient(to bottom, transparent, var(--color-gold-deep), transparent);
    margin: 0 auto;
}

.lantern-body {
    width: 56px;
    height: 70px;
    background: linear-gradient(135deg,
        var(--color-night-soft) 0%,
        var(--color-night-mid) 50%,
        var(--color-night-soft) 100%);
    border: 2px solid var(--color-gold);
    border-radius: 4px;
    box-shadow: 0 0 14px rgba(212, 175, 55, 0.4), inset 0 0 12px rgba(212, 175, 55, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-calligraphy);
    font-size: 36px;
    color: var(--color-gold);
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.7);
    position: relative;
}

.lantern-body::before,
.lantern-body::after {
    content: '';
    position: absolute;
    left: -4px;
    right: -4px;
    height: 6px;
    background: var(--color-gold);
    border-radius: 2px;
}

.lantern-body::before { top: -6px; }
.lantern-body::after { bottom: -6px; }

.lantern-tassel {
    width: 2px;
    height: 30px;
    background: var(--color-gold-deep);
    margin: 0 auto;
    position: relative;
}

.lantern-tassel::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 18px;
    height: 18px;
    background: radial-gradient(circle, var(--color-gold) 0%, var(--color-gold-deep) 100%);
    border-radius: 50%;
}

@keyframes lanternSway {
    0%, 100% { transform: rotate(-3deg); }
    50% { transform: rotate(3deg); }
}

/* Hero 内容 */
.hero-content {
    position: relative;
    z-index: 4;
    text-align: center;
    padding: 0 24px;
    max-width: 900px;
    margin: 0 auto;
}

.hero-subtitle {
    font-family: var(--font-poem);
    font-size: clamp(16px, 2vw, 22px);
    color: var(--color-gold-soft);
    letter-spacing: 8px;
    margin-bottom: 24px;
    opacity: 0.85;
}

.hero-title {
    font-family: var(--font-calligraphy);
    font-size: clamp(64px, 12vw, 144px);
    color: var(--color-gold);
    text-shadow:
        0 0 30px rgba(212, 175, 55, 0.5),
        0 0 60px rgba(212, 175, 55, 0.3),
        4px 4px 8px rgba(0, 0, 0, 0.4);
    letter-spacing: 0.2em;
    margin-bottom: 32px;
    animation: titleGlow 4s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% {
        text-shadow:
            0 0 30px rgba(212, 175, 55, 0.5),
            0 0 60px rgba(212, 175, 55, 0.3),
            4px 4px 8px rgba(0, 0, 0, 0.4);
    }
    50% {
        text-shadow:
            0 0 50px rgba(212, 175, 55, 0.7),
            0 0 90px rgba(212, 175, 55, 0.5),
            4px 4px 8px rgba(0, 0, 0, 0.4);
    }
}

.hero-poem {
    font-family: var(--font-poem);
    font-size: clamp(18px, 2.5vw, 26px);
    color: var(--color-cream);
    letter-spacing: 4px;
    opacity: 0.95;
    margin-bottom: 48px;
}

/* 倒计时 */
.countdown {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.countdown-item {
    background: rgba(13, 31, 42, 0.65);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 8px;
    padding: 16px 18px;
    min-width: 90px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s, border-color 0.3s;
}

.countdown-item:hover {
    transform: translateY(-3px);
    border-color: var(--color-gold);
}

.countdown-num {
    display: block;
    font-family: var(--font-calligraphy);
    font-size: 36px;
    color: var(--color-gold);
    font-weight: bold;
    text-shadow: 0 0 12px rgba(212, 175, 55, 0.5);
}

.countdown-label {
    display: block;
    font-size: 12px;
    color: var(--color-text-soft);
    letter-spacing: 4px;
    margin-top: 4px;
}

.countdown-target {
    font-size: 14px;
    color: var(--color-text-soft);
    letter-spacing: 2px;
}

.countdown-target span {
    color: var(--color-gold);
    margin: 0 4px;
}

/* 滚动提示 */
.scroll-hint {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    color: var(--color-gold-soft);
    font-size: 12px;
    letter-spacing: 4px;
    opacity: 0.7;
    animation: bounce 2s ease-in-out infinite;
}

.scroll-hint .arrow-down {
    width: 16px;
    height: 16px;
    margin: 8px auto 0;
    border-right: 2px solid var(--color-gold-soft);
    border-bottom: 2px solid var(--color-gold-soft);
    transform: rotate(45deg);
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.4; }
    50% { transform: translateX(-50%) translateY(8px); opacity: 0.9; }
}

/* 模块导览 */
.modules-section {
    padding: 80px 0;
    background: linear-gradient(180deg, transparent 0%, rgba(13, 31, 42, 0.6) 100%);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.modules-title {
    font-family: var(--font-calligraphy);
    font-size: clamp(36px, 5vw, 56px);
    color: var(--color-gold);
    text-align: center;
    letter-spacing: 0.2em;
    margin-bottom: 16px;
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

.modules-subtitle {
    font-family: var(--font-title);
    font-size: 14px;
    color: var(--color-text-soft);
    text-align: center;
    letter-spacing: 6px;
    margin-bottom: 60px;
    text-transform: uppercase;
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.module-card {
    position: relative;
    background: linear-gradient(135deg,
        rgba(45, 74, 62, 0.18) 0%,
        rgba(13, 31, 42, 0.6) 100%);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 14px;
    padding: 28px 22px;
    transition: all 0.4s ease;
    cursor: pointer;
    overflow: hidden;
}

.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.module-card:hover {
    transform: translateY(-6px);
    border-color: var(--color-gold);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4), 0 0 24px rgba(212, 175, 55, 0.2);
}

.module-card:hover::before {
    opacity: 1;
}

.module-icon {
    font-size: 48px;
    margin-bottom: 14px;
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.3));
}

.module-title {
    font-family: var(--font-calligraphy);
    font-size: 26px;
    color: var(--color-gold);
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.module-count {
    font-size: 12px;
    color: var(--color-gold-soft);
    letter-spacing: 2px;
    margin-bottom: 14px;
    opacity: 0.8;
}

.module-desc {
    font-size: 14px;
    color: var(--color-text-soft);
    line-height: 1.7;
    margin-bottom: 18px;
}

.module-link {
    font-size: 13px;
    color: var(--color-gold);
    letter-spacing: 2px;
    transition: letter-spacing 0.3s;
}

.module-card:hover .module-link {
    letter-spacing: 4px;
}

/* 数据概览 */
.features-section {
    padding: 60px 0;
    background: rgba(13, 31, 42, 0.5);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 30px;
}

.feature-item {
    text-align: center;
    padding: 20px;
    border-right: 1px solid rgba(212, 175, 55, 0.15);
}

.feature-item:last-child {
    border-right: none;
}

.feature-num {
    font-family: var(--font-calligraphy);
    font-size: 48px;
    color: var(--color-gold);
    margin-bottom: 8px;
    text-shadow: 0 0 12px rgba(212, 175, 55, 0.4);
}

.feature-label {
    font-size: 14px;
    color: var(--color-text-soft);
    letter-spacing: 3px;
}

/* 今日 · 每日一句 */
.daily-section {
    padding: 80px 0;
}

.daily-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 30px;
}

.daily-card {
    background: linear-gradient(135deg,
        rgba(45, 74, 62, 0.22) 0%,
        rgba(13, 31, 42, 0.7) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 14px;
    padding: 32px 28px;
}

.daily-label {
    font-family: var(--font-calligraphy);
    font-size: 22px;
    color: var(--color-gold);
    letter-spacing: 4px;
    margin-bottom: 24px;
    text-align: center;
}

/* 月相 */
.lunar-phase {
    display: flex;
    align-items: center;
    gap: 24px;
}

.lunar-phase-visual {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: var(--color-gold);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.4);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.lunar-phase-shadow {
    position: absolute;
    inset: 0;
    background: var(--color-night-deep);
    transform-origin: center;
}

.lunar-phase-info {
    flex: 1;
}

.lunar-phase-name {
    font-family: var(--font-calligraphy);
    font-size: 26px;
    color: var(--color-gold);
    margin-bottom: 6px;
}

.lunar-phase-meta {
    font-size: 13px;
    color: var(--color-text-soft);
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.lunar-phase-desc {
    font-size: 14px;
    color: var(--color-cream);
    line-height: 1.6;
    font-style: italic;
}

/* 每日一句 */
.daily-quote-text {
    font-family: var(--font-poem);
    font-size: 22px;
    color: var(--color-cream);
    line-height: 1.7;
    text-align: center;
    padding: 24px 12px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    margin-bottom: 16px;
    letter-spacing: 2px;
}

.daily-quote-author {
    font-size: 14px;
    color: var(--color-gold-soft);
    text-align: center;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.daily-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.speak-btn,
.share-btn {
    background: rgba(45, 74, 62, 0.3);
    border: 1px solid var(--color-gold);
    color: var(--color-gold);
    padding: 8px 18px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 13px;
    letter-spacing: 2px;
    transition: all 0.3s;
}

.speak-btn:hover,
.share-btn:hover {
    background: var(--color-gold);
    color: var(--color-night-deep);
    transform: translateY(-2px);
}

.speak-btn.speaking {
    background: var(--color-red);
    color: var(--color-cream);
    border-color: var(--color-red);
}

/* Reveal 动画 */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 飞花与落笔动画 */
.scroll-fall {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    font-size: 28px;
    animation: scrollFallAnim 3s ease-in forwards;
}

@keyframes scrollFallAnim {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translate(var(--dx), 100vh) rotate(var(--rot));
        opacity: 0;
    }
}

/* 响应式 */
@media (max-width: 768px) {
    .teacher-stage {
        width: 200px;
        height: 200px;
        top: 10%;
        right: 8%;
    }
    .lantern { width: 48px; }
    .lantern-body { font-size: 28px; width: 44px; height: 56px; }
    .lantern-string { height: 40px; }
    .lantern-tassel { height: 22px; }
    .lantern-left { left: 6%; }
    .lantern-right { right: 6%; }
    .countdown-item { min-width: 70px; padding: 12px; }
    .countdown-num { font-size: 28px; }
}

@media (max-width: 480px) {
    .teacher-stage {
        width: 160px;
        height: 160px;
        top: 6%;
        right: 6%;
    }
    .lantern { display: none; }
    .scroll-deco { display: none; }
}