.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* 内容区域样式 */
.newyear-page {
    padding-top: 80px;
    background: linear-gradient(135deg, #1a0000 0%, #330000 100%);
    min-height: 100vh;
    color: var(--gold);
}

.section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 40px 20px;
    background: rgba(139, 0, 0, 0.2);
    border-radius: 15px;
    border: 1px solid rgba(255, 215, 0, 0.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.section h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2rem;
    color: var(--gold);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* 图标样式和动画 */
.icon {
    display: inline-block;
    font-size: 1.5em;
    margin: 0 10px;
    animation: iconFloat 2s ease-in-out infinite;
}

/* 交错动画效果 */
h2 .icon:first-child {
    animation-delay: 0s;
}

h2 .icon:last-child {
    animation-delay: 1s;
}

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

/* 鼠标悬停效果 */
.icon:hover {
    animation: iconSpin 0.5s ease-in-out;
    cursor: pointer;
}

@keyframes iconSpin {
    0% {
        transform: scale(1) rotate(0);
    }
    50% {
        transform: scale(1.2) rotate(180deg);
    }
    100% {
        transform: scale(1) rotate(360deg);
    }
}

/* 优化标题样式 */
section h2 {
    text-align: center;
    color: #d4363a;
    margin: 30px 0;
    font-size: 2em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

/* 传统习俗部分 */
.tradition-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding-left: 10px;
}

.tradition-item {
    position: relative;
    background: rgba(255, 215, 0, 0.1);
    padding: 20px 20px 20px 25px;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
    color: #ffd700;
    text-decoration: none;
}

.tradition-item h3 {
    color: #ffd700;
    margin-bottom: 10px;
}

.tradition-item p {
    color: #ffd700;
    opacity: 0.9;
}

.tradition-item:hover {
    transform: translateX(10px);
    background: rgba(255, 215, 0, 0.2);
}

.tradition-icon {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    font-size: 2.5em;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.firecracker-item:hover .firecracker-icon {
    transform: translateY(-50%) scale(1.1);
    opacity: 1;
    animation: shake 0.5s cubic-bezier(0.36, 0, 0.66, -0.56) infinite;
}

.firecracker-icon::before,
.firecracker-icon::after {
    content: '✨';
    position: absolute;
    opacity: 0;
    transition: all 0.3s ease;
}

.firecracker-icon::before {
    left: 0;
    top: -20px;
}

.firecracker-icon::after {
    content: '💥';
    left: 0;
    top: -10px;
}

.firecracker-item:hover .firecracker-icon::before {
    opacity: 1;
    animation: sparkle1 1.5s ease infinite;
}

.firecracker-item:hover .firecracker-icon::after {
    opacity: 1;
    animation: sparkle2 1.2s ease infinite;
}

.dinner-item:hover .dinner-icon {
    transform: translateY(-50%) scale(1);
    opacity: 1;
    animation: steam 2s ease infinite;
}

.dinner-icon::before,
.dinner-icon::after {
    content: '💨';
    position: absolute;
    opacity: 0;
    transition: all 0.3s ease;
}

.dinner-icon::before {
    left: 0;
    top: -20px;
}

.dinner-icon::after {
    left: 0;
    top: -30px;
}

.dinner-item:hover .dinner-icon::before,
.dinner-item:hover .dinner-icon::after {
    opacity: 1;
    animation: steam-float 2s ease infinite;
}

.envelope-item:hover .envelope-icon {
    transform: translateY(-50%) scale(1);
    opacity: 1;
    animation: bounce 1s ease infinite;
}

.envelope-icon::before,
.envelope-icon::after {
    content: '✨';
    position: absolute;
    opacity: 0;
    transition: all 0.3s ease;
}

.envelope-icon::before {
    left: 0;
    top: -15px;
}

.envelope-icon::after {
    right: 0;
    top: -15px;
}

.envelope-item:hover .envelope-icon::before,
.envelope-item:hover .envelope-icon::after {
    opacity: 1;
    animation: twinkle 1.5s ease infinite;
}

@keyframes shake {
    0%, 100% { transform: translateY(-50%) rotate(0deg) scale(1.1); }
    25% { transform: translateY(-50%) rotate(-12deg) scale(1.2); }
    75% { transform: translateY(-50%) rotate(12deg) scale(1.2); }
}

@keyframes sparkle1 {
    0% { transform: translate(0, 0) scale(0.5); opacity: 0; }
    50% { transform: translate(-10px, -10px) scale(1); opacity: 1; }
    100% { transform: translate(-20px, -20px) scale(0.5); opacity: 0; }
}

@keyframes sparkle2 {
    0% { transform: translate(0, 0) scale(0.5); opacity: 0; }
    50% { transform: translate(10px, -15px) scale(1.2); opacity: 1; }
    100% { transform: translate(20px, -30px) scale(0.5); opacity: 0; }
}

@keyframes steam {
    0%, 100% { transform: translateY(-50%) scale(1); }
    50% { transform: translateY(-50%) scale(1.1); }
}

@keyframes steam-float {
    0% { transform: translate(0, 0) scale(0.8); opacity: 0; }
    50% { transform: translate(-5px, -20px) scale(1); opacity: 0.8; }
    100% { transform: translate(-10px, -40px) scale(0.8); opacity: 0; }
}

@keyframes bounce {
    0%, 100% { transform: translateY(-50%) scale(1); }
    50% { transform: translateY(-70%) scale(1.1); }
}

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

/* 生肖文化部分 */
.zodiac-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    padding: 20px;
}

.zodiac-year {
    flex: 1;
    min-width: 300px;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

/* 龙年特效 */
#dragon.zodiac-year {
    position: relative;
    transition: all 0.5s ease;
    overflow: hidden;
    border-radius: 15px;
    min-height: 280px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#dragon.zodiac-year:hover {
    transform: translateY(-5px);
    background: url('images/loong.png') center/contain no-repeat,
                linear-gradient(rgba(255, 215, 0, 0.05), rgba(255, 215, 0, 0.08));
}

#dragon.zodiac-year:hover::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        145deg,
        rgba(255, 215, 0, 0.2),
        rgba(255, 215, 0, 0.1)
    );
    z-index: 1;
}

#dragon.zodiac-year:hover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255, 215, 0, 0.2) 0%, transparent 70%);
    pointer-events: none;
    opacity: 0.6;
    animation: dragonGlow 3s ease-in-out infinite;
    z-index: 2;
}

#dragon.zodiac-year > * {
    position: relative;
    z-index: 3;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

@keyframes dragonGlow {
    0% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.05); }
    100% { opacity: 0.3; transform: scale(1); }
}

/* 蛇年特效 */
#snake.zodiac-year {
    position: relative;
    transition: all 0.5s ease;
    overflow: hidden;
    border-radius: 15px;
    min-height: 280px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#snake.zodiac-year:hover {
    transform: translateY(-5px);
    background: url('images/snake.png') center/contain no-repeat,
                linear-gradient(rgba(255, 215, 0, 0.05), rgba(255, 215, 0, 0.08));
}

#snake.zodiac-year:hover::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        145deg,
        rgba(255, 215, 0, 0.2),
        rgba(255, 215, 0, 0.1)
    );
    z-index: 1;
}

#snake.zodiac-year:hover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255, 215, 0, 0.2) 0%, transparent 70%);
    pointer-events: none;
    opacity: 0.6;
    animation: snakeGlow 3s ease-in-out infinite;
    z-index: 2;
}

#snake.zodiac-year > * {
    position: relative;
    z-index: 3;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

@keyframes snakeGlow {
    0% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.05); }
    100% { opacity: 0.3; transform: scale(1); }
}

.zodiac-year.current {
    border: 2px solid var(--gold);
}

.zodiac-year.next {
    border: 2px solid var(--gold);
    opacity: 0.8;
}

.zodiac-year h3 {
    color: var(--gold);
    font-size: 1.5em;
    margin-bottom: 15px;
    text-align: center;
}

.zodiac-year p {
    line-height: 1.6;
    text-align: justify;
    margin: 0;
}

/* 年夜饭部分 */
.food-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 20px;
    perspective: 1000px;
}

.food-item {
    height: 300px;
    cursor: pointer;
}

.food-card {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.food-item:hover .food-card {
    transform: rotateY(180deg);
}

.food-card-front,
.food-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.food-card-front {
    background: linear-gradient(135deg, #d4363a 0%, #ff6b6b 100%);
    color: #FFD700;
    box-shadow: 0 5px 15px rgba(212, 54, 58, 0.2);
}

.food-card-back {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #d4363a;
    transform: rotateY(180deg);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.2);
}

.food-icon {
    font-size: 4em;
    margin-bottom: 20px;
    display: block;
    animation: float 3s ease-in-out infinite;
}

.food-card-front h3 {
    font-size: 1.8em;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.food-content {
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.food-content h3 {
    font-size: 1.8em;
    margin: 0 0 15px 0;
    color: #d4363a;
}

.food-content p {
    font-size: 1.1em;
    margin: 0 0 20px 0;
    color: #8B0000;
}

.food-blessing {
    font-size: 1.8em;
    color: #d4363a;
    font-family: "KaiTi", "楷体", serif;
    writing-mode: vertical-rl;
    text-orientation: upright;
    animation: glow 2s ease-in-out infinite;
    white-space: nowrap;
    letter-spacing: 0.1em;
    line-height: 1;
    margin-top: auto;
}

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

@keyframes glow {
    0%, 100% { 
        text-shadow: 0 0 5px rgba(212, 54, 58, 0.5);
    }
    50% { 
        text-shadow: 0 0 20px rgba(212, 54, 58, 0.8);
    }
}

/* 特殊效果 */
.dumpling-item .food-icon { animation-delay: 0s; }
.fish-item .food-icon { animation-delay: 0.2s; }
.noodle-item .food-icon { animation-delay: 0.4s; }
.tangyuan-item .food-icon { animation-delay: 0.6s; }

/* 汤圆组合样式 */
.tangyuan-group {
    position: relative;
    width: 60px;
    height: 52px;  /* 60 * sin(60°) ≈ 52 使其成为等边三角形的高度 */
    margin: 20px auto;
}

.tangyuan-group .circle {
    position: absolute;
    font-size: 1.5em;
    animation: float 2s ease-in-out infinite;
}

.tangyuan-group .circle:nth-child(1) {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 0s;
}

.tangyuan-group .circle:nth-child(2) {
    bottom: 0;
    left: 0;
    animation-delay: 0.2s;
}

.tangyuan-group .circle:nth-child(3) {
    bottom: 0;
    right: 0;
    animation-delay: 0.4s;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .food-items {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }
    
    .food-item {
        height: 250px;
    }
}

/* 节日活动部分 */
.activity-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.activity {
    background: rgba(255, 215, 0, 0.1);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
}

.activity:hover {
    transform: rotate(5deg);
    background: rgba(255, 215, 0, 0.2);
}

/* 图集部分 */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.gallery-item {
    background: rgba(255, 215, 0, 0.1);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
    background: rgba(255, 215, 0, 0.2);
}

/* 烟花容器样式 */
.fireworks {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* 烟花容器 */
#fireworks-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

.tradition-content {
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    transition: transform 0.6s ease;
}

/* 内容包装器 */
.content-wrapper {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    min-height: 80px;
}

.text-content {
    flex: 1;
    padding: 0 15px;
}

/* 对联样式 */
.couplet {
    background: #d4363a;
    color: #FFD700;
    padding: 5px 3px;
    border: 1px solid #FFD700;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    opacity: 0;
    font-family: "KaiTi", "楷体", "STKaiti", cursive;
    font-weight: normal;
    transition: all 0.4s ease;
}

.couplet.left, .couplet.right {
    writing-mode: vertical-rl;
    height: 70px;
    width: 30px;
    transform: translateY(5px);
    font-size: 18px;
    line-height: 1.5;
}

.couplet.horizontal {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateY(-80%);
    padding: 3px 18px;
    z-index: 1;
    border-radius: 2px;
    font-size: 17px;
}

/* 对联hover效果 */
.couplet-item:hover .couplet {
    opacity: 1;
}

.couplet-item:hover .couplet.left {
    transform: translateY(0);
    animation: floatLeft 3s ease-in-out infinite;
}

.couplet-item:hover .couplet.right {
    transform: translateY(0);
    animation: floatRight 3s ease-in-out infinite;
}

.couplet-item:hover .couplet.horizontal {
    transform: translateX(-50%) translateY(-80%);
    animation: glow 2s ease-in-out infinite;
}

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

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

@keyframes glow {
    0%, 100% { 
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        text-shadow: none;
    }
    50% { 
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
        text-shadow: 0 0 8px rgba(255, 215, 0, 0.8);
        color: #FFE87C;
    }
}

.couplet-item:hover .tradition-content {
    transform: translateX(5px);
}

.couplet::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 215, 0, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.couplet-item:hover .couplet::after {
    opacity: 1;
}
