/* 登录页面和认证相关样式 */

.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 20px;
}

.login-box {
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    padding: 40px 30px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header .flag {
    font-size: 60px;
    margin-bottom: 10px;
}

.login-header h1 {
    color: #1a1a2e;
    font-size: 24px;
    margin: 0;
}

.login-header p {
    color: #666;
    margin: 5px 0 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #e94560;
}

.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #e94560, #c23a51);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(233, 69, 96, 0.4);
}

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.login-tabs {
    display: flex;
    margin-bottom: 25px;
    border-radius: 10px;
    overflow: hidden;
    background: #f0f0f0;
}

.login-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    border: none;
    background: none;
    font-size: 15px;
    font-weight: 500;
    color: #666;
    transition: all 0.3s;
}

.login-tab.active {
    background: #e94560;
    color: white;
}

.login-error {
    background: #ffebee;
    color: #c62828;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
    display: none;
}

.login-error.show {
    display: block;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    color: #999;
    font-size: 13px;
}

.preset-accounts {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.preset-accounts h3 {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.preset-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.preset-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

.preset-item:hover {
    background: #e9ecef;
}

.preset-item .role {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    background: #e94560;
    color: white;
}

.preset-item .role.admin {
    background: #ff6b6b;
}

.preset-item .role.student {
    background: #4ecdc4;
}

.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

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

/* 主应用中的用户信息样式 */
.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    font-size: 14px;
    color: white;
}

.user-name {
    font-weight: 500;
}

.user-role {
    font-size: 16px;
}

.logout-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.logout-btn:hover {
    opacity: 1;
}

/* 管理员菜单项 */
#admin-menu-item a {
    color: #e94560 !important;
    font-weight: 600;
}
