/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    overflow-x: hidden;
}

/* 登录页面 */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    padding: 0 10px;
}

.login-header h1 {
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: bold;
}

.login-header .subtitle {
    font-size: 16px;
    opacity: 0.9;
}

.login-card {
    background: white;
    border-radius: 15px;
    padding: 30px 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.login-card h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #333;
    font-size: 20px;
}

.alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    border: 1px solid transparent;
}

.alert-error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

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

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

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    border-color: #4b6cb7;
    outline: none;
    box-shadow: 0 0 0 2px rgba(75, 108, 183, 0.2);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #4b6cb7 0%, #182848 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(75, 108, 183, 0.4);
}

.btn-block {
    width: 100%;
    display: flex;
}

.login-links {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
}

.login-links a {
    color: #4b6cb7;
    text-decoration: none;
    transition: color 0.3s;
}

.login-links a:hover {
    color: #182848;
    text-decoration: underline;
}

.divider {
    margin: 0 10px;
    color: #999;
}

/* 注册页面 */
.register-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.register-container {
    width: 100%;
    max-width: 500px;
}

.register-header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    padding: 0 10px;
}

.register-header h1 {
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: bold;
}

.register-card {
    background: white;
    border-radius: 15px;
    padding: 30px 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    background-color: white;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
}

.form-group select:focus {
    border-color: #4b6cb7;
    outline: none;
    box-shadow: 0 0 0 2px rgba(75, 108, 183, 0.2);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.register-links {
    margin-top: 20px;
    text-align: center;
}

.register-links a {
    color: #4b6cb7;
    text-decoration: none;
}

.register-links a:hover {
    text-decoration: underline;
}

/* 主面板样式 */
.main-header {
    background: linear-gradient(135deg, #4b6cb7 0%, #182848 100%);
    color: white;
    padding: 15px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.header-left h1 {
    font-size: 18px;
    margin-bottom: 5px;
    font-weight: bold;
}

.header-left .subtitle {
    font-size: 12px;
    opacity: 0.9;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

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

.user-balance {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    font-weight: bold;
    color: #ffd700;
}

.user-balance i {
    font-size: 16px;
}

.user-level {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
}

.user-level .level-progress {
    width: 60px;
    margin-top: 4px;
}

.user-menu {
    display: flex;
    gap: 8px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-logout {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 6px 12px;
    cursor: pointer;
}

.btn-logout:hover {
    background: #c0392b;
}

/* 导航栏 */
.main-nav {
    display: flex;
    background: white;
    padding: 10px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.main-nav::-webkit-scrollbar {
    display: none;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 10px;
    color: #666;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
    min-width: 70px;
    flex-shrink: 0;
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
}

.nav-item span {
    font-size: 12px;
}

.nav-item.active,
.nav-item:hover {
    background: #4b6cb7;
    color: white;
}

/* 主要内容区域 */
.main-content {
    padding: 0 15px 60px;
    min-height: calc(100vh - 180px);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.card-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 16px;
    color: #182848;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.badge {
    background: #4b6cb7;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.card-body {
    padding: 15px;
}

/* 公司信息样式 */
.company-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.company-logo {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #4b6cb7, #182848);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: bold;
    flex-shrink: 0;
}

.company-details h3 {
    font-size: 18px;
    margin-bottom: 5px;
    color: #182848;
}

.company-details p {
    color: #666;
    font-size: 12px;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.company-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 15px 0;
}

.stat-item {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
}

.stat-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 16px;
    font-weight: bold;
    color: #182848;
}

.company-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 15px;
    flex-wrap: wrap;
}

.inline-form {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.inline-form small {
    font-size: 11px;
    color: #666;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* 员工网格 */
.employees-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.employee-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.employee-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #4b6cb7, #182848);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.employee-info {
    flex: 1;
    min-width: 0;
}

.employee-info h4 {
    font-size: 16px;
    margin-bottom: 5px;
    color: #182848;
}

.employee-position {
    color: #4b6cb7;
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 8px;
}

.employee-description {
    color: #666;
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 10px;
    word-wrap: break-word;
}

.employee-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
}

.employee-stats .stat {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #666;
}

/* 项目样式 */
.projects-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.project-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    border-left: 4px solid #4b6cb7;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.project-header h4 {
    font-size: 16px;
    color: #182848;
    flex: 1;
    margin-right: 10px;
}

.project-reward {
    color: #4CAF50;
    font-weight: bold;
    font-size: 16px;
    flex-shrink: 0;
}

.project-description {
    color: #666;
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 12px;
}

.project-progress {
    margin-top: 10px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 12px;
    color: #666;
}

.progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, #4b6cb7, #182848);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 11px;
    color: #999;
}

.project-meta span {
    display: flex;
    align-items: center;
    gap: 3px;
}

/* 项目模板网格 */
.projects-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.project-template {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    border: 1px solid #e9ecef;
}

.template-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.template-header h4 {
    font-size: 16px;
    color: #182848;
    flex: 1;
    margin-right: 10px;
}

.template-reward {
    color: #4CAF50;
    font-weight: bold;
    font-size: 16px;
    flex-shrink: 0;
}

.template-description {
    color: #666;
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 10px;
}

.template-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 11px;
    color: #666;
    margin-bottom: 12px;
}

.template-meta span {
    display: flex;
    align-items: center;
    gap: 3px;
    background: #e9ecef;
    padding: 3px 8px;
    border-radius: 12px;
}

.template-action {
    margin-top: 10px;
}

/* 候选人网格 */
.candidates-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.candidate-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    border: 1px solid #e9ecef;
}

.candidate-header {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
}

.candidate-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #4b6cb7, #182848);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.candidate-info {
    flex: 1;
    min-width: 0;
}

.candidate-info h4 {
    font-size: 16px;
    margin-bottom: 5px;
    color: #182848;
}

.candidate-position {
    color: #4b6cb7;
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 8px;
}

.candidate-description {
    color: #666;
    font-size: 12px;
    line-height: 1.4;
    word-wrap: break-word;
}

.candidate-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 12px 0;
}

.candidate-stats .stat {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #666;
}

.candidate-stats .stat i {
    color: #4b6cb7;
}

.candidate-action {
    margin-top: 10px;
}

/* 邀请页面样式 */
.invite-info {
    text-align: center;
    padding: 20px 10px;
}

.invite-bonus {
    margin: 20px 0;
}

.invite-bonus i {
    font-size: 48px;
    color: #ffd700;
    margin-bottom: 15px;
}

.invite-bonus h3 {
    font-size: 16px;
    color: #666;
    margin-bottom: 10px;
    font-weight: normal;
}

.bonus-amount {
    font-size: 32px;
    font-weight: bold;
    color: #4CAF50;
    margin: 10px 0;
}

.invite-link,
.invite-code {
    margin: 20px 0;
    text-align: left;
}

.invite-link label,
.invite-code label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.link-container,
.code-container {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.link-container input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: #f8f9fa;
}

.code-container .code {
    flex: 1;
    background: #f8f9fa;
    padding: 10px 12px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 16px;
    text-align: center;
    border: 1px solid #ddd;
}

.invite-share {
    margin-top: 30px;
}

.invite-share h4 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #333;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-share {
    flex: 1;
    min-width: 90px;
    max-width: 100px;
    padding: 10px;
    font-size: 14px;
}

.btn-wechat {
    background: #09bb07;
    color: white;
}

.btn-qq {
    background: #12b7f5;
    color: white;
}

.btn-weibo {
    background: #e6162d;
    color: white;
}

/* 个人中心样式 */
.form-horizontal .form-group {
    margin-bottom: 15px;
}

.form-horizontal label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
}

.form-horizontal input,
.form-horizontal select,
.form-horizontal textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.form-horizontal textarea {
    min-height: 80px;
    resize: vertical;
}

.form-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.avatar-large {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #4b6cb7, #182848);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
    font-weight: bold;
    flex-shrink: 0;
}

.profile-info h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: #182848;
}

.profile-info p {
    color: #666;
    font-size: 14px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 页脚 */
.main-footer {
    text-align: center;
    padding: 15px 20px;
    color: #666;
    font-size: 12px;
    border-top: 1px solid #eee;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    z-index: 1000;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #ddd;
}

.empty-state p {
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0;
    }
    
    .main-header {
        padding: 12px 15px;
    }
    
    .header-content {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .header-left {
        text-align: center;
    }
    
    .header-right {
        justify-content: center;
    }
    
    .user-info {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .main-nav {
        padding: 8px;
        gap: 5px;
    }
    
    .nav-item {
        min-width: 65px;
        padding: 6px 8px;
    }
    
    .main-content {
        padding: 0 10px 70px;
    }
    
    .company-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .employee-stats {
        flex-direction: column;
        gap: 8px;
    }
    
    .project-meta {
        flex-direction: column;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .login-card,
    .register-card {
        padding: 20px 15px;
    }
    
    .card-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .card-header h2 {
        justify-content: center;
    }
    
    .company-info {
        flex-direction: column;
        text-align: center;
    }
    
    .company-stats {
        grid-template-columns: 1fr;
    }
    
    .employee-card {
        flex-direction: column;
        text-align: center;
    }
    
    .employee-avatar {
        margin: 0 auto;
    }
    
    .share-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-share {
        width: 100%;
        max-width: 200px;
    }
}

/* 工具类 */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 5px; }
.mt-2 { margin-top: 10px; }
.mt-3 { margin-top: 15px; }
.mb-1 { margin-bottom: 5px; }
.mb-2 { margin-bottom: 10px; }
.mb-3 { margin-bottom: 15px; }

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* 模态框 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 20px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 禁用状态 */
.btn:disabled,
.btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}