/* 背景视频样式 */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(135deg, #141824, #1f2430);
}

.video-background video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.3));
    z-index: -1;
}

/* 声音开关按钮 */
.sound-toggle {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 100;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.sound-toggle:hover {
    background: rgba(0, 0, 0, 0.6);
}

.sound-toggle svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

/* 确保内容在视频上方可见 */
.mainer, .footer {
    position: relative;
    z-index: 1;
}

/* 增强文字可读性 */
.header {
    background: transparent;
    border-radius: 20px;
    padding: 40px;
    margin: 20px auto;
    backdrop-filter: none;
    box-shadow: none;
    border: none;
    position: fixed;
    top: 20px;
    left: 20px;
    width: auto;
    max-width: 400px;
    z-index: 10;
}

.mainer {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 20px;
    padding: 30px;
    margin: 20px auto;
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.footer {
    background: transparent !important;
    border-radius: 20px;
    padding: 20px;
    margin: 20px auto 50px auto !important;
    backdrop-filter: none;
    box-shadow: none;
    border: none;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    position: relative !important;
    width: 100%;
    max-width: 900px;
    clear: both;
    z-index: 1;
    display: block !important;
    visibility: visible !important;
}

/* 头像区域样式 */
.lover-info {
    margin-bottom: 20px;
}

.lover-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.lover-image {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.lover-image .lover {
    display: inline-block;
    width: 50px;
    height: 50px;
    color: transparent;
    background-color: #ddd;
    -webkit-background-size: cover;
    background-size: cover;
    border-radius: 100%;
    box-shadow: inset 0 0 1px rgba(0, 0, 0, .2);
}

/* 左侧文案样式 */
.header h1 {
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    font-size: 24px;
    margin: 15px 0;
}

.header a {
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    display: block;
    margin: 5px 0;
    margin-top: 20px;
}

.lover-date {
    display: block;
    font-size: 24px;
    line-height: 1.4;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    margin: 15px 0;
    white-space: nowrap;
    min-width: 200px;
}

.lover-date .days {
    font-family: impact;
    color: #ff557d;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.love-message {
    text-align: left;
    padding: 20px;
    margin: 20px auto;
    max-width: 800px;
    line-height: 1.8;
    color: #d63384;
    font-size: 1.1em;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.8);
}

.love-message p {
    margin: 15px 0;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.6);
    padding: 10px 15px;
    border-radius: 10px;
    backdrop-filter: blur(5px);
}

.love-message p:hover {
    transform: scale(1.02);
    background: rgba(255, 255, 255, 0.8);
}

.description {
    font-style: italic;
    color: #666;
    font-size: 0.9em;
    margin-top: 15px;
    padding: 10px 15px;
    border-top: 1px dashed rgba(255, 85, 125, 0.3);
    background: rgba(255, 255, 255, 0.4);
    border-radius: 8px;
}

/* 优化其他文字元素 */
.lover-date .days {
    font-family: impact;
    color: #d63384;
    letter-spacing: 4px;
    margin: 0 4px;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.8);
}

.lover-date {
    display: inline-block;
    vertical-align: middle;
    font-size: 85px;
    line-height: 90px;
    color: #333;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.8);
}

h1 {
    color: #d63384;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.8);
}

a {
    color: #d63384;
    text-shadow: 1px 1px 1px rgba(255,255,255,0.8);
}

/* 弹幕系统样式 */
.danmaku-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 400px;
    max-height: 400px;
    z-index: 1000;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.danmaku-item {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 12px 18px;
    margin-bottom: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.5);
    opacity: 0;
    transform: translateX(100%);
    animation: danmakuSlide 0.5s ease-out forwards;
    font-size: 14px;
    line-height: 1.4;
    color: #d63384;
    max-width: 350px;
    word-wrap: break-word;
}

.danmaku-item.description {
    background: rgba(214, 51, 132, 0.1);
    border: 1px solid rgba(214, 51, 132, 0.3);
    color: #666;
    font-style: italic;
}

.danmaku-item.transparent {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.danmaku-item.fade-out {
    animation: danmakuFadeOut 0.5s ease-out forwards;
}

@keyframes danmakuSlide {
    0% {
        opacity: 0;
        transform: translateX(100%);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes danmakuFadeOut {
    0% {
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-20px);
    }
}

/* 移动端适配 */
@media (max-width: 640px) {
    .header {
        position: fixed;
        top: 10px;
        left: 10px;
        right: 10px;
        max-width: none;
        padding: 20px;
    }
    
    .mainer, .footer {
        margin: 10px;
        padding: 20px;
    }
    
    .danmaku-container {
        width: 300px;
        right: 10px;
        bottom: 10px;
    }
    
    .danmaku-item {
        font-size: 12px;
        padding: 10px 14px;
        max-width: 280px;
    }
    
    .lover-image .lover {
        width: 40px;
        height: 40px;
    }
    
    .header h1 {
        font-size: 18px;
    }
    
    .lover-date {
        font-size: 18px;
    }
}
