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

body {
    font-family: 'Microsoft YaHei', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container-fluid {
    max-width: 1400px;
}

/* 头部样式 */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-header {
    border-radius: 15px 15px 0 0 !important;
    border: none;
    font-weight: 600;
}

/* 表单样式 */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

/* 按钮样式 */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    border: none;
}

.btn-info {
    background: linear-gradient(135deg, #2196F3 0%, #21CBF3 100%);
    border: none;
}

.btn-warning {
    background: linear-gradient(135deg, #F09819 0%, #EDDE5D 100%);
    border: none;
}

/* 章节样式 */
.section {
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.section h6 {
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #667eea;
}

/* 工作经历和教育经历项目 */
.work-item, .edu-item {
    background: white;
    transition: all 0.3s ease;
}

.work-item:hover, .edu-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.remove-work, .remove-edu {
    transition: all 0.3s ease;
}

.remove-work:hover, .remove-edu:hover {
    transform: scale(1.05);
}

/* 简历预览容器 */
.resume-container {
    min-height: 600px;
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 现代风格简历模板 */
.resume-modern {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
}

.resume-modern .resume-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 10px 10px 0 0;
    text-align: center;
}

.resume-modern .resume-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.resume-modern .resume-header h2 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1rem;
}

.resume-modern .contact-info {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.9rem;
}

.resume-modern .contact-info span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.resume-modern .resume-section {
    padding: 1.5rem 0;
    border-bottom: 1px solid #eee;
}

.resume-modern .resume-section:last-child {
    border-bottom: none;
}

.resume-modern .section-title {
    color: #667eea;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #667eea;
}

.resume-modern .work-item, .resume-modern .edu-item {
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    border-left: 3px solid #667eea;
}

.resume-modern .work-item h4, .resume-modern .edu-item h4 {
    color: #333;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.resume-modern .work-item .company, .resume-modern .edu-item .school {
    color: #667eea;
    font-weight: 500;
    margin-bottom: 0.3rem;
}

.resume-modern .work-item .duration, .resume-modern .edu-item .duration {
    color: #666;
    font-size: 0.9rem;
    font-style: italic;
    margin-bottom: 0.5rem;
}

.resume-modern .skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.resume-modern .skill-tag {
    background: #667eea;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* 经典风格简历模板 */
.resume-classic {
    font-family: 'Times New Roman', serif;
    color: #000;
    line-height: 1.6;
}

.resume-classic .resume-header {
    text-align: center;
    padding: 2rem 0;
    border-bottom: 2px solid #000;
}

.resume-classic .resume-header h1 {
    font-size: 2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.resume-classic .resume-header h2 {
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 1rem;
    color: #666;
}

.resume-classic .contact-info {
    text-align: center;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.resume-classic .contact-info span {
    margin: 0 0.5rem;
}

.resume-classic .resume-section {
    padding: 1.5rem 0;
    border-bottom: 1px solid #ccc;
}

.resume-classic .resume-section:last-child {
    border-bottom: none;
}

.resume-classic .section-title {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    border-bottom: 1px solid #000;
    padding-bottom: 0.3rem;
}

.resume-classic .work-item, .resume-classic .edu-item {
    margin-bottom: 1rem;
}

.resume-classic .work-item h4, .resume-classic .edu-item h4 {
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.resume-classic .work-item .company, .resume-classic .edu-item .school {
    font-style: italic;
    margin-bottom: 0.2rem;
}

.resume-classic .work-item .duration, .resume-classic .edu-item .duration {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* 简约风格简历模板 */
.resume-minimal {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: #333;
    line-height: 1.8;
}

.resume-minimal .resume-header {
    padding: 1rem 0;
    border-bottom: 1px solid #ddd;
}

.resume-minimal .resume-header h1 {
    font-size: 1.8rem;
    font-weight: 300;
    margin-bottom: 0.3rem;
}

.resume-minimal .resume-header h2 {
    font-size: 1.1rem;
    font-weight: 400;
    color: #666;
    margin-bottom: 0.5rem;
}

.resume-minimal .contact-info {
    font-size: 0.9rem;
    color: #666;
}

.resume-minimal .contact-info span {
    margin-right: 1rem;
}

.resume-minimal .resume-section {
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.resume-minimal .resume-section:last-child {
    border-bottom: none;
}

.resume-minimal .section-title {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #333;
    margin-bottom: 0.8rem;
}

.resume-minimal .work-item, .resume-minimal .edu-item {
    margin-bottom: 0.8rem;
}

.resume-minimal .work-item h4, .resume-minimal .edu-item h4 {
    font-weight: 500;
    margin-bottom: 0.2rem;
}

.resume-minimal .work-item .company, .resume-minimal .edu-item .school {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.resume-minimal .work-item .duration, .resume-minimal .edu-item .duration {
    color: #999;
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
}

/* 创意风格简历模板 */
.resume-creative {
    font-family: 'Comic Sans MS', cursive, sans-serif;
    color: #333;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border-radius: 15px;
    padding: 2rem;
}

.resume-creative .resume-header {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.resume-creative .resume-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.resume-creative .resume-header h2 {
    font-size: 1.3rem;
    color: #f09819;
    margin-bottom: 1rem;
}

.resume-creative .contact-info {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.9rem;
}

.resume-creative .contact-info span {
    background: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.resume-creative .resume-section {
    background: rgba(255, 255, 255, 0.8);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.resume-creative .section-title {
    color: #f09819;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
}

.resume-creative .work-item, .resume-creative .edu-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.resume-creative .work-item h4, .resume-creative .edu-item h4 {
    color: #667eea;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.resume-creative .skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.resume-creative .skill-tag {
    background: linear-gradient(135deg, #f09819 0%, #edde5d 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* 模板选择按钮 */
.template-btn {
    transition: all 0.3s ease;
}

.template-btn:hover {
    transform: translateY(-2px);
}

.template-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border-color: #667eea !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container-fluid {
        padding: 0.5rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .resume-container {
        padding: 1rem;
        min-height: 400px;
    }
    
    .resume-modern .resume-header h1 {
        font-size: 2rem;
    }
    
    .resume-modern .contact-info {
        flex-direction: column;
        align-items: center;
    }
    
    .resume-classic .contact-info span {
        display: block;
        margin: 0.2rem 0;
    }
    
    .resume-creative .contact-info {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-group-sm .btn {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
}

@media (max-width: 576px) {
    header h1 {
        font-size: 1.5rem;
    }
    
    .section {
        padding: 1rem;
    }
    
    .resume-modern .resume-header,
    .resume-classic .resume-header,
    .resume-minimal .resume-header,
    .resume-creative .resume-header {
        padding: 1rem;
    }
    
    .resume-modern .resume-header h1,
    .resume-classic .resume-header h1,
    .resume-minimal .resume-header h1,
    .resume-creative .resume-header h1 {
        font-size: 1.5rem;
    }
    
    .resume-modern .resume-header h2,
    .resume-classic .resume-header h2,
    .resume-minimal .resume-header h2,
    .resume-creative .resume-header h2 {
        font-size: 1rem;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 成功提示 */
.success-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 错误提示 */
.error-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

/* 打印样式 */
@media print {
    body {
        background: white;
    }
    
    .container-fluid {
        max-width: 100%;
        padding: 0;
    }
    
    .card {
        box-shadow: none;
        border: none;
    }
    
    .col-lg-6:first-child {
        display: none;
    }
    
    .col-lg-6:last-child {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .card-header {
        display: none;
    }
    
    .btn-group {
        display: none;
    }
    
    .resume-container {
        box-shadow: none;
        border: none;
        padding: 0;
    }
}