```css
/* ============================================ */
/* 牛客网风格 CSS */
/* ============================================ */

:root {
    --primary: #00b894;
    --primary-dark: #00a381;
    --primary-light: #e8f8f5;
    --danger: #e74c3c;
    --warning: #f39c12;
    --info: #3498db;
    --success: #27ae60;
    --text-primary: #333;
    --text-secondary: #666;
    --text-muted: #999;
    --bg-primary: #f5f6f7;
    --bg-white: #fff;
    --border: #e8e8e8;
    --shadow: 0 2px 8px rgba(0,0,0,0.06);
    --radius: 8px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; }

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

/* 导航栏 */
.navbar {
    background: var(--bg-white);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 60px;
}

.navbar .container {
    display: flex;
    align-items: center;
    height: 100%;
    justify-content: space-between;
}

.navbar-brand {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary) !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-brand span { color: var(--text-primary); font-size: 14px; }

.navbar-nav {
    display: flex;
    list-style: none;
    gap: 8px;
}

.navbar-nav a {
    display: block;
    padding: 8px 16px;
    color: var(--text-secondary);
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
}

.navbar-nav a:hover, .navbar-nav a.active {
    color: var(--primary);
    background: var(--primary-light);
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.navbar-right .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.user-dropdown {
    position: relative;
}

.user-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    min-width: 160px;
    padding: 8px 0;
    z-index: 100;
}

.dropdown-menu a {
    display: block;
    padding: 8px 20px;
    color: var(--text-secondary);
    font-size: 13px;
}

.dropdown-menu a:hover {
    background: var(--bg-primary);
    color: var(--primary);
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    line-height: 1.5;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 4px 12px; font-size: 12px; }
.btn-lg { padding: 12px 32px; font-size: 16px; }
.btn-block { display: flex; width: 100%; }

/* 卡片 */
.card {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 16px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

/* 布局 */
.layout {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.layout-main { flex: 1; min-width: 0; }
.layout-side { width: 300px; flex-shrink: 0; }

/* 表单 */
.form-group { margin-bottom: 20px; }
.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-primary);
}
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
    outline: none;
}
.form-control:focus { border-color: var(--primary); }

textarea.form-control { resize: vertical; min-height: 120px; }

select.form-control {
    appearance: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 12px center;
    padding-right: 32px;
}

/* 提示框 */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-danger { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-info { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }
.alert-warning { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }

/* 标签 */
.tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    background: var(--primary-light);
    color: var(--primary);
    margin: 2px;
}

.tag-easy { background: #d4edda; color: #155724; }
.tag-medium { background: #fff3cd; color: #856404; }
.tag-hard { background: #f8d7da; color: #721c24; }

/* 难度标识 */
.difficulty { font-weight: 600; font-size: 13px; }
.difficulty.easy { color: var(--success); }
.difficulty.medium { color: var(--warning); }
.difficulty.hard { color: var(--danger); }

/* 判题结果 */
.result { font-weight: 600; font-size: 13px; }
.result.accepted { color: var(--success); }
.result.wrong, .result.tle, .result.mle, .result.ce, .result.re { color: var(--danger); }
.result.pending { color: var(--text-muted); }

/* 表格 */
.table-wrapper { overflow-x: auto; }
table {
    width: 100%;
    border-collapse: collapse;
}
table th, table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
table th {
    background: var(--bg-primary);
    font-weight: 600;
    font-size: 13px;
    color: var(--text-secondary);
}
table tr:hover td { background: #fafafa; }

/* 分页 */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 24px 0;
}
.page-btn {
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 13px;
}
.page-btn:hover, .page-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.page-dots { color: var(--text-muted); }

/* 首页Banner */
.hero {
    background: linear-gradient(135deg, var(--primary), #00cec9);
    color: #fff;
    padding: 60px 0;
    text-align: center;
    margin-bottom: 30px;
}
.hero h1 { font-size: 36px; margin-bottom: 12px; }
.hero p { font-size: 18px; opacity: 0.9; margin-bottom: 24px; }
.hero .search-box {
    max-width: 560px;
    margin: 0 auto;
    display: flex;
    gap: 8px;
}
.hero .search-box input {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
}
.hero .search-box button {
    padding: 14px 28px;
    background: rgba(255,255,255,0.2);
    color: #fff;
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
}

/* 统计卡片 */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow);
}
.stat-card .number {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
}
.stat-card .label {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* 题目列表 */
.problem-list .problem-item {
    display: flex;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}
.problem-list .problem-item:last-child { border-bottom: none; }
.problem-item .pid { width: 60px; color: var(--text-muted); font-size: 13px; }
.problem-item .ptitle { flex: 1; }
.problem-item .ptitle a { color: var(--text-primary); font-weight: 500; }
.problem-item .ptitle a:hover { color: var(--primary); }
.problem-item .pdifficulty { width: 80px; text-align: center; }
.problem-item .prate { width: 100px; text-align: right; color: var(--text-muted); font-size: 13px; }

/* 帖子列表 */
.post-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}
.post-item:last-child { border-bottom: none; }
.post-item .post-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
}
.post-item .post-title a { color: var(--text-primary); }
.post-item .post-title a:hover { color: var(--primary); }
.post-item .post-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
}
.post-item .post-excerpt {
    color: var(--text-secondary);
    margin: 8px 0;
    font-size: 13px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 评论 */
.comment-item {
    display: flex;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}
.comment-item:last-child { border-bottom: none; }
.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}
.comment-body { flex: 1; }
.comment-body .comment-user { font-weight: 600; font-size: 14px; }
.comment-body .comment-text { margin: 6px 0; font-size: 14px; line-height: 1.6; }
.comment-body .comment-meta { font-size: 12px; color: var(--text-muted); display: flex; gap: 16px; }

/* 面经卡片 */
.interview-card {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}
.interview-card:last-child { border-bottom: none; }
.interview-card .company { color: var(--primary); font-weight: 600; }

/* 职位卡片 */
.job-card {
    display: flex;
    align-items: center;
    padding: 20px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 12px;
    transition: box-shadow 0.2s;
}
.job-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.job-card .job-logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-right: 16px;
    flex-shrink: 0;
}
.job-card .job-info { flex: 1; }
.job-card .job-title { font-size: 16px; font-weight: 600; }
.job-card .job-company { color: var(--text-secondary); font-size: 13px; margin: 4px 0; }
.job-card .job-salary { color: var(--danger); font-weight: 600; font-size: 16px; }

/* 课程卡片 */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.course-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.2s;
}
.course-card:hover { transform: translateY(-4px); }
.course-card .course-cover {
    height: 160px;
    background: linear-gradient(135deg, var(--primary), #00cec9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    font-weight: 600;
}
.course-card .course-body { padding: 16px; }
.course-card .course-title { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.course-card .course-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.course-card .course-price { font-size: 18px; font-weight: 700; color: var(--danger); }
.course-card .course-price .free { color: var(--success); }

/* 排行榜 */
.rank-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.rank-item:last-child { border-bottom: none; }
.rank-position {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    margin-right: 12px;
    flex-shrink: 0;
}
.rank-1 { background: #FFD700; color: #fff; }
.rank-2 { background: #C0C0C0; color: #fff; }
.rank-3 { background: #CD7F32; color: #fff; }
.rank-other { background: var(--bg-primary); color: var(--text-muted); }

/* 筛选条 */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
    flex-wrap: wrap;
}
.filter-bar .filter-item {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border);
}
.filter-bar .filter-item:hover,
.filter-bar .filter-item.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Tab导航 */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--border);
    margin-bottom: 16px;
}
.tab {
    padding: 12px 24px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 14px;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}
.tab:hover, .tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* 用户资料 */
.profile-header {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 32px;
    background: linear-gradient(135deg, #e8f8f5, #fff);
    border-radius: var(--radius);
    margin-bottom: 20px;
}
.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
}
.profile-info h2 { font-size: 22px; margin-bottom: 4px; }
.profile-info p { color: var(--text-muted); }
.profile-stats {
    display: flex;
    gap: 32px;
    margin-top: 12px;
}
.profile-stats .stat { text-align: center; }
.profile-stats .stat .num { font-size: 20px; font-weight: 700; color: var(--primary); }
.profile-stats .stat .label { font-size: 12px; color: var(--text-muted); }

/* 代码区域 */
.code-editor {
    width: 100%;
    min-height: 300px;
    padding: 16px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #2d2d2d;
    color: #f8f8f2;
    resize: vertical;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.empty-state .icon { font-size: 48px; margin-bottom: 16px; }
.empty-state p { font-size: 16px; }

/* 面包屑 */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 0;
    font-size: 13px;
    color: var(--text-muted);
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }

/* 通知列表 */
.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}
.notification-item:hover { background: #fafafa; }
.notification-item.unread { background: var(--primary-light); }
.notification-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    margin-top: 6px;
    flex-shrink: 0;
}

/* 页脚 */
.footer {
    background: var(--bg-white);
    border-top: 1px solid var(--border);
    padding: 40px 0 24px;
    margin-top: 60px;
    color: var(--text-muted);
    font-size: 13px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 24px;
}
.footer-col h4 {
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 16px;
}
.footer-col a {
    display: block;
    color: var(--text-muted);
    padding: 4px 0;
}
.footer-col a:hover { color: var(--primary); }
.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* 响应式 */
@media (max-width: 768px) {
    .layout { flex-direction: column; }
    .layout-side { width: 100%; }
    .stat-cards { grid-template-columns: repeat(2, 1fr); }
    .navbar-nav { display: none; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .hero h1 { font-size: 24px; }
    .hero .search-box { flex-direction: column; }
}
