/* 用户认证页面样式 */

/* 基础样式 */
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-family: 'Arial', sans-serif;
    position: relative;
    overflow: hidden;
    padding-left: 8%;
}

/* 视频背景容器 */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%); /* 暗色调降级背景 */
}

/* 视频元素 */
.video-background video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.video-background video.loaded {
    opacity: 1;
}

/* 加载状态 */
.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 18px;
    z-index: -1;
}

.video-loading .spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 遮罩层 */
.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: -1;
}

/* 认证容器 */
.auth-container {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    width: 100%;
    max-width: 520px;
    margin: 60px 60px 60px 0;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* 高度管理 */
    max-height: calc(100vh - 120px); /* 减去上下边距 */
    display: flex;
    flex-direction: column;
}

/* 认证头部 */
.auth-header {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    color: white;
    padding: 30px;
    text-align: center;
    flex-shrink: 0; /* 防止头部被压缩 */
}

.auth-header h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
}

.auth-header p {
    margin: 10px 0 0 0;
    opacity: 0.9;
}

/* 认证标签页 */
.auth-tabs {
    display: flex;
    background: #2d3748;
    flex-shrink: 0; /* 防止标签栏被压缩 */
}

.auth-tab {
    flex: 1;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    border: none;
    background: transparent;
    font-size: 16px;
    font-weight: 500;
    color: #a0aec0;
    transition: all 0.3s ease;
    position: relative;
}

.auth-tab.active {
    color: #14b8a6;
    background: #1a202c;
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #14b8a6 0%, #0d9488 100%);
}

.auth-tab:hover {
    color: #14b8a6;
}

/* 认证内容区域 */
.auth-content {
    padding: 30px 30px 0 30px;
    flex: 1; /* 占据剩余空间 */
    overflow-y: auto; /* 内容过多时显示滚动条 */
    /* 自定义滚动条样式 */
    scrollbar-width: thin;
    scrollbar-color: #4a5568 #1a202c;
}

/* Webkit浏览器的滚动条样式 */
.auth-content::-webkit-scrollbar {
    width: 6px;
}

.auth-content::-webkit-scrollbar-track {
    background: #1a202c;
    border-radius: 3px;
}

.auth-content::-webkit-scrollbar-thumb {
    background: #4a5568;
    border-radius: 3px;
}

.auth-content::-webkit-scrollbar-thumb:hover {
    background: #14b8a6;
}

/* 认证表单 */
.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

/* 返回首页 */
.back-to-home {
    text-align: center;
    margin-top: 30px;
    padding: 20px 0;
    border-top: 1px solid #4a5568;
    flex-shrink: 0; /* 防止底部被压缩 */
}

.back-to-home a {
    display: inline-flex;
    align-items: center;
    color: #14b8a6;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
    background: rgba(20, 184, 166, 0.1);
}

.back-to-home a:hover {
    background: rgba(20, 184, 166, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.2);
}

.back-to-home a::before {
    content: '←';
    margin-right: 6px;
    font-size: 16px;
    font-weight: bold;
}

/* 视频加载失败时的样式 */
.video-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 16px;
    text-align: center;
    z-index: -1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        justify-content: center;
        padding-left: 0;
        align-items: flex-start; /* 在小屏幕上从顶部开始对齐 */
        padding-top: 20px;
    }
    
    .auth-container {
        margin: 20px;
        max-width: 100%;
        max-height: calc(100vh - 40px); /* 小屏幕上的高度调整 */
    }
    
    .auth-header {
        padding: 20px;
    }
    
    .auth-header h2 {
        font-size: 24px;
    }
    
    .auth-content {
        padding: 20px 20px 0 20px;
    }
}

/* 超小屏幕设备的特殊处理 */
@media (max-height: 600px) {
    body {
        align-items: flex-start;
        padding-top: 10px;
    }
    
    .auth-container {
        max-height: calc(100vh - 20px);
        margin: 10px 20px;
    }
    
    .auth-header {
        padding: 15px 20px;
    }
    
    .auth-header h2 {
        font-size: 20px;
        margin-bottom: 5px;
    }
    
    .auth-header p {
        font-size: 14px;
        margin: 5px 0 0 0;
    }
    
    .auth-content {
        padding: 15px 20px 0 20px;
    }
}
