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

/* 全局变量定义 */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #07c160;
    --warning-color: #ff976a;
    --danger-color: #f56c6c;
    --light-color: #f5f7fa;
    --dark-color: #303133;
    --border-color: #e4e7ed;
    --background-color: #f5f5f5;
    --card-background: #ffffff;
    --text-primary: #303133;
    --text-regular: #606266;
    --text-secondary: #909399;
    --text-placeholder: #c0c4cc;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 6px 30px rgba(0, 0, 0, 0.12);
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

/* 基础样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    position: relative;
}

/* 顶部装饰 */
.top-decoration {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 400px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-bottom-left-radius: 100px;
    border-bottom-right-radius: 100px;
    z-index: -1;
}

/* 标题样式 */
.title {
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
    text-align: center;
    padding: 80px 20px 40px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 0, 0, 0.4);
    letter-spacing: 2px;
    line-height: 70px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    margin: 0 40px 20px;
}

/* 加载提示样式 */
.loading {
    text-align: center;
    padding: 100px 0;
    color: var(--text-secondary);
    font-size: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #ffffff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

/* 活动列表样式 */
.activities-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 0 20px;
    margin-bottom: 40px;
}

/* 活动项样式 */
.activity-item {
    background-color: var(--card-background);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 24px;
}

.activity-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.activity-item:active {
    transform: scale(0.98);
    box-shadow: var(--shadow-sm);
}

/* 活动封面样式 */
.activity-cover {
    width: 100%;
    padding-top: 50%;
    position: relative;
    background-color: #f0f0f0;
}

.activity-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.cover-placeholder {
    width: 100%;
    height: 100%;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 14px;
}

/* 活动内容样式 */
.activity-content {
    padding: 20px;
}

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

.activity-name {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-primary);
    flex: 1;
    margin-right: 20px;
    line-height: 26px;
}

.activity-status {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    color: white;
    font-weight: 500;
    white-space: nowrap;
    margin-top: 4px;
    background-color: var(--warning-color);
}

.activity-status.active {
    background-color: var(--success-color);
}

.activity-status.completed {
    background-color: var(--text-secondary);
}

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

.info-label {
    font-size: 14px;
    color: var(--text-regular);
    margin-right: 8px;
    font-weight: 500;
    margin-bottom: 8px;
}

.info-value {
    font-size: 14px;
    color: var(--text-primary);
    flex: 1;
    line-height: 22px;
    margin-bottom: 8px;
}

.activity-action {
    text-align: right;
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 500;
}

/* 无活动提示样式 */
.empty {
    text-align: center;
    padding: 150px 0;
    color: var(--text-secondary);
    font-size: 16px;
}

/* 查询分班按钮样式 */
.query-btn-container {
    display: flex;
    justify-content: center;
    padding: 40px 20px;
}

.query-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--card-background);
    border-radius: 50px;
    padding: 15px 60px;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: var(--primary-color);
    transition: var(--transition);
    border: none;
    outline: none;
}

.query-btn img {
    width: 24px;
    height: 24px;
    margin-right: 10px;
}

.query-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.query-btn:active {
    transform: scale(0.98);
    box-shadow: var(--shadow-sm);
}

/* 底部信息 */
.footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    padding: 20px 0;
    margin-top: 40px;
}

.footer p {
    margin: 8px 0;
}

.beian-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: var(--transition);
}

.beian-link:hover {
    color: rgba(255, 255, 255, 1);
    text-decoration: underline;
}

.beian-link:visited {
    color: rgba(255, 255, 255, 0.9);
}

.beian-link:active {
    color: rgba(255, 255, 255, 1);
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 表单样式 */
.form-container {
    background-color: var(--card-background);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    padding: 30px;
    margin: 20px;
}

.form-item {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 12px;
    font-weight: 500;
    font-size: 16px;
    color: var(--text-primary);
}

.form-input {
    width: 100%;
    height: 48px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 0 16px;
    box-sizing: border-box;
    background-color: var(--card-background);
    font-size: 14px;
    color: var(--text-primary);
    transition: var(--transition);
    outline: none;
}

.form-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(64, 158, 255, 0.1);
}

.form-input::placeholder {
    color: var(--text-placeholder);
    font-size: 14px;
}

/* 单选按钮组样式 */
.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 8px;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 12px 24px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-md);
    background-color: var(--card-background);
    transition: var(--transition);
    flex: 1;
    justify-content: center;
}

.radio-label:hover {
    border-color: var(--primary-color);
    background-color: rgba(102, 126, 234, 0.05);
}

.radio-label input[type="radio"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.radio-label input[type="radio"]:checked + span {
    color: var(--primary-color);
    font-weight: 600;
}

.radio-label:has(input[type="radio"]:checked) {
    border-color: var(--primary-color);
    background-color: rgba(102, 126, 234, 0.1);
}

.radio-label span {
    font-size: 15px;
    color: var(--text-primary);
    transition: var(--transition);
}

/* 按钮样式 */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    margin-top: 20px;
    border-radius: var(--border-radius-lg);
    padding: 14px 0;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: none;
    outline: none;
    cursor: pointer;
    letter-spacing: 1px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    opacity: 0.95;
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

/* 活动详情页样式 */
.activity-detail-container {
    background-color: var(--card-background);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin: 20px;
}

.detail-cover-container {
    width: 100%;
    padding-top: 60%;
    position: relative;
    background-color: #f0f0f0;
}

.detail-cover-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #f0f0f0;
}

.detail-info {
    padding: 30px;
}

.detail-section {
    margin-bottom: 20px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.section-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 10px;
    display: block;
}

.section-content {
    font-size: 14px;
    color: var(--text-regular);
    line-height: 1.5;
}

.action-buttons {
    padding: 30px;
    background-color: var(--light-color);
    display: flex;
    gap: 20px;
}

.btn-item {
    flex: 1;
    background: var(--card-background);
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius-md);
    padding: 20px 0;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.btn-item img {
    width: 30px;
    height: 30px;
    margin-bottom: 12px;
}

.btn-item span {
    font-size: 16px;
    color: var(--primary-color);
    font-weight: bold;
}

.btn-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* 活动费用样式 */
.fee-section {
    background-color: #fff5f5;
    border-radius: var(--border-radius-md);
    padding: 20px;
    border: 1px solid #ffebee;
}

.fee-text {
    color: var(--danger-color) !important;
    font-weight: bold;
    font-size: 16px !important;
    display: flex;
    align-items: center;
}

.fee-text::before {
    content: "⚠️";
    margin-right: 10px;
}

/* 返回按钮 */
.back-btn {
    position: absolute;
    top: 30px;
    left: 20px;
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 20px;
}

.back-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.back-btn::before {
    content: '← 返回';
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1;
    padding: 8px 12px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .title {
        font-size: 20px;
        padding: 60px 10px 30px;
        margin: 0 20px 10px;
    }
    
    .activities-list {
        padding: 0 10px;
    }
    
    .activity-item {
        margin-bottom: 16px;
    }
    
    .activity-content {
        padding: 16px;
    }
    
    .activity-name {
        font-size: 16px;
    }
    
    .form-container {
        padding: 20px;
        margin: 10px;
    }
    
    .detail-info {
        padding: 20px;
    }
    
    .action-buttons {
        flex-direction: column;
        padding: 20px;
    }
    
    .btn-item {
        padding: 16px 0;
    }
}

/* 隐藏元素 */
.hidden {
    display: none !important;
}

/* 报名须知勾选框容器 */
.notice-checkbox-container {
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-sm);
}

.notice-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
    user-select: none;
}

.notice-checkbox {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.notice-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    margin-left: 4px;
    transition: var(--transition);
}

.notice-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* 报名须知弹窗 */
.notice-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.notice-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.notice-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
    z-index: 10000;
}

.notice-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: var(--border-radius-md) var(--border-radius-md) 0 0;
}

.notice-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    text-align: center;
}

.notice-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.notice-text {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-wrap: break-word;
}

.notice-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.countdown-wrapper {
    width: 100%;
    text-align: center;
}

.countdown-text {
    font-size: 14px;
    color: var(--warning-color);
    font-weight: 500;
}

.countdown-text #countdown {
    font-weight: 700;
    font-size: 16px;
}

.btn-notice-close {
    width: 100%;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-notice-close:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

.btn-notice-close:active:not(:disabled) {
    transform: translateY(0);
}

.btn-notice-close:disabled,
.btn-notice-close.disabled {
    background: linear-gradient(135deg, #cccccc 0%, #999999 100%);
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
}

/* 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 576px) {
    .notice-modal {
        padding: 10px;
    }
    
    .notice-modal-content {
        max-height: 90vh;
    }
    
    .notice-modal-header {
        padding: 16px 20px;
    }
    
    .notice-modal-header h3 {
        font-size: 18px;
    }
    
    .notice-modal-body {
        padding: 20px;
    }
    
    .notice-text {
        font-size: 14px;
        line-height: 1.7;
    }
    
    .notice-modal-footer {
        padding: 12px 20px;
    }
}