/* ===== 全局样式 ===== */
:root {
    --primary-color: #4a6fa5;
    --secondary-color: #6b8cae;
    --accent-color: #ffb6b9;
    --text-color: #333;
    --light-bg: #f5f5f5;
    --border-color: #ddd;
    --success-color: #4caf50;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== 导航栏 ===== */
header {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--primary-color);
}

/* ===== 主要内容区 ===== */
main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

/* ===== 按钮 ===== */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 111, 165, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-large {
    padding: 1rem 3rem;
    font-size: 1.2rem;
}

/* ===== 首页特有样式 ===== */
.hero {
    text-align: center;
    padding: 4rem 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 20px;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #666;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.features {
    margin: 4rem 0;
}

.features h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.how-it-works {
    background: var(--light-bg);
    padding: 4rem 2rem;
    border-radius: 20px;
    margin: 4rem 0;
}

.how-it-works h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.step {
    text-align: center;
    position: relative;
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin: 0 auto 1rem;
}

.testimonial {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow);
    margin: 4rem 0;
}

.testimonial blockquote {
    font-size: 1.2rem;
    font-style: italic;
    margin-bottom: 1rem;
}

.testimonial cite {
    color: #666;
}

/* ===== 表单样式 ===== */
.register-main,
.volunteer-main,
.privacy-main {
    max-width: 800px;
    margin: 0 auto;
}

.register-main h1,
.volunteer-header h1,
.privacy-main h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
    position: relative;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--border-color);
    z-index: 1;
}

.progress-step {
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 2px solid var(--border-color);
    position: relative;
    z-index: 2;
}

.progress-step.active {
    border-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: bold;
}

.register-form,
.volunteer-form {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-note {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
    cursor: pointer;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

small {
    color: #666;
    font-size: 0.8rem;
}

/* ===== 匹配列表页面 ===== */
.matches-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-section {
    display: flex;
    gap: 1rem;
}

.filter-select {
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.match-card {
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow);
    padding: 1.5rem;
    transition: transform 0.3s;
}

.match-card:hover {
    transform: translateY(-5px);
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.match-score {
    background: var(--primary-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-weight: bold;
}

.match-detail {
    margin: 0.5rem 0;
    color: #666;
}

.match-reasons {
    margin: 1rem 0;
    padding: 1rem;
    background: var(--light-bg);
    border-radius: 8px;
    font-size: 0.9rem;
}

.interest-btn {
    width: 100%;
    padding: 0.8rem;
    background: var(--accent-color);
    border: none;
    border-radius: 8px;
    color: var(--text-color);
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.interest-btn:hover {
    background: #ff9fa3;
}

/* ===== 活动页面 ===== */
.activity-header {
    text-align: center;
    margin-bottom: 3rem;
}

.city-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.city-tab {
    padding: 0.5rem 1.5rem;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.city-tab:hover,
.city-tab.active {
    background: var(--primary-color);
    color: white;
}

.activities-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.activity-card {
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow);
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.activity-info {
    flex: 1;
    min-width: 300px;
}

.activity-info h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.activity-meta {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
    color: #666;
    flex-wrap: wrap;
}

.activity-tags {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
}

.tag {
    background: var(--light-bg);
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #666;
}

.activity-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.activity-status {
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.status-upcoming {
    background: #e3f2fd;
    color: #1976d2;
}

.join-btn {
    min-width: 120px;
}

/* ===== 志愿者页面 ===== */
.volunteer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 4rem 0;
}

.volunteer-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    text-align: center;
}

.volunteer-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.volunteer-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.volunteer-responsibilities {
    text-align: left;
    margin-top: 1rem;
    list-style: none;
}

.volunteer-responsibilities li {
    margin: 0.5rem 0;
    color: #666;
}

.volunteer-benefits {
    background: var(--light-bg);
    padding: 3rem;
    border-radius: 20px;
    margin: 4rem 0;
}

.volunteer-benefits h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.benefits-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.benefit-item {
    background: white;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
}

.volunteer-apply {
    margin: 4rem 0;
}

.volunteer-faq {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.faq-item {
    margin: 1.5rem 0;
}

.faq-item h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* ===== 隐私政策页面 ===== */
.privacy-main section {
    margin: 3rem 0;
}

.privacy-main h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.privacy-main ul {
    margin-left: 2rem;
}

.last-updated {
    text-align: center;
    color: #666;
    margin-bottom: 3rem;
}

/* ===== 加载动画 ===== */
.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    nav ul {
        gap: 1rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .activity-card {
        flex-direction: column;
        text-align: center;
    }
    
    .activity-meta {
        justify-content: center;
    }
    
    .matches-header {
        flex-direction: column;
        align-items: flex-start;
    }
}