* {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    background-color: #e0e0e0;
    background-image: url('/static/images/m-background.jpg');
    background-blend-mode: multiply; /* 增强背景图与颜色的混合效果 */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    background-color: #f7f7f7; /* Semi-transparent white */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(5px); /* 添加毛玻璃效果增强可读性 */
}

header {
    text-align: center;
    margin-bottom: 2rem;
    background-image: url('/static/images/head_background.png');
    background-size: cover;
    background-position: center;
    padding: 3rem 2rem;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0);
    z-index: 1;
}

header h1, header .subtitle {
    position: relative;
    z-index: 2;
}

h1 {
    font-size: 2.8rem;
    color: #ffffff;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.subtitle {
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 500;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.05);
}

.login-status {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 2rem;
    gap: 0.75rem;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 5px;
}

#usernameDisplay {
    font-size: 0.95rem;
    color: #000000; /* Pure black text for username */
    font-weight: 500;
    padding: 0.5rem 0;
}

.admin-link {
    margin-left: 15px;
    color: #000000; /* Pure black text for admin link */
    text-decoration: none;
    display: flex;
    align-items: center;
    font-weight: bold; /* Make text bold */
}

.admin-link:hover {
    text-decoration: underline;
    color: #e74c3c; /* Red text on hover */
}

.admin-link .material-icons {
    margin-right: 5px;
    color: #000000; /* Pure black color for the icon */
}

.login-button, .enter-button {
    background: #7f8c8d; /* Gray background */
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    transition: background 0.3s ease;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.login-button .material-icons {
    color: white; /* White color for button icons */
}

.login-button:hover, .enter-button:hover {
    background: #e74c3c; /* Red background on hover */
}

#loginButton {
    background: #7f8c8d;
    color: white;
}

#loginButton:hover {
    background: #e74c3c;
}

#logoutButton {
    background: none;
    border: none;
    color: #333;
    padding: 0;
    margin-left: 15px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#logoutButton:hover {
    color: #e74c3c;
    text-decoration: underline;
}

#logoutButton .material-icons {
    font-size: 1rem;
}

.assistant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.assistant-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    border: 1px solid #e0e0e0; /* 1px 边框 */
    position: relative;
    overflow: hidden;
}

.assistant-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.assistant-card .material-icons {
    font-size: 3rem;
    color: #262626; /* 图标颜色 */
}

.assistant-card h3 {
    color: #262626; /* 文字颜色 */
    font-size: 1.3rem;
}

.assistant-card p {
    color: #262626; /* 文字颜色 */
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* 添加卡片右侧箭头 */
.assistant-card::after {
    content: '>';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: #e0e0e0;
    font-weight: bold;
}

/* 内容卡片的按钮 */
.assistant-card .enter-button {
    background: #e0e0e0; /* Light gray background */
    color: #333; /* Darker text for better contrast */
    border: none;
    border-radius: 8px;
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.assistant-card .enter-button:hover,
.assistant-card .enter-button:focus,
.assistant-card .enter-button.selected {
    background: #e74c3c; /* Red background on hover/focus/selected */
    color: white; /* White text for better contrast on red */
}

footer {
    margin-top: auto;
    text-align: center;
    padding: 2rem 0;
    color: #666;
}

/* 在线人数显示 */
#current-users {
    margin-left: 20px;
    color: #7f8c8d;
    font-size: 16.8px; 
    padding: 5px 10px;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.1);
}

/* 响应式布局 */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .assistant-grid {
        grid-template-columns: 1fr;
    }
    
    .assistant-card {
        padding: 1.5rem;
    }
}

/* 登录/注册页面样式 */
.auth-container {
    max-width: 420px;
    width: 90%;
    margin: 2rem auto;
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.auth-tabs {
    display: flex;
    margin-bottom: 1.8rem;
    border-bottom: 1px solid #eee;
}

.auth-tab {
    flex: 1;
    padding: 0.8rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.05rem;
    color: #666;
    transition: all 0.2s ease;
}

.auth-tab:hover {
    color: #45a049;
}

.auth-tab.active {
    color: #4CAF50;
    border-bottom: 2px solid #4CAF50;
    font-weight: bold;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-form h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.2rem; /* 减少间距，从1.4rem改为1.2rem */
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #555;
    font-weight: 500;
    font-size: 0.95rem;
}

/* 必填项标签样式 */
.form-group label.required {
    color: #2c3e50;
    font-weight: 600;
    position: relative;
}

.form-group label.required::before {
    content: '*';
    color: #e74c3c;
    font-weight: bold;
    font-size: 1.1rem;
    margin-right: 0.3rem;
    vertical-align: top;
}

.form-group label.required::after {
    content: '必填';
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    margin-left: 0.5rem;
    position: relative;
    top: -0.1rem;
    box-shadow: 0 1px 3px rgba(231, 76, 60, 0.3);
}

.form-group input {
    width: 100%;
    padding: 0.9rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box; /* 确保所有输入框使用相同的盒模型 */
}

.form-group input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.submit-btn {
    width: 100%;
    padding: 0.9rem;
    background: #7f8c8d; /* Gray background */
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.05rem;
    font-weight: 500;
    transition: background 0.3s ease, transform 0.2s ease;
    margin-top: 0.5rem;
}

.submit-btn:hover {
    background: #e74c3c; /* Red background on hover */
    transform: translateY(-2px);
}

.message {
    text-align: center;
    margin-top: 1.5rem;
    color: #666;
    font-size: 0.95rem;
}

.message a {
    color: #4CAF50;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.message a:hover {
    color: #45a049;
    text-decoration: underline;
}

/* Logo styling */
.logo-container {
    position: absolute;
    left: 220px;
    top: 45%;
    transform: translateY(-50%);
    z-index: 10; /* Above the header content */
}

.header-logo {
    width: auto;
    height: 70px; /* Fixed height, no scaling */
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.3)); /* Add subtle shadow for better visibility */
}

/* 视频动捕助手样式 */
.motion-upload-container {
    background: #fff;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 1px 1px rgba(0,0,0,0.05);
    max-width: 500px;
    margin: 2rem auto;
    text-align: center;
}
.motion-upload-container h2 {
    margin-bottom: 1.2rem;
    color: #262626;
}
.motion-upload-container input[type="file"] {
    margin-bottom: 1rem;
}
.motion-preview {
    margin-top: 1.5rem;
}
.motion-preview video {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

#userInfoBtn {
    background: none;
    border: none;
    color: #333;
    padding: 0;
    margin-left: 15px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.025rem; /* 调整字号 */
}

#userInfoBtn:hover {
    color: #e74c3c;
    text-decoration: underline;
}

#userInfoBtn .material-icons {
    margin-right: 5px;
    color: #333;
    font-size: 1.05rem; /* 与文字字号保持一致 */
}

/* 表单提示样式 */
.form-hint {
    display: block;
    margin-top: 0.3rem;
    color: #888;
    font-size: 0.85rem;
    line-height: 1.3;
}

/* label内的提示样式 - 显示在同一行 */
label .form-hint {
    display: inline;
    margin-top: 0;
    margin-left: 0.5rem;
    font-weight: normal;
    color: #666;
    font-size: 0.8rem;
}

.error-message {
    display: block;
    margin-top: 0.3rem;
    color: #e74c3c;
    font-size: 0.85rem;
    line-height: 1.3;
    min-height: 0; /* 移除最小高度，避免空白占位 */
}

/* 密码强度指示器 */
.password-strength {
    margin-top: 0.3rem; /* 减少密码强度指示器的上边距 */
}

.strength-bar {
    width: 100%;
    height: 4px;
    background-color: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.3rem;
}

.strength-fill {
    height: 100%;
    width: 0%;
    background-color: #ccc;
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: 2px;
}

.strength-text {
    font-size: 0.85rem;
    color: #666;
}

/* 密码强度等级样式 */
.strength-weak .strength-fill {
    width: 33%;
    background-color: #e74c3c;
}

.strength-medium .strength-fill {
    width: 66%;
    background-color: #f39c12;
}

.strength-strong .strength-fill {
    width: 100%;
    background-color: #27ae60;
}

.strength-very-strong .strength-fill {
    width: 100%;
    background-color: #2ecc71;
}

.strength-weak .strength-text {
    color: #e74c3c;
}

.strength-medium .strength-text {
    color: #f39c12;
}

.strength-strong .strength-text {
    color: #27ae60;
}

.strength-very-strong .strength-text {
    color: #2ecc71;
}

/* 表单验证状态样式 */
.form-group input.valid {
    border-color: #27ae60;
    box-shadow: 0 0 0 2px rgba(39, 174, 96, 0.2);
}

.form-group input.invalid {
    border-color: #e74c3c;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2);
}

.form-group input.warning {
    border-color: #f39c12;
    box-shadow: 0 0 0 2px rgba(243, 156, 18, 0.2);
}

/* 密码输入框容器样式 */
.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.password-input-container input {
    width: 100%;
    padding-right: 45px; /* 为眼睛图标留出空间 */
    /* 通过box-sizing确保总宽度一致 */
    box-sizing: border-box;
}

.password-toggle {
    position: absolute;
    right: 12px;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    z-index: 10;
}

.password-toggle:hover {
    color: #4CAF50;
}

.password-toggle .material-icons {
    font-size: 20px;
}