* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
}

/* 预加载器样式 */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    visibility: visible;
    z-index: 999;
    transition: all 0.3s linear;
}

.preloader-item {
    margin-bottom: 1rem;
}

/* CSS 加载动画 */
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f1f5f8;
    border-top: 5px solid #49a6e9;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    margin-bottom: 0.5rem;
    color: #49a6e9;
    font-weight: bold;
}

.progress-container {
    width: 300px;
    height: 10px;
    background: #f1f5f8;
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: #49a6e9;
    transition: width 0.1s linear;
}

.hide-preloader {
    z-index: -999;
    visibility: hidden;
}

header {
    min-height: 100vh;
    position: relative;
    display: grid;
    place-items: center;
}

.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.video-item {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 覆盖层样式 */
.banner {
    text-align: center;
    color: #fff;
    background: rgba(0, 0, 0, 0.3); /* 增加一点背景遮罩让文字更清晰 */
    padding: 2rem;
    border-radius: 1rem;
}

.banner h1 {
    font-size: 4rem;
    text-transform: uppercase;
    margin-bottom: 2rem;
    letter-spacing: 0.2rem;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

/* 控制面板样式 */
.controls-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

/* 开关按钮样式 */
.switch-btn {
    position: relative;
    display: inline-block;
    width: 7rem;
    height: 2rem;
    border-radius: 0.5rem;
    border: none;
    background: #49a6e9;
    transition: all 0.3s linear;
    cursor: pointer;
    padding: 0;
}

.switch-btn span {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 0.85rem;
    font-weight: bold;
    pointer-events: none; /* 防止文字阻挡点击 */
}

.switch-btn span:nth-child(2) {
    left: 50%;
}

.switch {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: #fff;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

/* 滑动效果类 */
.slide .switch {
    left: 50%;
}

/* 其他控制按钮样式 */
.control-btn {
    background: transparent;
    border: 2px solid #fff;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s linear;
    font-size: 1rem;
}

.control-btn:hover {
    background: #fff;
    color: #49a6e9;
}

.speed-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
}

.speed-btn {
    background: transparent;
    border: 1px solid #fff;
    color: #fff;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.3s linear;
}

.speed-btn.active,
.speed-btn:hover {
    background: #49a6e9;
    border-color: #49a6e9;
}