/* ================== 基础样式重置 ================== */
/**
 * 全局基础样式重置
 * 1. 使用border-box盒模型
 * 2. 重置边距和填充
 * 3. 设置默认字体和颜色
 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ================== 全局样式 ================== */
/**
 * 1. 防止滚动条出现
 * 2. 设置基础字体和背景
 * 3. 相对定位用于子元素定位
 */
body {
    overflow: hidden;
    touch-action: pan-y;
    position: relative;
    font-family: 'Arial', sans-serif;
    background-color: #fff;
    color: #555;
}

/* ================== 主题变量 ================== */
:root {
    --primary-color: #ff758c;
    --secondary-color: #ffb6c1;
    --text-color: #555;
    --light-text: #fff;
    --shadow-color: rgba(0,0,0,0.1);
    --border-color: rgba(255,182,193,0.3);
}
/* 添加到:root变量之后 */
@keyframes gentlePulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  50% { transform: translate(-50%, -50%) scale(1.03); opacity: 0.95; }
}

@keyframes gentleSway {
  0%, 100% { transform: translate(-50%, -50%) rotate(-1deg); }
  50% { transform: translate(-50%, -50%) rotate(1deg); }
}

@keyframes softHeartbeat {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  25% { transform: translate(-50%, -50%) scale(1.03); }
  50% { transform: translate(-50%, -50%) scale(1.05); }
  75% { transform: translate(-50%, -50%) scale(1.03); }
}
/* ================== 页面布局 ================== */
/**
 * 1. 3D透视效果容器
 * 2. 全屏尺寸
 */
#container {
    position: fixed;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    perspective: 1200px;
    -webkit-overflow-scrolling: touch;
}

/**
 * 页面基础样式
 * 1. 绝对定位全屏
 * 2. 3D变换保留
 * 3. 过渡动画效果
 */
 .handwriting {
    font-family: 'Ma Shan Zheng', "华文行楷", cursive, sans-serif;
}
.page {
    position: absolute;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    transform-style: preserve-3d;
    padding: 10px;
    background: transparent;
    overflow: hidden;
    transition: transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0;
    pointer-events: none;
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    /* 确保所有非活动页面初始位置正确 */
    transform: translateY(100%);
}
.page.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    z-index: 2;
}

/* 修改相邻页面样式 */
.page.next-page {
    transform: translateY(-100%);
    z-index: 1;
}

.page.prev-page {
    transform: translateY(100%);
    z-index: 1;
}
.page:first-child {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
}

/* 页面装饰边框效果 */
.page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 3px solid var(--border-color);
    border-radius: 20px;
    box-shadow: 
        0 0 30px rgba(255, 182, 193, 0.15),
        0 10px 40px var(--shadow-color),
        inset 0 0 20px rgba(255, 255, 255, 0.3);
    z-index: -1; /* 确保在内容下方 */
    animation: borderGlow 3s infinite alternate;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    margin: 0; /* 重置margin */
}

/* 页面图片样式 */
.page img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,0.95);
    border-radius: 15px;
    box-shadow: 
        inset 0 0 30px rgba(255, 205, 215, 0.2),
        0 8px 25px var(--shadow-color);
    position: relative;
    z-index: 1;
    transform: translateZ(20px);
    position: relative;
    z-index: 1; /* 高于边框但低于文字 */
}

/* ================== 背景层 ================== */
.background-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(45deg, #ffffff, #fff9fb, #fff3f7, #ffedf3);
    z-index: -1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.heart-beat {
    font-size: 50vw;
    color: rgba(255, 117, 140, 0.3);
    animation: heartbeat 1.5s ease-in-out infinite alternate;
    position: absolute;
}

/* ================== 浪漫文字样式 ================== */
.fade-in,
.slide-up,
.rotate-in,
.float-text,
.sparkle-text {
    opacity: 1 !important;
}
.romantic-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
    width: 80%;
    text-align: center;
    opacity: 0; /* 默认完全透明 */
    visibility: hidden; /* 默认不可见 */
    will-change: transform, opacity;
}
.page.active .romantic-text {
    visibility: visible; /* 只有激活页面才可见 */
}
/* 文字动画效果 */
/* 动画类需要重置transform原点 */
.fade-in {
  animation: 
    textFade 1.5s ease-out forwards,
    gentlePulse 3s ease-in-out 1.5s infinite; /* 延迟1.5秒开始循环 */
}

.slide-up {
  animation: 
    textSlide 1.8s cubic-bezier(0.22, 0.61, 0.36, 1) forwards,
    gentleSway 4s ease-in-out 1.8s infinite; /* 延迟1.8秒开始循环 */
}
.rotate-in {
  animation: 
    textRotate 2s ease-in-out forwards,
    softHeartbeat 2s ease-in-out 2s infinite; /* 延迟2秒开始循环 */
}

.float-text {
   animation: float 3s ease-in-out infinite;
    opacity: 0;
    animation-fill-mode: both;
    animation: 
        textFade 1s ease-out forwards, /* 淡入效果 */
        float 3s ease-in-out 1s infinite; /* 浮动效果延迟1秒开始 */
}

.sparkle-text {
  animation: 
    textFade 1s ease-out forwards,
    sparkleGlow 2s 1s infinite;
}

/* 中文手写体样式 */
.handwriting {
    font-family: 'Ma Shan Zheng', cursive, "华文行楷", sans-serif;
    font-size: 2.2rem;
    color: #ffe6ee;
    text-shadow: 0 2px 4px rgba(255,105,180,0.3);
    line-height: 1.4;
}

/* 诗意中文样式 */
.poetic {
    font-family: 'ZCOOL QingKe HuangYou', sans-serif, "微软雅黑", sans-serif;
    font-size: 2rem;
    color: #fff0f5;
    letter-spacing: 2px;
    text-shadow: 1px 1px 2px rgba(255,182,193,0.5);
}

/* 英文手写体样式 */
.english {
    font-family: 'Dancing Script', cursive, "Arial", sans-serif;
    font-size: 1.5rem;
    color: var(--light-text);
    margin-top: 15px;
    letter-spacing: 1px;
}
.lyric {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 1.8rem;
    color: #fff9fb;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
    line-height: 1.5;
}

.couplet {
    font-family: 'ZCOOL QingKe HuangYou', sans-serif;
    font-size: 2rem;
    color: #fff;
    letter-spacing: 1px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.vow {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 2.2rem;
    color: #ffebf0;
    text-shadow: 0 2px 4px rgba(255,105,180,0.5);
}

.english-love {
    font-family: 'Dancing Script', cursive;
    font-size: 1.6rem;
    color: #fff;
    margin-top: 10px;
    letter-spacing: 2px;
}

/* ================== 装饰元素 ================== */
.floral-divider {
    width: 120px;
    height: 20px;
    margin: 15px auto;
    position: relative;
    text-align: center;
}

.floral-divider::before,
.floral-divider::after {
    content: '❀';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    font-size: 16px;
}

.floral-divider::before {
    left: 30px;
}

.floral-divider::after {
    right: 30px;
}

.heart-ornament {
    /* 使用CSS实现而非SVG */
    background: none;
    position: relative;
}
.heart-ornament::before {
    content: '❤';
    color: var(--primary-color);
    animation: pulse 1.5s infinite, rotate 4s linear infinite;
}
.swirl-ornament {
    width: 60px;
    height: 60px;
    margin: 15px auto;
    position: relative;
    animation: spin 4s linear infinite;
}

.swirl-ornament::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 2px solid transparent;
    border-top-color: var(--secondary-color);
    border-bottom-color: var(--secondary-color);
    border-radius: 50%;
    animation: spin 2s linear infinite reverse;
}

.swirl-ornament::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    border: 2px solid transparent;
    border-left-color: var(--primary-color);
    border-right-color: var(--primary-color);
    border-radius: 50%;
}

.diamond-ornament {
    width: 30px;
    height: 30px;
    margin: 10px auto;
    position: relative;
    transform: rotate(45deg);
    animation: sparkle 2s ease-in-out infinite;
}

.diamond-ornament::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--primary-color);
    transform: scale(0.8);
}

.diamond-ornament::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    background-color: var(--secondary-color);
    transform: scale(0.8);
}

.leaf-divider {
    width: 100px;
    height: 15px;
    margin: 15px auto;
    position: relative;
}

.leaf-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(to right, 
        transparent 0%, 
        #87c38f 20%, 
        #87c38f 80%, 
        transparent 100%);
    transform: translateY(-50%);
}

.leaf-divider::after {
    content: '❀';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #87c38f;
    font-size: 12px;
}

/* ================== 倒计时模块 ================== */
#countdown-container {
    position: fixed;
    bottom: 160px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 98; /* 确保高于页面背景但低于浪漫文本 */
    width: 90%;
    max-width: 800px;
    padding: 2rem;
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--shadow-color);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    /* 移除可能冲突的float动画 */
    /* animation: float 4s ease-in-out infinite; */
}
#container {
    position: fixed;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    perspective: 1200px;
    -webkit-overflow-scrolling: touch;
    /* 添加以下属性防止子元素影响fixed定位 */
    transform: none !important;
}

.countdown-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.countdown-header h2 {
    font-family: 'Great Vibes', cursive;
    font-size: 2.8rem;
    color: var(--primary-color);
    margin: 0 0 0.5rem;
    text-shadow: 0 2px 4px rgba(255,117,140,0.2);
}

.countdown-header p {
    font-size: 1.1rem;
    color: #888;
    letter-spacing: 1px;
}

#countdown-flex {
    display: flex;
    justify-content: center;
    align-items: baseline;
    flex-wrap: nowrap;
    gap: 5px;
}

.countdown-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    flex-shrink: 1;
}

.countdown-number {
    font-size: clamp(1.2rem, 4vw, 1.5rem) !important;
    font-weight: bold;
    color: #ff4757;
    line-height: 1;
    background: none !important;
    -webkit-text-fill-color: initial !important;
}

.countdown-label {
    font-size: 0.7rem !important;
    color: #999;
    margin-top: 2px;
    text-transform: none !important;
}

.countdown-colon {
    font-size: 1rem !important;
    color: var(--secondary-color);
    margin: 0 2px;
    line-height: 1;
    align-self: center !important;
    padding-bottom: 0 !important;
}

/* 地图样式 */
#wedding-map {
    height: 200px;
    border-radius: 12px;
    margin-top: 15px;
    box-shadow: 0 2px 8px var(--shadow-color);
    border: 1px solid var(--border-color);
    touch-action: pan-x pan-y; /* 允许地图自带手势操作 */
}

.map-info {
    padding: 10px;
    font-family: "Microsoft YaHei", sans-serif;
    min-width: 200px;
}

.map-info h4 {
    color: var(--primary-color);
    margin: 0 0 5px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}

.map-info p {
    color: #666;
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
}

/* ================== 弹幕系统 ================== */
#danmu-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 90;
    overflow: hidden;
    background: rgba(0, 0, 0, 0); 
    /* 新增容器装饰效果 */
    background: transparent;
    
}

.danmu-item {
    font-weight: 500;
    text-shadow: 
        1px 1px 2px rgba(0,0,0,0.8),
        -1px -1px 2px rgba(0,0,0,0.5);
    animation: danmuMove linear forwards;
    /* 新增背景样式... */
    will-change: transform, opacity; /* 确保动画性能 *
    /* 新增背景色样式 */
    padding: 4px 12px;
    border-radius: 15px;
    background-color: rgba(0, 0, 0, 0.5); /* 默认背景 */
    backdrop-filter: blur(4px);
    border: 1px solid;
    box-shadow: 
        0 0 8px currentColor,
        0 2px 4px rgba(0,0,0,0.3);
    
    /* 文字描边效果 */
    -webkit-text-stroke: 0.5px rgba(255,255,255,0.3);
    text-stroke: 0.5px rgba(255,255,255,0.3);
    /* 基础样式保持不变 */
    position: absolute;
    white-space: nowrap;
    font-size: 20px;
    animation: danmuMove linear;
    pointer-events: none;
    user-select: none;
    
    /* 新增装饰效果 */
    padding: 5px 15px;
    border-radius: 20px;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(2px);
    box-shadow: 
        0 0 10px currentColor,
        inset 0 0 5px rgba(255,255,255,0.3);
    transition: all 0.3s;
}
.danmu-item[style*="color:"] {
    background-color: rgba(var(--danmu-rgb), 0.5) !important;
}

/* 弹幕装饰效果类 */
.decorated-danmu {
    position: relative;
    padding: 5px 15px;
    border-radius: 20px;
    background: rgba(0,0,0,0.2);
    backdrop-filter: blur(2px);
    border: 1px solid currentColor;
    box-shadow: 
        0 0 10px currentColor,
        inset 0 0 5px rgba(255,255,255,0.3);
    transition: all 0.3s;
}

.decorated-danmu::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 22px;
    pointer-events: none;
    z-index: -1;
}

.decorated-danmu::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, 
        rgba(255,255,255,0.8) 0%, 
        transparent 70%);
    opacity: 0.3;
    pointer-events: none;
    z-index: -1;
}
.danmu-item:hover {
    transform: scale(1.1);
    background: rgba(0,0,0,0.5);
    z-index: 100;
}

.danmu-disabled-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.9);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #ff6b6b;
}
/* 弹幕基础样式 - 提高对比度 */
.danmu-item {
    position: absolute;
    white-space: nowrap;
    font-size: 20px;
    font-weight: 500; /* 加粗字体 */
    text-shadow: 
        1px 1px 2px rgba(0,0,0,0.8),
        -1px -1px 2px rgba(0,0,0,0.5); /* 多重阴影增强可读性 */
    animation: danmuMove linear;
    pointer-events: none;
    user-select: none;
    
    /* 优化后的背景和边框 */
    padding: 4px 12px;
    border-radius: 15px;
    background: rgba(0, 0, 0, 0.6) !important; /* 提高背景不透明度 */
    backdrop-filter: blur(0px);
    border: 1px solid;
    box-shadow: 
        0 0 8px currentColor,
        0 2px 4px rgba(0,0,0,0.3);
    
    /* 文字描边效果 */
    -webkit-text-stroke: 0.5px rgba(255,255,255,0.3);
    text-stroke: 0.5px rgba(255,255,255,0.3);
}

/* 根据弹幕颜色自动调整文字颜色以提高可读性 */
.danmu-item[style*="color: #"] {
    color: inherit !important;
    border-color: inherit !important;
    box-shadow: 0 0 8px currentColor !important;
}

/* 亮色弹幕特殊处理 */
.danmu-item[style*="color: #fff"],
.danmu-item[style*="color: #ff"] {
    background-color: rgba(0, 0, 0, 0.7) !important;
    -webkit-text-stroke: 0.8px rgba(0,0,0,0.5);
    text-stroke: 0.8px rgba(0,0,0,0.5);
}

/* 暗色弹幕特殊处理 */
.danmu-item[style*="color: #000"],
.danmu-item[style*="color: #333"] {
    background-color: rgba(255, 255, 255, 0.7) !important;
    -webkit-text-stroke: 0.8px rgba(255,255,255,0.5);
    text-stroke: 0.8px rgba(255,255,255,0.5);
}


/* 弹幕动画 */
@keyframes danmuMove {
    from { 
        transform: translateX(100vw);
        opacity: 0;
    }
    2% {
        opacity: 1;
    }
    98% {
        opacity: 1;
    }
    to { 
        transform: translateX(-100%);
        opacity: 0;
    }
}
/* 弹幕模态框样式调整 */
.danmu-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2001; /* 提高到比管理面板更高的层级 */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.danmu-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.danmu-content {
    background: #fff9fb;
    padding: 25px;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    position: relative;
    z-index: 2002; /* 内容层级更高 */
    transform: translateY(20px);
    transition: transform 0.3s;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.danmu-modal.active .danmu-content {
    transform: translateY(0);
}
/* 弹幕控制按钮视觉反馈 */
.danmu-toggle-btn {
    transition: all 0.3s;
    width: 60px; /* 稍微加宽 */
    height: 60px;
    font-size: 12px;
    line-height: 1.3;
    white-space: nowrap;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .danmu-btn {
        bottom: 80px;  /* 移动端适配新位置 */
        right: 15px;
        width: 45px;
        height: 45px;
    }
}
/* ================== 控制按钮 ================== */
/* 音乐控制按钮 */
#music-control {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    box-shadow: 0 2px 10px var(--shadow-color);
    cursor: pointer;
    transition: all 0.3s;
    color: #ff8fab;
    font-size: 20px;
    border: none;
    outline: none;
}

#music-control:hover {
    transform: scale(1.1);
    background: rgba(255, 240, 245, 0.9);
}

/* 弹幕发送按钮 */
.danmu-btn {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(45deg, #ffb6c1, #ff9ec9);
    color: white;
    border: none;
    font-size: 20px;
    cursor: pointer;
    z-index: 101; /* 高于关闭按钮 */
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 0.3s;
}

.danmu-btn:hover {
    transform: scale(1.1);
}

/* 弹幕开关容器 */
.danmu-toggle-container {
    position: fixed;
    bottom: 40px; /* 发送按钮下方60px处 */
    right: 20px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

.danmu-toggle-container.visible {
    opacity: 1;
    visibility: visible;
}

.danmu-toggle-btn {
    position: fixed;
    bottom: 40px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    color: #ffffff;
    border: none;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 0.3s;
    line-height: 1.2;
    padding: 5px;
}


.danmu-toggle-btn:hover {
    transform: scale(1.1);
}

/* 管理按钮 */
.admin-btn {
    position: fixed;
    bottom: 160px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(45deg, #a1c4fd, #c2e9fb);
    color: white;
    border: none;
    font-size: 20px;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 2px 10px var(--shadow-color);
    transition: all 0.3s;
}

.admin-btn:hover {
    transform: scale(1.1);
}

/* 滚动箭头 */
.scroll-arrow {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    cursor: pointer;
    z-index: 100;
    margin: 0;
    padding: 0;
}

.scroll-arrow::before,
.scroll-arrow::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid var(--secondary-color);
    border-radius: 50%;
    animation: haloPulse 2s infinite linear;
    margin: 0;
    box-sizing: border-box;
}

.scroll-arrow::after {
    animation-delay: 0.5s;
}

.scroll-arrow svg {
    width: 24px;
    height: 24px;
    stroke: var(--light-text);
    stroke-width: 3px;
    fill: none;
    filter: drop-shadow(0 2px 4px rgba(255,105,180,0.5));
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

/* 确认出席按钮 */
.submit-btn {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: 60px;
    background: linear-gradient(45deg, var(--secondary-color), #ff9ec9);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    z-index: 101;
    box-shadow: 0 5px 15px rgba(255, 182, 193, 0.3);
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    outline: none;
}

.submit-btn:hover {
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 7px 20px rgba(255, 182, 193, 0.4);
}

.submit-btn:active {
    transform: translateX(-50%) scale(0.98);
}

/* ================== 弹窗和表单 ================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #fff9fb;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s;
    box-shadow: 0 10px 30px var(--shadow-color);
    border: 1px solid #ffd6e7;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    border: none;
    background: var(--secondary-color);
    color: white;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.close-btn:hover {
    background: #ff9ec9;
    transform: rotate(90deg);
}

.form-title {
    text-align: center;
    color: #ff8fab;
    margin-bottom: 20px;
    font-size: 22px;
    font-weight: 600;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #777;
    font-size: 15px;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ffd6e7;
    border-radius: 10px;
    font-size: 16px;
    background-color: white;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #ff9ec9;
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 182, 193, 0.2);
}

/* 下拉选择框样式 */
.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ff9ec9'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 15px;
    padding-right: 40px !important;
}

/* 提交按钮 */
.submit-form-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(45deg, var(--secondary-color), #ff9ec9);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.submit-form-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 182, 193, 0.3);
}

.submit-form-btn:disabled {
    background: #ddd;
    transform: none !important;
    cursor: not-allowed;
}

/* 提示消息样式 */
.form-alert {
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 8px;
    text-align: center;
    animation: fadeIn 0.3s;
    font-size: 14px;
}

.form-alert.success {
    background-color: #f0fff4;
    color: #2d7d46;
    border: 1px solid #c6f6d5;
}

.form-alert.error {
    background-color: #fff5f5;
    color: #c53030;
    border: 1px solid #fed7d7;
}

/* ================== 管理面板 ================== */
.admin-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    display: none;
}

.admin-modal.active {
    opacity: 1;
    display: flex;
    pointer-events: auto;
}

.admin-content {
    pointer-events: auto;
    background: #fff;
    padding: 25px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    margin: auto;
}

.admin-actions {
    position: fixed;
    bottom: 160px;
    right: 20px;
    display: flex;
    flex-direction: column;
    z-index: 1500;
    gap: 10px;
}



.admin-actions button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 14px;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
}

#clearDanmu {
    background: #ff6b6b;
    color: white;
}

#toggleDanmu {
    background: #4ecdc4;
    color: white;
}

#danmuList {
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.danmu-list-item {
    padding: 8px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
}

.danmu-list-item button {
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 2px 8px;
    cursor: pointer;
}
.admin-control-btn {
    background: linear-gradient(45deg, #4ecdc4, #45b7af);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    margin: 10px auto;
    display: block;
}

.admin-control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* ================== 动画元素 ================== */
.sparkle {
    position: fixed;
    background: rgba(255, 220, 235, 0.8);
    border-radius: 50%;
    animation: sparkle 2s infinite;
    pointer-events: none;
    z-index: 98;
}

.falling-heart {
    position: fixed;
    color: var(--secondary-color);
    opacity: 0.7;
    animation: fall 3s linear infinite;
    pointer-events: none;
    z-index: 99;
}

.click-heart {
    position: fixed;
    color: #ff8fab;
    animation: rise 1s ease-out forwards;
    pointer-events: none;
    z-index: 99;
}


/* ================== 动画关键帧 ================== */
/* 淡入动画 */
@keyframes textFade {
    0% { 
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    100% { 
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}
@keyframes gentlePulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.03); }
}
@keyframes gentleSway {
  0%, 100% { transform: translate(-50%, -50%) rotate(-1deg); }
  50% { transform: translate(-50%, -50%) rotate(1deg); }
}
@keyframes softHeartbeat {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.05); }
}

/* 上浮动画 */
@keyframes textSlide {
    0% { 
        opacity: 0;
        transform: translate(-50%, 30px);
    }
    100% { 
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}
@keyframes textRotate {
    0% { 
        opacity: 0;
        transform: translate(-50%, -50%) rotate(-15deg) scale(0.8);
    }
    100% { 
        opacity: 1;
        transform: translate(-50%, -50%) rotate(0) scale(1);
    }
}

@keyframes sparkleGlow {
    0%, 100% { 
        text-shadow: 0 0 10px rgba(255,255,255,0.3);
    }
    50% { 
        text-shadow: 0 0 20px rgba(255,182,193,0.5);
    }
}

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


@keyframes float {
    0%, 100% { 
        transform: translate(-50%, -50%);
    }
    50% { 
        transform: translate(-50%, -55%);
    }
}

@keyframes heartbeat {
    0% { transform: scale(0.9); }
    50% { transform: scale(1.1); }
    100% { transform: scale(0.9); }
}

@keyframes sparkle {
    0% { opacity: 0.5; transform: rotate(45deg) scale(0.8); }
    50% { opacity: 1; transform: rotate(45deg) scale(1.1); }
    100% { opacity: 0.5; transform: rotate(45deg) scale(0.8); }
}

@keyframes fall {
    0% { transform: translateY(-10vh) rotate(0deg); opacity: 1; }
    100% { transform: translateY(110vh) rotate(360deg); opacity: 0; }
}

@keyframes rise {
    0% { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(-100px) scale(2.5); }
}

@keyframes borderGlow {
    0%, 100% { 
        box-shadow: 
            0 0 30px rgba(255, 182, 193, 0.15),
            0 10px 40px var(--shadow-color),
            inset 0 0 20px rgba(255, 255, 255, 0.3);
        border-color: var(--border-color);
    }
    50% { 
        box-shadow: 
            0 0 45px rgba(255, 182, 193, 0.25),
            0 15px 50px var(--shadow-color),
            inset 0 0 30px rgba(255, 255, 255, 0.5);
        border-color: rgba(255, 117, 140, 0.8);
    }
}

@keyframes haloPulse {
    0% {
        transform: scale(0.8);
        opacity: 0.8;
        border-color: rgba(255,105,180,0.8);
    }
    70% {
        opacity: 0.6;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
        border-color: rgba(255,255,255,0);
    }
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}


/* ================== 响应式设计 ================== */
@media (max-width: 768px) {
    .admin-actions {
        bottom: 120px;
        right: 15px;
    }
    
    .danmu-btn {
        bottom: 100px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
    
    .danmu-toggle-container {
        bottom: 10px;
        right: 15px;
    }
} /* 

@media (max-width: 360px) {
    .countdown-number {
        font-size: 1rem !important;
    }
    .countdown-colon {
        font-size: 0.8rem !important;
    }
}

/* WebGL降级样式 */
.no-webgl .floral-border,
.no-webgl .sparkle {
    display: none;
}

.no-webgl .countdown-number {
    background: var(--primary-color) !important;
    -webkit-text-fill-color: initial !important;
}

/* 隐藏状态 */
.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s ease-in-out;
}

.admin-btn.hidden,
#music-control.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.no-webgl .countdown-container {
    background: rgba(255,255,255,0.98) !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1) !important;
}

.no-webgl .romantic-text {
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3) !important;
}