/* ========== CSS变量 ========== */
:root {
    /* 春节主题色 */
    --red-primary: #C41E3A;
    --red-dark: #8B0000;
    --red-light: #FF6B6B;
    --red-bg: #FFF5F5;
    --gold-primary: #B8860B;
    --gold-light: #D4AF37;
    --gold-dark: #8B6914;
    --gold-bg: #FFFDF5;
    
    /* 中性色 */
    --bg-primary: #FAFAFA;
    --bg-secondary: #FFFFFF;
    --bg-card: #FFFFFF;
    --text-primary: #1A1A1A;
    --text-secondary: #333333;
    --text-muted: #888888;
    --border-color: #E8E8E8;
    --border-light: #F0F0F0;
    
    /* 渐变 */
    --gradient-gold: linear-gradient(135deg, #B8860B 0%, #D4AF37 100%);
    --gradient-red: linear-gradient(135deg, #8B0000 0%, #C41E3A 100%);
    
    /* 阴影 */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
    --shadow-gold: 0 4px 16px rgba(212, 175, 55, 0.2);
    --shadow-red: 0 4px 16px rgba(196, 30, 58, 0.15);
    
    /* 圆角 */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
}

/* ========== 基础样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ========== 装饰条 ========== */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-red);
    z-index: 1000;
}

/* ========== 主容器 ========== */
.app-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px 16px;
    padding-top: 24px;
}

/* ========== 头部 ========== */
.header {
    text-align: center;
    margin-bottom: 28px;
    padding: 24px 20px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.header-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    background: var(--gradient-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-gold);
}

.header-icon svg {
    width: 28px;
    height: 28px;
    fill: white;
}

.title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    letter-spacing: 1px;
}

.subtitle {
    font-size: 14px;
    color: var(--text-muted);
    letter-spacing: 3px;
}

.year-badge {
    display: inline-block;
    margin-top: 12px;
    padding: 4px 14px;
    background: var(--red-bg);
    color: var(--red-primary);
    font-size: 12px;
    font-weight: 600;
    border-radius: 16px;
    letter-spacing: 1px;
    border: 1px solid rgba(196, 30, 58, 0.15);
}

/* ========== 卡片样式 ========== */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.card-icon {
    width: 32px;
    height: 32px;
    background: var(--red-bg);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-icon svg {
    width: 18px;
    height: 18px;
    fill: var(--red-primary);
}

.card-icon.gold {
    background: var(--gold-bg);
}

.card-icon.gold svg {
    fill: var(--gold-primary);
}

.card-header h2 {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.view-all-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 5px 12px;
    font-size: 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-all-btn:hover {
    background: var(--bg-primary);
    border-color: var(--gold-primary);
    color: var(--gold-primary);
}

/* ========== 日程卡片 ========== */
.schedule-week {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.week-day {
    text-align: center;
    flex: 1;
}

.week-day .day-name {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.week-day .day-num {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
}

.week-day.has-schedule .day-num {
    color: var(--gold-primary);
    position: relative;
}

.week-day.has-schedule .day-num::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--gold-primary);
    border-radius: 50%;
}

.week-day.today {
    background: var(--red-bg);
    border-radius: 8px;
}

.week-day.today .day-num {
    color: var(--red-primary);
}

.schedule-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.schedule-item {
    padding: 14px;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.schedule-item:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--gold-primary);
}

.schedule-item:active {
    transform: scale(0.98);
}

.schedule-item.rehearsal {
    background: var(--red-bg);
    border-color: rgba(196, 30, 58, 0.15);
}

.schedule-item .item-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.3;
}

.schedule-item .item-info {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.schedule-item .item-info:last-child {
    margin-bottom: 0;
}

.schedule-item .item-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 10px;
    padding: 2px 6px;
    background: var(--red-primary);
    color: white;
    border-radius: 8px;
    font-weight: 500;
}

.schedule-item .view-detail {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 10px;
    font-size: 11px;
    color: var(--gold-primary);
    font-weight: 500;
}

.schedule-item .view-detail svg {
    width: 12px;
    height: 12px;
    fill: var(--gold-primary);
}

.schedule-empty {
    text-align: center;
    padding: 24px;
    color: var(--text-muted);
    font-size: 14px;
}

/* ========== 登录表单 ========== */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.input-group {
    position: relative;
}

.input-group input {
    width: 100%;
    padding: 13px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
    transition: all 0.2s ease;
}

.input-group input:focus {
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.input-group input::placeholder {
    color: var(--text-muted);
}

/* ========== 按钮样式 ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

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

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-gold);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-primary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-light);
}

.btn-accent {
    background: var(--gradient-red);
    color: white;
    box-shadow: var(--shadow-red);
}

.btn-accent:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(196, 30, 58, 0.25);
}

/* ========== 用户信息 ========== */
.user-card {
    padding: 16px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.user-info .avatar {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-gold);
    border-radius: 50%;
    flex-shrink: 0;
}

.user-info .avatar svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.user-info .info {
    flex: 1;
}

.user-info .nickname {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.user-info .group {
    font-size: 13px;
    color: var(--gold-primary);
}

.user-info .btn {
    flex-shrink: 0;
}

/* ========== 活动报名 ========== */
.register-content {
    text-align: center;
}

.register-content p {
    color: var(--text-muted);
    margin-bottom: 16px;
    font-size: 14px;
}

.qq-group-info {
    display: inline-block;
    padding: 10px 20px;
    background: var(--gold-bg);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    border: 1px solid rgba(212, 175, 55, 0.15);
}

.qq-number {
    font-size: 16px;
    font-weight: 700;
    color: var(--gold-primary);
    letter-spacing: 0.5px;
}

/* ========== 底部 ========== */
.footer {
    text-align: center;
    padding: 24px 0 12px;
    color: var(--text-muted);
    font-size: 12px;
}

.footer-sub {
    margin-top: 4px;
    font-size: 11px;
    opacity: 0.7;
}

/* ========== 弹窗 ========== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: flex-end;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    width: 100%;
    max-width: 480px;
    max-height: 80vh;
    background: var(--bg-card);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 17px;
    color: var(--text-primary);
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-btn:hover {
    background: var(--bg-primary);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(80vh - 80px);
}

/* ========== Toast提示 ========== */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 12px 24px;
    background: var(--text-primary);
    color: white;
    border-radius: 24px;
    font-size: 14px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 2000;
    white-space: nowrap;
    box-shadow: var(--shadow-lg);
}

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    background: #2E7D32;
}

.toast.error {
    background: var(--red-primary);
}

/* ========== 加载状态 ========== */
.loading {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
}

/* ========== 响应式 ========== */
@media (max-width: 360px) {
    .app-container {
        padding: 16px 12px;
    }
    
    .title {
        font-size: 22px;
    }
}

/* ========== 动画 ========== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    animation: fadeIn 0.4s ease forwards;
}

.card:nth-child(2) { animation-delay: 0.05s; }
.card:nth-child(3) { animation-delay: 0.1s; }
.card:nth-child(4) { animation-delay: 0.15s; }
