/* 基础样式重置 */
* {
    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: #333;
    background-color: #f5f5f5;
}

/* 页面容器 */
/* 修改页面容器的padding-top */
.page {
    min-height: 100vh;
    padding: 20px;
    padding-top: 0px; /* 减少顶部内边距 */
}

/* 修改后的导航栏样式 */
.navbar {
    width: 100%;
    color: white;
    margin-bottom: 20px; /* 添加一些底部间距 */
}

.nav-banner-container {
    width: 100%;

}

.nav-banner-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain; /* 保持完整比例 */
}

.nav-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    z-index: 2;
}

.nav-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.logout-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: rgb(14, 11, 11);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    float: right;


}



/* 登录页面 */
.login-container {
    max-width: 400px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    padding: 40px 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-top: 50px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.login-header p {
    color: #666;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.code-input-group {
    display: flex;
    gap: 10px;
}

.code-input-group input {
    flex: 1;
}

.send-code-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: background-color 0.3s;
}

.send-code-btn:hover {
    background: #5a6fd8;
}

.send-code-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.login-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

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

/* 页面头部 */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    background: white;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.page-header h2 {
    color: #333;
    font-size: 1.3rem;
}

.back-btn, .my-registration-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.back-btn:hover, .my-registration-btn:hover {
    background: #5a6fd8;
}

/* 课程列表 */
.course-list {
    display: grid;
    gap: 15px;
}

.course-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.course-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.course-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.course-location {
    font-size: 0.9rem;
    color: #666;
}

.course-quota {
    background: #e8f4fd;
    color: #1976d2;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.course-info {
    margin-bottom: 15px;
}

.course-time {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #555;
}

.course-time i {
    margin-right: 8px;
    color: #667eea;
}

.course-volunteer {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: #555;
}

.course-volunteer i {
    margin-right: 8px;
    color: #ff9800;
}

.course-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.register-btn {
    background: #4caf50;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.register-btn:hover {
    background: #45a049;
}

.register-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.registered-badge {
    background: #e8f5e8;
    color: #4caf50;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* 课程详情 */
.course-detail {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.detail-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

.detail-section {
    margin-bottom: 20px;
}

.detail-label {
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.detail-label i {
    margin-right: 8px;
    color: #667eea;
}

.detail-value {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.detail-actions {
    margin-top: 30px;
    text-align: center;
}

.detail-register-btn {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

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

.detail-register-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* 报名列表 */
.registration-list {
    display: grid;
    gap: 15px;
}

.registration-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.registration-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.registration-time {
    background: #e8f4fd;
    color: #1976d2;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
}

/* 加载动画 */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}



/* 消息提示 */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    z-index: 10000; /* 确保足够高 */
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.toast.show {
    opacity: 1;
}

.toast.success {
    background: #4caf50;
}

.toast.error {
    background: #f44336;
}

.toast.info {
    background: #2196f3;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .page {
        padding: 15px;
        padding-top: 0px;
    }
    
    .login-container {
        margin-top: 20px;
        padding: 30px 20px;
    }
    
    .course-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .course-actions {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .page-header {
        padding: 12px 15px;
    }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-state i {
    font-size: 3rem;
    color: #ddd;
    margin-bottom: 15px;
}

.empty-state p {
    font-size: 1rem;
}


/* 弹窗样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 0;
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.2rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #666;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.close-btn:hover {
    background: #f5f5f5;
}

.registration-form {
    padding: 25px;
}

.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 8px;
}

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

.radio-label input[type="radio"] {
    margin-right: 8px;
    width: auto;
}

.radio-text {
    color: #555;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.cancel-btn, .submit-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.cancel-btn {
    background: #f5f5f5;
    color: #666;
}

.cancel-btn:hover {
    background: #e8e8e8;
}

.submit-btn {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
}

.submit-btn:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
}

/* 报名状态标签 */
.registration-status {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-badge.student {
    background: #e8f5e8;
    color: #4caf50;
}

.status-badge.volunteer {
    background: #fff3e0;
    color: #ff9800;
}

/* 更新按钮样式 */
.register-btn-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.register-btn-group .register-btn {
    flex: 1;
    margin: 0;
}

.register-btn.volunteer {
    background: #ff9800;
}

.register-btn.volunteer:hover {
    background: #f57c00;
}

/* 课程详情页面的报名按钮组 */
.detail-actions {
    margin-top: 30px;
}

.detail-register-group {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.detail-register-btn {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
    flex: 1;
    max-width: 150px;
}

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

.detail-register-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.detail-register-btn.volunteer {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
}

.detail-register-btn.volunteer:hover {
    background: linear-gradient(135deg, #f57c00 0%, #ef6c00 100%);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .detail-register-group {
        flex-direction: column;
        align-items: center;
    }
    
    .detail-register-btn {
        max-width: none;
        width: 100%;
    }
}


/* 筛选和搜索区域样式 */
.filter-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.filter-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.filter-item {
    flex: 1;
    min-width: 0;
}

.filter-item label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.filter-item select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: border-color 0.3s;
}

.filter-item select:focus {
    outline: none;
    border-color: #4caf50;
}

.search-input-group {
    display: flex;
    gap: 8px;
}

.search-input-group input {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.search-input-group input:focus {
    outline: none;
    border-color: #4caf50;
}

.search-btn {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.search-btn:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
}

.filter-actions {
    display: flex;
    justify-content: flex-end;
}

.clear-filter-btn {
    background: #f5f5f5;
    color: #666;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.clear-filter-btn:hover {
    background: #e8e8e8;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .filter-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .filter-section {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .search-input-group {
        flex-direction: column;
    }
    
    .search-btn {
        align-self: flex-start;
        min-width: auto;
        padding: 12px 20px;
    }
    
    .filter-actions {
        justify-content: center;
        margin-top: 10px;
    }
}
/* 筛选结果提示 */
.filter-result-info {
    background: #e8f5e8;
    color: #4caf50;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    border-left: 4px solid #4caf50;
}

/* 无结果状态 */
.no-results {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.no-results i {
    font-size: 3rem;
    color: #ddd;
    margin-bottom: 15px;
}

.no-results h3 {
    margin-bottom: 8px;
    color: #999;
}

.no-results p {
    color: #bbb;
    font-size: 0.9rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .filter-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .filter-section {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .search-input-group {
        flex-direction: column;
    }
    
    .search-btn {
        align-self: flex-start;
        min-width: auto;
        padding: 12px 20px;
    }
    
    .filter-actions {
        justify-content: center;
        margin-top: 10px;
    }
}

/* 加载状态 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4caf50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 表单备注样式 */
.form-note {
    margin: 15px 0;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-left: 4px solid #4caf50;
    color: #666;
    font-size: 0.9rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
}

.form-note i {
    margin-right: 8px;
    color: #4caf50;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .form-note {
        font-size: 0.85rem;
    }
}

.nav-banner-container > div {
    background-color: white; /* 白底 */
    color: #333; /* 黑字 */
    padding: 15px 20px; /* 内边距 */
    margin: 10px 0; /* 外边距 */
    font-size: 0.95rem; /* 字体大小 */
    line-height: 1.6; /* 行高 */
    border-radius: 8px; /* 圆角 */
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); /* 轻微阴影 */
}
