/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Arial', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 导航栏 */
.navbar {
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
    text-decoration: none;
    padding: 20px 0;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    margin-left: 30px;
}

.nav-menu a {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    padding: 5px 10px;
    transition: color 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #3498db;
}

/* 主要内容区域 */
.main-content {
    max-width: 1200px;
    margin: 100px auto 50px;
    padding: 0 20px;
}

.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 100px 0;
    text-align: center;
    border-radius: 10px;
    margin-bottom: 50px;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero p {
    font-size: 20px;
    max-width: 600px;
    margin: 0 auto 30px;
}

.btn {
    display: inline-block;
    background: #fff;
    color: #667eea;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.3s;
}

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

/* 卡片样式 */
.card {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.card h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

/* 作品集网格 */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.portfolio-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.portfolio-item:hover {
    transform: translateY(-10px);
}

.portfolio-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.portfolio-content {
    padding: 20px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

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

.submit-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.submit-btn:hover {
    background: #2980b9;
}

/* 页脚 */
.footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
}

/* 新增样式类 */

/* 按钮样式 */
.btn-primary {
    background: #3498db;
    color: white;
    border: none;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-3px);
}

.btn-secondary {
    background: #2ecc71;
    color: white;
    border: none;
}

.btn-secondary:hover {
    background: #27ae60;
    transform: translateY(-3px);
}

/* 个人资料区域 */
.profile-section {
    display: flex;
    align-items: center;
    gap: 30px;
    margin: 30px 0;
}

.profile-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid #3498db;
}

.profile-info {
    flex: 1;
}

.profile-info h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 24px;
}

.profile-info p {
    margin-bottom: 10px;
    color: #555;
}

/* 技能区域 */
.skills-section {
    margin-top: 30px;
}

.skills-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 20px;
}

.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.skill-tag {
    background: #3498db;
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s;
}

.skill-tag:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

/* 文本对齐 */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

/* 消息提示 */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
    border: 1px solid transparent;
}

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

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

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

/* 表单改进 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.form-control.error {
    border-color: #e74c3c;
}

.form-error {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
}

/* 页脚改进 */
.footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 40px 0;
    margin-top: auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.footer-link {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-link:hover {
    color: #3498db;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
    }
    
    .nav-menu {
        margin-top: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-menu li {
        margin: 5px 15px;
    }
    
    .hero h1 {
        font-size: 36px;
    }
    
    .main-content {
        margin-top: 150px;
    }
    
    .profile-section {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-image {
        width: 150px;
        height: 150px;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 28px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    .card {
        padding: 20px;
    }
    
    .skill-tag {
        padding: 6px 15px;
        font-size: 12px;
    }
}

/* 打印样式 */
@media print {
    .navbar,
    .footer,
    .btn {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    a {
        color: black;
        text-decoration: none;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
    }
}