/**
 * 临沂极优网络科技有限公司
 * 网址：www.jiyousoft.cn
 * 
 * 全局样式
 * 创建时间：2026-04-14
 */

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

:root {
    --primary: #3498db;
    --primary-dark: #2980b9;
    --success: #27ae60;
    --danger: #e74c3c;
    --warning: #f39c12;
    --gray-light: #f5f7fa;
    --gray: #7f8c8d;
    --gray-dark: #2c3e50;
    --border: #e1e8ed;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.15);
    --radius: 8px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--gray-dark);
    background: var(--gray-light);
    min-height: 100vh;
}

.app-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部 */
.app-header {
    background: #fff;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--gray-dark);
    font-size: 18px;
    font-weight: 600;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--gray-dark);
    font-size: 18px;
    font-weight: 600;
}

.logo img {
    width: 36px;      /* 固定宽度 */
    height: 36px;     /* 固定高度 */
    margin-right: 10px;
    object-fit: contain;  /* 保持图片比例 */
    flex-shrink: 0;   /* 防止被压缩 */
}

/* 如果没有图片，也保留占位空间 */
.logo .logo-placeholder {
    width: 36px;
    height: 36px;
    margin-right: 10px;
    flex-shrink: 0;
}

.main-nav ul {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 24px;
}

.main-nav a {
    text-decoration: none;
    color: var(--gray-dark);
    font-weight: 500;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: var(--primary);
}

.btn-register {
    background: var(--primary);
    color: #fff !important;
    padding: 8px 20px;
    border-radius: 20px;
}

.btn-register:hover {
    background: var(--primary-dark);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
    color: var(--gray-dark);
    font-weight: 500;
}

.btn-logout {
    color: var(--gray) !important;
    font-size: 13px;
}

/* 主体 可以调整主体与公共页头的距离 */
.app-main {
    flex: 1;
    padding: 20px 0;
}

/* 认证页面 */
.auth-container {
    max-width: 420px;
    margin: 0 auto;
}

.auth-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 40px;
}

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

.auth-header h2 {
    font-size: 24px;
    color: var(--gray-dark);
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--gray);
}

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

.auth-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--gray-dark);
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(52,152,219,0.1);
}

.captcha-group {
    display: flex;
    gap: 10px;
}

.captcha-group input {
    flex: 1;
}

.captcha-img {
    width: 120px;
    height: 46px;
    border-radius: var(--radius);
    cursor: pointer;
    border: 1px solid var(--border);
}

.btn-auth {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-auth:hover {
    background: var(--primary-dark);
}

.btn-auth:disabled {
    background: var(--gray);
    cursor: not-allowed;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    color: var(--gray);
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
}

/* 提示消息 */
.message {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.message-error {
    background: #fdecea;
    color: var(--danger);
    border: 1px solid #f5c6cb;
}

.message-success {
    background: #d4edda;
    color: var(--success);
    border: 1px solid #c3e6cb;
}

.message-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* 页脚 */
.app-footer {
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 20px 0;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--gray);
    font-size: 13px;
}

.footer-inner a {
    color: var(--gray);
    text-decoration: none;
}

.footer-inner a:hover {
    color: var(--primary);
}

/* 响应式 */
@media (max-width: 768px) {
    .auth-card {
        padding: 30px 20px;
    }
    
    .header-inner {
        height: 56px;
    }
    
    .main-nav ul {
        gap: 15px;
    }
}

/**
 * 临沂极优网络科技有限公司
 * 网址：www.jiyousoft.cn
 * 
 * 修复样式：移动端菜单和下拉菜单
 */

/* 确保移动端菜单默认隐藏 */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 100;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 2px;
    background: #2c3e50;
    border-radius: 2px;
    transition: all 0.3s;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background: #fff;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    z-index: 1001;
    transition: right 0.3s;
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 移动端显示 */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .mobile-menu {
        display: block;
    }
    
    .mobile-menu-overlay {
        display: block;
    }
    
    .main-nav .nav-list {
        display: none;
    }
    
    /* 移动端下拉菜单调整 */
    .user-menu .dropdown-menu {
        position: static;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        min-width: auto;
        padding: 8px 0;
    }
    
    .user-menu .dropdown-menu.show {
        display: block;
    }
    
    .dropdown-arrow {
        transition: transform 0.3s;
    }
    
    .user-menu.active .dropdown-arrow {
        transform: rotate(180deg);
    }
}

/* 移动端菜单头部 */
.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #e1e8ed;
    font-weight: 600;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #7f8c8d;
    padding: 5px;
}

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-list li {
    margin: 0;
}

.mobile-nav-list a {
    display: block;
    padding: 15px 20px;
    color: #2c3e50;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.3s;
}

.mobile-nav-list a:hover {
    background: #f5f7fa;
}

.mobile-divider {
    height: 1px;
    background: #e1e8ed;
    margin: 10px 0;
}

/* 下拉菜单内边距优化 */
.dropdown-menu {
    padding: 10px 0;
    min-width: 200px;
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #2c3e50;
    text-decoration: none;
    transition: background 0.3s;
    font-size: 14px;
}

.dropdown-menu a:hover {
    background: #f5f7fa;
}

.dropdown-menu .dropdown-header {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8f9fa;
    font-weight: 500;
}

.dropdown-menu .dropdown-divider {
    height: 1px;
    background: #e1e8ed;
    margin: 8px 0;
}

.menu-icon {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

/* 退出登录链接 */
.logout-link {
    color: #e74c3c !important;
}

.logout-link:hover {
    background: #fdecea !important;
}

/* 管理员导航样式 */
.admin-nav .admin-link {
    color: #e74c3c !important;
}

.admin-nav .admin-link:hover {
    color: #c0392b !important;
}

/* 维护模式提示条 */
.maintenance-bar {
    background: #e74c3c;
    color: #fff;
    text-align: center;
    padding: 8px;
    font-size: 13px;
}