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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background-color: #f5f5f5;
    min-height: 100vh;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

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

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

.loading-text {
    margin-top: 16px;
    color: #666;
    font-size: 14px;
}

.page-container {
    display: none;
    padding-bottom: 60px;
}

.header {
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, #409EFF 0%, #667EEA 100%);
    color: white;
    padding: 16px;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(64, 158, 255, 0.3);
}

.header-title {
    font-size: 18px;
    font-weight: bold;
    text-align: center;
}

.back-btn {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: white;
    text-decoration: none;
}

.activity-list {
    padding: 16px;
}

.activity-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.activity-card:active {
    transform: scale(0.98);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.activity-header {
    display: flex;
    margin-bottom: 12px;
}

.activity-bg {
    width: 100%;
    height: 120px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    margin-bottom: 12px;
    position: relative;
}

.activity-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.4));
    border-radius: 8px;
}

.activity-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.activity-name {
    font-size: 17px;
    font-weight: bold;
    color: #333;
    margin-bottom: 6px;
    line-height: 1.4;
}

.activity-desc {
    font-size: 14px;
    color: #999;
    margin-bottom: 12px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.activity-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
}

.activity-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
}

.status-active {
    background-color: #e8f5e9;
    color: #4caf50;
}

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

.status-closed {
    background-color: #f5f5f5;
    color: #999;
}

.activity-detail-container {
    padding: 16px;
}

.detail-bg {
    width: 100%;
    height: 200px;
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
}

.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-section {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.detail-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 12px;
}

.detail-desc {
    font-size: 15px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 16px;
}

.detail-info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.detail-info-row:last-child {
    border-bottom: none;
}

.detail-info-label {
    font-size: 14px;
    color: #999;
}

.detail-info-value {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.register-btn {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: white;
    border-top: 1px solid #f0f0f0;
}

.register-btn button {
    width: 100%;
    height: 44px;
    background: linear-gradient(135deg, #409EFF 0%, #667EEA 100%);
    color: white;
    border: none;
    border-radius: 22px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.2s;
}

.register-btn button:active {
    opacity: 0.8;
}

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

.form-container {
    padding: 16px;
    padding-bottom: 80px;
}

.form-section {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.form-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

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

.form-group label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.form-group label.required::after {
    content: '*';
    color: #f56c6c;
    margin-left: 4px;
}

.form-group input,
.form-group select {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 1px solid #e4e7ed;
    border-radius: 8px;
    font-size: 15px;
    color: #333;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #409EFF;
}

.form-group input::placeholder {
    color: #c0c4cc;
}

.form-group select {
    background-color: white;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.form-group textarea {
    width: 100%;
    height: 80px;
    padding: 12px;
    border: 1px solid #e4e7ed;
    border-radius: 8px;
    font-size: 15px;
    color: #333;
    outline: none;
    resize: none;
    transition: border-color 0.2s;
}

.form-group textarea:focus {
    border-color: #409EFF;
}

.submit-btn {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: white;
    border-top: 1px solid #f0f0f0;
}

.submit-btn button {
    width: 100%;
    height: 44px;
    background: linear-gradient(135deg, #409EFF 0%, #667EEA 100%);
    color: white;
    border: none;
    border-radius: 22px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.2s;
}

.submit-btn button:active {
    opacity: 0.8;
}

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

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    display: none;
}

.modal {
    background: white;
    border-radius: 12px;
    padding: 24px;
    width: 80%;
    max-width: 320px;
    text-align: center;
}

.modal-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.modal-icon.success {
    color: #4caf50;
}

.modal-icon.error {
    color: #f56c6c;
}

.modal-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.modal-message {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.modal-btn {
    width: 100%;
    height: 40px;
    background: #409EFF;
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
}

.modal-btn:active {
    opacity: 0.8;
}

.my-registrations {
    padding: 16px;
}

.registration-item {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.registration-activity-name {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.registration-info {
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
}

.registration-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    margin-top: 8px;
}

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

.status-cancelled {
    background-color: #f5f5f5;
    color: #999;
}

.status-approved {
    background-color: #e8f5e9;
    color: #4caf50;
}

.tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    z-index: 100;
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #999;
    font-size: 11px;
    cursor: pointer;
}

.tab-item.active {
    color: #409EFF;
}

.tab-item-icon {
    font-size: 20px;
    margin-bottom: 4px;
}

.user-info {
    background: linear-gradient(135deg, #409EFF 0%, #667EEA 100%);
    padding: 24px 16px;
    color: white;
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-right: 16px;
}

.user-info-content h3 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 4px;
}

.user-info-content p {
    font-size: 13px;
    opacity: 0.8;
}

.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    padding: 16px;
    text-align: center;
}

.error-icon {
    font-size: 64px;
    color: #f56c6c;
    margin-bottom: 16px;
}

.error-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.error-message {
    font-size: 14px;
    color: #999;
    margin-bottom: 20px;
}

.error-btn {
    padding: 10px 24px;
    background: #409EFF;
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
}