/* ===== 全局样式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
                 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #262626;
    background-color: #f5f5f5;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* ===== 布局类 ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== 导航栏 ===== */
.navbar {
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    font-size: 20px;
    font-weight: 600;
    color: #1890ff;
}

.nav-links a {
    margin-left: 24px;
    color: #595959;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: #1890ff;
}

/* ===== 按钮样式 ===== */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.btn-primary {
    background: #1890ff;
    color: #fff;
    border-color: #1890ff;
}

.btn-primary:hover {
    background: #40a9ff;
    border-color: #40a9ff;
}

.btn-default {
    background: #fff;
    color: #595959;
    border-color: #d9d9d9;
}

.btn-default:hover {
    color: #1890ff;
    border-color: #1890ff;
}

.btn-danger {
    background: #fff;
    color: #ff4d4f;
    border-color: #ff4d4f;
}

.btn-danger:hover {
    background: #ff4d4f;
    color: #fff;
}

.template-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.3s;
}

.template-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.template-preview {
    height: 200px;
    padding: 20px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-content {
    width: 100%;
    max-width: 240px;
}

.preview-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.preview-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
}

.preview-info {
    flex: 1;
}

.preview-name {
    height: 12px;
    width: 80px;
    border-radius: 6px;
    margin-bottom: 8px;
}

.preview-title {
    height: 8px;
    width: 60px;
    border-radius: 4px;
}

.preview-lines {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.preview-line {
    height: 6px;
    border-radius: 3px;
    width: 100%;
}

.preview-line.short {
    width: 60%;
}

.template-info {
    padding: 16px;
}

.template-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.template-desc {
    font-size: 14px;
    color: #8c8c8c;
    margin-bottom: 12px;
    line-height: 1.5;
}

.template-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 4px 12px;
    background: #f0f0f0;
    border-radius: 12px;
    font-size: 12px;
    color: #595959;
}

/* ===== 搜索栏 ===== */
.search-section {
    background: #fff;
    padding: 24px 0;
    border-bottom: 1px solid #f0f0f0;
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 16px;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.category-tabs {
    display: flex;
    gap: 12px;
}

.tab {
    padding: 8px 20px;
    border: 1px solid #d9d9d9;
    background: #fff;
    border-radius: 20px;
    color: #595959;
    transition: all 0.3s;
}

.tab:hover {
    color: #1890ff;
    border-color: #1890ff;
}

.tab.active {
    background: #1890ff;
    color: #fff;
    border-color: #1890ff;
}

/* ===== 模板网格 ===== */
.templates-section {
    padding: 32px 0;
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.template-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.3s;
}

.template-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.template-preview {
    height: 200px;
    padding: 20px;
    position: relative;
}

.template-info {
    padding: 16px;
}

.template-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.template-desc {
    font-size: 14px;
    color: #8c8c8c;
    margin-bottom: 12px;
    line-height: 1.5;
}

.template-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 4px 12px;
    background: #f0f0f0;
    border-radius: 12px;
    font-size: 12px;
    color: #595959;
}

/* ===== 简历列表 ===== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 32px 0;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 600;
}

.resumes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.resume-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s;
}

.resume-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.resume-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.resume-position {
    color: #8c8c8c;
    margin-bottom: 8px;
}

.resume-time {
    font-size: 12px;
    color: #bfbfbf;
    margin-bottom: 16px;
}

.resume-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    margin-bottom: 16px;
}

.status-draft {
    background: #fff7e6;
    color: #fa8c16;
}

.status-completed {
    background: #f6ffed;
    color: #52c41a;
}

.resume-actions {
    display: flex;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.resume-actions .btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 13px;
}

/* ===== 空状态 ===== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: #262626;
}

.empty-state p {
    color: #8c8c8c;
    margin-bottom: 24px;
}

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

.text-muted {
    color: #8c8c8c;
}

.mt-16 {
    margin-top: 16px;
}

.mb-16 {
    margin-bottom: 16px;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .templates-grid,
    .resumes-grid {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .category-tabs {
        flex-wrap: wrap;
    }
}
