/* 除夕抽奖系统 - 清新红色主题 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: #FFF5F5;
    color: #333;
    min-height: 100vh;
    overflow-x: hidden;
}

/* 烟花画布 */
#fireworks-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* 飘落元素 */
.falling-item {
    position: fixed;
    font-size: 24px;
    animation: fall 8s linear forwards;
    pointer-events: none;
    z-index: 10;
}

@keyframes fall {
    0% { transform: translateY(-50px) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(360deg); opacity: 0; }
}

/* 灯笼装饰 */
.decoration {
    position: fixed;
    font-size: 50px;
    z-index: 5;
    animation: swing 3s ease-in-out infinite;
}

.lantern-left { top: 80px; left: 20px; }
.lantern-right { top: 100px; right: 20px; animation-delay: 1.5s; }

@keyframes swing {
    0%, 100% { transform: rotate(-8deg); }
    50% { transform: rotate(8deg); }
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 700;
    color: #E53935;
}

.logo-icon {
    font-size: 26px;
}

.nav-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: #FFEBEE;
    border-radius: 20px;
    font-size: 13px;
    color: #E53935;
    font-weight: 500;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    font-size: 14px;
    color: #333;
}

.nav-link {
    font-size: 14px;
    color: #666;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s;
}

.nav-link:hover {
    color: #E53935;
    background: #FFF5F5;
}

.nav-link-primary {
    background: #E53935;
    color: #fff !important;
}

.nav-link-primary:hover {
    background: #C62828;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4CAF50;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* 主容器 */
.main-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 90px 20px 50px;
}

/* Hero区域 */
.hero {
    text-align: center;
    padding: 50px 20px 30px;
    position: relative;
}

.hero-decoration {
    position: absolute;
    font-size: 80px;
    opacity: 0.15;
    top: 50%;
    transform: translateY(-50%);
}

.hero-decoration.left { left: -20px; }
.hero-decoration.right { right: -20px; }

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(135deg, #FFD700, #FFC107);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #5D4037;
    margin-bottom: 20px;
}

.hero-year {
    font-size: 42px;
    font-weight: 900;
    color: #E53935;
    margin-bottom: 10px;
}

.hero-title {
    font-size: 38px;
    font-weight: 800;
    color: #C62828;
    margin-bottom: 12px;
}

.hero-subtitle {
    font-size: 16px;
    color: #666;
    letter-spacing: 3px;
}

/* 参与人数 */
.participant-count {
    text-align: center;
    margin: 25px auto;
    padding: 18px 30px;
    background: linear-gradient(135deg, #FFF8E1, #FFECB3);
    border-radius: 16px;
    border: 1px solid #FFE082;
    max-width: 400px;
}

.participant-count .count-number {
    font-size: 36px;
    font-weight: 800;
    color: #F57C00;
}

.participant-count .count-label {
    font-size: 14px;
    color: #8D6E63;
    margin-top: 5px;
}

/* 倒计时 */
.countdown-section {
    margin: 35px 0;
    text-align: center;
}

.countdown-title {
    font-size: 15px;
    color: #666;
    margin-bottom: 20px;
}

.countdown {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.countdown-item {
    background: #fff;
    border: 2px solid #FFCDD2;
    border-radius: 14px;
    padding: 18px 22px;
    min-width: 80px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(229,57,53,0.1);
}

.countdown-number {
    font-size: 36px;
    font-weight: 700;
    color: #E53935;
}

.countdown-label {
    font-size: 13px;
    color: #999;
    margin-top: 5px;
}

/* 表单卡片 */
.form-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px 35px;
    max-width: 480px;
    margin: 30px auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    border: 1px solid #eee;
}

.form-title {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    color: #333;
}

.form-desc {
    text-align: center;
    color: #888;
    margin-bottom: 30px;
    font-size: 14px;
}

.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.form-label .required {
    color: #E53935;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    background: #FAFAFA;
    border: 2px solid #eee;
    border-radius: 10px;
    color: #333;
    font-size: 15px;
    transition: all 0.3s;
    outline: none;
}

.form-input:focus {
    border-color: #E53935;
    background: #fff;
}

.form-input::placeholder {
    color: #bbb;
}

.form-hint {
    font-size: 12px;
    color: #FF9800;
    margin-top: 6px;
    padding: 6px 10px;
    background: #FFF8E1;
    border-radius: 6px;
}

.auth-desc {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

textarea.form-input {
    min-height: 90px;
    resize: vertical;
}

/* 按钮 */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #E53935, #C62828);
    color: #fff;
    width: 100%;
    box-shadow: 0 4px 15px rgba(229,57,53,0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229,57,53,0.45);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 消息提示 */
.message {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.message-success {
    background: #E8F5E9;
    border: 1px solid #A5D6A7;
    color: #2E7D32;
}

.message-error {
    background: #FFEBEE;
    border: 1px solid #EF9A9A;
    color: #C62828;
}

.message-info {
    background: #FFF3E0;
    border: 1px solid #FFCC80;
    color: #E65100;
}

/* 已报名状态 */
.registered-state {
    text-align: center;
    padding: 30px 10px;
}

.registered-icon {
    font-size: 60px;
    margin-bottom: 15px;
}

.registered-title {
    font-size: 24px;
    font-weight: 700;
    color: #4CAF50;
    margin-bottom: 10px;
}

.registered-name {
    font-size: 16px;
    color: #333;
    margin-bottom: 8px;
}

.registered-name strong {
    color: #E53935;
}

.registered-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 20px;
}

.registered-info {
    background: #F5F5F5;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    text-align: left;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #ddd;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    color: #888;
    font-size: 13px;
}

.info-value {
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

.registered-tip {
    font-size: 13px;
    color: #FF9800;
    background: #FFF8E1;
    padding: 10px 15px;
    border-radius: 8px;
}

/* 登录提示 */
.login-prompt {
    text-align: center;
    padding: 40px 20px;
}

.prompt-icon {
    font-size: 50px;
    margin-bottom: 15px;
}

.prompt-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
}

.prompt-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 25px;
}

.prompt-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-outline {
    background: #fff;
    border: 2px solid #E53935;
    color: #E53935;
    padding: 12px 30px;
}

.btn-outline:hover {
    background: #FFF5F5;
}

/* 弹窗 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 20px;
    padding: 35px;
    width: 90%;
    max-width: 400px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    animation: modalIn 0.3s ease;
}

/* 隐藏弹窗滚动条但保留滚动功能 */
.modal-content {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;     /* Firefox */
}

.modal-content::-webkit-scrollbar {
    display: none;  /* Chrome, Safari and Opera */
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

.auth-title {
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 25px;
    color: #333;
}

.auth-form .form-group {
    margin-bottom: 16px;
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #666;
}

.auth-switch a {
    color: #E53935;
    text-decoration: none;
    font-weight: 500;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* 表单分隔线 */
.form-divider {
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #E53935;
    margin: 20px 0 15px;
    padding: 10px 0;
    border-top: 1px dashed #FFE0E0;
    border-bottom: 1px dashed #FFE0E0;
    background: #FFF5F5;
}

/* 等待状态 */
.waiting-state {
    text-align: center;
    padding: 40px 20px;
}

.waiting-icon {
    font-size: 70px;
    margin-bottom: 20px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.waiting-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
}

.waiting-desc {
    color: #666;
    font-size: 15px;
    line-height: 1.6;
}

/* 中奖结果 */
.winner-card {
    background: linear-gradient(135deg, #FFF8E1, #FFECB3);
    border: 2px solid #FFD54F;
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
}

.winner-badge {
    display: inline-block;
    padding: 10px 25px;
    background: linear-gradient(135deg, #FFD700, #FFC107);
    border-radius: 25px;
    font-size: 16px;
    font-weight: 700;
    color: #5D4037;
    margin-bottom: 20px;
}

.winner-prize {
    font-size: 28px;
    font-weight: 700;
    color: #E53935;
    margin-bottom: 15px;
}

.winner-message {
    color: #795548;
    font-size: 14px;
}

/* 奖品展示 */
.prizes-section {
    margin: 50px 0;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.prizes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
}

.prize-card {
    background: #fff;
    border: 2px solid #eee;
    border-radius: 16px;
    padding: 25px 20px;
    text-align: center;
    transition: all 0.3s;
    position: relative;
}

.prize-card:hover {
    transform: translateY(-5px);
    border-color: #FFCA28;
    box-shadow: 0 10px 30px rgba(255,193,7,0.2);
}

.prize-level {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 14px;
    background: linear-gradient(135deg, #E53935, #C62828);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

.prize-icon {
    width: 70px;
    height: 70px;
    margin: 15px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
}

.prize-icon-1::before { content: '🏆'; }
.prize-icon-2::before { content: '🥈'; }
.prize-icon-3::before { content: '🥉'; }
.prize-icon-4::before { content: '🎁'; }

.prize-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
}

.prize-quantity {
    color: #999;
    font-size: 13px;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 30px 20px;
    color: #999;
    font-size: 13px;
    border-top: 1px solid #eee;
    margin-top: 50px;
    background: #fff;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 响应式 */
@media (max-width: 600px) {
    .navbar { padding: 0 15px; }
    .logo span:not(.logo-icon) { display: none; }
    .hero-title { font-size: 28px; }
    .hero-year { font-size: 32px; }
    .form-card { padding: 30px 20px; margin: 20px 10px; }
    .countdown-item { padding: 14px 16px; min-width: 65px; }
    .countdown-number { font-size: 28px; }
    .decoration { display: none; }
    
    /* 弹窗响应式 */
    .modal-content {
        padding: 25px;
        width: 95%;
        max-height: 90vh;
    }
    
    .auth-title {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-input {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .btn {
        padding: 14px 20px;
        font-size: 15px;
    }
    
    .form-divider {
        margin: 15px 0 12px;
        padding: 8px 0;
        font-size: 13px;
    }
    
    .mascot-grid { 
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .mascot-card {
        padding: 15px;
    }
    .mascot-image {
        max-width: 100px;
    }
    .mascot-name {
        font-size: 16px;
    }
    .mascot-desc {
        font-size: 12px;
    }
}

@media (max-width: 400px) {
    .mascot-grid {
        grid-template-columns: 1fr;
    }
    .mascot-image {
        max-width: 120px;
    }
}

/* 吉祥物展示 */
.mascot-section {
    margin: 50px 0;
}

.mascot-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.mascot-card {
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    border: 2px solid #FFE0E0;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(229,57,53,0.08);
    text-align: center;
}

.mascot-card:hover {
    transform: translateY(-5px);
    border-color: #FFCA28;
    box-shadow: 0 15px 40px rgba(255,193,7,0.15);
}

.mascot-image {
    width: 100%;
    max-width: 150px;
    height: auto;
    aspect-ratio: 1;
    margin: 0 auto 15px;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, #FFF8E1, #FFECB3);
}

.mascot-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.mascot-card:hover .mascot-image img {
    transform: scale(1.1);
}

.mascot-info {
    text-align: center;
}

.mascot-name {
    font-size: 18px;
    font-weight: 700;
    color: #E53935;
    margin-bottom: 8px;
}

.mascot-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}
