/* 
 * 统一蓝色主题样式
 * 主色调：蓝色渐变 (#004ea2 -> #0071c5)
 */

/* ========== CSS 变量定义 ========== */
:root {
    --theme-blue-primary: #004ea2;
    --theme-blue-secondary: #0071c5;
    --theme-blue-gradient: linear-gradient(135deg, #004ea2 0%, #0071c5 100%);
    --theme-blue-hover: linear-gradient(135deg, #003d7a 0%, #005a9e 100%);
    --theme-blue-focus: rgba(0, 78, 162, 0.25);
    --theme-blue-border: #004ea2;
    
    /* 文本颜色 */
    --theme-text-primary: #333;
    --theme-text-secondary: #666;
    --theme-text-muted: #6c757d;
    --theme-text-white: #fff;
    
    /* 背景颜色 */
    --theme-bg-light: #f8f9fa;
    --theme-bg-white: #fff;
    --theme-bg-gray: #e9ecef;
    
    /* 边框颜色 */
    --theme-border-light: #e0e0e0;
    --theme-border-gray: #dee2e6;
    
    /* 成功/警告/错误颜色 */
    --theme-success: #28a745;
    --theme-warning: #ffc107;
    --theme-danger: #dc3545;
}

/* ========== 通用背景渐变 ========== */
.theme-bg-gradient {
    background: var(--theme-blue-gradient);
}

.theme-bg-gradient-vertical {
    background: linear-gradient(180deg, var(--theme-blue-primary) 0%, var(--theme-blue-secondary) 100%);
}

/* ========== 登录/激活页面样式 ========== */
.login-container,
.activate-container-wrapper,
.wechat-login-container {
    min-height: 100vh;
    background: var(--theme-blue-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-card,
.activate-container,
.wechat-login-card {
    background: var(--theme-bg-white);
    border-radius: 1rem;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    overflow: hidden;
    max-width: 400px;
    width: 100%;
}

.login-header,
.activate-header {
    background: var(--theme-blue-gradient);
    color: var(--theme-text-white);
    padding: 2rem;
    text-align: center;
}

.login-header img,
.activate-header img {
    width: 160px;
    margin-bottom: 15px;
}

.login-body,
.activate-body {
    padding: 2rem;
}

/* ========== 首页样式 ========== */
.index-page {
    font-family: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--theme-blue-gradient);
    color: var(--theme-text-white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.index-header {
    text-align: center;
    padding: 40px 20px 20px;
}

.index-header img {
    width: 160px;
    margin-bottom: 15px;
}

.index-header h1 {
    font-size: 24px;
    font-weight: 400;
    letter-spacing: 2px;
}

.index-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
}

.index-welcome {
    max-width: 600px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 30px 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.index-welcome p {
    font-size: 18px;
    line-height: 1.8;
}

.index-footer {
    padding: 20px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.index-footer a {
    color: var(--theme-text-white);
    text-decoration: none;
}

.index-footer a:hover {
    text-decoration: underline;
}

/* ========== 表单样式 ========== */
.form-label {
    font-weight: 500;
    color: var(--theme-text-primary);
    margin-bottom: 8px;
}

.form-control {
    border-radius: 10px;
    border: 2px solid var(--theme-border-light);
    padding: 12px 15px;
    font-size: 16px;
}

.form-control:focus {
    border-color: var(--theme-blue-border);
    box-shadow: 0 0 0 0.2rem var(--theme-blue-focus);
    outline: none;
}

.form-control:disabled {
    background-color: var(--theme-bg-gray);
    cursor: not-allowed;
}

.form-text {
    font-size: 13px;
    color: var(--theme-text-muted);
    margin-top: 5px;
}

/* ========== 按钮样式 ========== */
.btn-primary,
.btn-login {
    background: var(--theme-blue-gradient);
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-weight: 600;
    font-size: 16px;
    color: var(--theme-text-white);
    transition: all 0.3s ease;
}

.btn-primary:hover,
.btn-login:hover {
    background: var(--theme-blue-hover);
    opacity: 0.9;
    color: var(--theme-text-white);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-primary:active,
.btn-login:active {
    transform: translateY(0);
}

.btn-outline-primary {
    border-color: var(--theme-blue-border);
    color: var(--theme-blue-border);
}

.btn-outline-primary:hover {
    background: var(--theme-blue-gradient);
    border-color: var(--theme-blue-border);
    color: var(--theme-text-white);
}

/* ========== 输入组样式 ========== */
.input-group-text {
    border-radius: 10px 0 0 10px;
    border: 2px solid var(--theme-border-light);
    border-right: none;
    background: var(--theme-bg-light);
}

.input-group .form-control {
    border-left: none;
    border-radius: 0 10px 10px 0;
}

/* ========== 提示信息样式 ========== */
.username-hint,
.password-hint {
    font-size: 0.875rem;
    color: var(--theme-text-muted);
    margin-top: 0.25rem;
}

.username-hint.error {
    color: var(--theme-danger);
}

.password-hint {
    white-space: pre-line;
}

/* ========== 警告框样式 ========== */
.alert {
    border-radius: 10px;
    border: none;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid var(--theme-success);
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid var(--theme-danger);
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid var(--theme-warning);
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid var(--theme-blue-secondary);
}

/* ========== 成功消息样式 ========== */
.success-message {
    text-align: center;
    padding: 40px 20px;
}

.success-message i {
    font-size: 64px;
    color: var(--theme-success);
    margin-bottom: 20px;
}

/* ========== 微信登录页面特殊样式 ========== */
.wechat-login-card {
    text-align: center;
    padding: 3rem 2rem;
}

.wechat-icon {
    font-size: 5rem;
    color: var(--theme-blue-primary);
    margin-bottom: 1.5rem;
}

.wechat-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--theme-text-primary);
    margin-bottom: 1rem;
}

.wechat-description {
    color: var(--theme-text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.loading-spinner {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--theme-blue-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-top: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========== 管理界面增强 ========== */
.admin-navbar.bg-primary {
    background: var(--theme-blue-gradient) !important;
}

.admin-sidebar .nav-link:hover {
    background-color: rgba(0, 78, 162, 0.1);
    color: var(--theme-blue-primary);
}

.admin-sidebar .nav-link.active {
    background-color: var(--theme-blue-primary);
    color: var(--theme-text-white);
}

.admin-form .form-control:focus {
    border-color: var(--theme-blue-border);
    box-shadow: 0 0 0 0.2rem var(--theme-blue-focus);
}

/* ========== 卡片样式 ========== */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: var(--theme-bg-light);
    border-bottom: 1px solid var(--theme-border-gray);
}

/* ========== 响应式调整 ========== */
@media (max-width: 767.98px) {
    .login-container,
    .activate-container-wrapper,
    .wechat-login-container {
        padding: 1rem;
    }
    
    .login-card,
    .activate-container,
    .wechat-login-card {
        max-width: 100%;
    }
    
    .login-header,
    .activate-header {
        padding: 1.5rem 1rem;
    }
    
    .login-body,
    .activate-body {
        padding: 1.5rem 1rem;
    }
}

/* ========== 其他通用样式 ========== */
.text-primary {
    color: var(--theme-blue-primary) !important;
}

.bg-primary {
    background: var(--theme-blue-gradient) !important;
}

.border-primary {
    border-color: var(--theme-blue-border) !important;
}

