/* style.css - 更新后的样式 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

header .subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* 视频容器 - 使用响应式宽高比 */
.video-container {
    position: relative;
    width: 100%;
    /* 使用 padding-bottom 创建 16:9 的宽高比 */
    padding-bottom:133.33%; /* 4/3 ≈ 1.3333 = 133.33% */
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-bottom: 40px;
}

.video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.video-item.active {
    opacity: 1;
}

.video-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* 关键：保持宽高比并覆盖整个区域 */
}

/* 视频控制按钮 */
.video-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 5;
}

.control-btn {
    background: rgba(0, 0, 0, 0.5);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.control-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.video-indicators {
    display: flex;
    gap: 10px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: white;
    transform: scale(1.2);
}

/* 弹幕容器 */
.barrage-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.barrage-item {
    position: absolute;
    color: white;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    z-index: 1;
}

.love-barrage {
    color: #ff6b6b;
    font-weight: bold;
}

.heart-barrage {
    color: #ff6b6b;
    font-size: 1.5em !important;
}

.anniversary-barrage {
    color: #4ecdc4;
    font-weight: bold;
}

.special-barrage {
    color: #ffd166;
}

/* 爱情信息 */
.love-message {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    color: white;
    text-align: center;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.love-message h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #ffd166;
}

.love-message p {
    font-size: 1.1rem;
    line-height: 1.8;
    opacity: 0.9;
}

footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    margin-top: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    header h1 {
        font-size: 2rem;
    }

    .video-container {
        margin-bottom: 20px;
        border-radius: 10px;
    }

    .control-btn {
        width: 40px;
        height: 40px;
    }

    .love-message {
        padding: 20px;
    }

    .love-message h2 {
        font-size: 1.5rem;
    }
}

/* 弹幕动画 */
@keyframes barrage {
    0% {
        transform: translateX(-100%) translateY(-50%);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateX(100vw) translateY(-50%);
        opacity: 0;
    }
}