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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 500px;
    margin: 0 auto;
}

/* ========== 头部 ========== */
.header {
    text-align: center;
    margin-bottom: 25px;
    position: relative;
}

.back-btn {
    position: absolute;
    top: 0;
    left: 0;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
}

.back-btn:hover {
    transform: translateX(-5px);
    background: rgba(255, 255, 255, 0.3);
}

.header h1 {
    color: white;
    font-size: 26px;
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.header-desc {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

/* ========== 签到卡片 ========== */
.checkin-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.checkin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.checkin-header h2 {
    font-size: 18px;
    color: #333;
}

.checkin-status {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 12px;
    background: #f0f0f0;
    color: #666;
    font-weight: bold;
}

.checkin-status.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.checkin-progress {
    margin-bottom: 25px;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: #f0f0f0;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.5s ease;
    border-radius: 15px;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    font-weight: bold;
    color: #333;
    z-index: 1;
}

.checkin-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 25px;
}

.day-item {
    text-align: center;
    padding: 12px 5px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.day-item.completed {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
    transform: scale(1.05);
}

.day-item.completed .day-number,
.day-item.completed .day-status {
    color: white;
}

.day-item.special {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    border: 2px solid #f5576c;
}

.day-item.special.completed {
    animation: pulse 1.5s infinite;
}

.day-number {
    font-size: 12px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.day-status {
    font-size: 9px;
    color: #999;
}

.checkin-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.checkin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

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

.checkin-btn.completed {
    background: #4CAF50;
}

.checkin-tip {
    text-align: center;
    font-size: 12px;
    color: #666;
    margin-top: 15px;
    line-height: 1.6;
}

/* ========== 秒杀卡片 ========== */
.seckill-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
}

.seckill-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(238, 90, 111, 0.3);
}

.product-showcase {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.product-img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    background: linear-gradient(135deg, #f5f7fa, #e8ecf1);
    border-radius: 15px;
    padding: 0;
}

.product-info {
    flex: 1;
}

.product-name {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
}

.product-price {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.original-price {
    font-size: 13px;
    color: #999;
    text-decoration: line-through;
}

.seckill-price {
    font-size: 24px;
    font-weight: bold;
    color: #ff6b6b;
}

.seckill-status {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 20px;
}

.countdown-container {
    font-size: 14px;
    margin-bottom: 10px;
}

.countdown-time {
    font-size: 32px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.countdown-label {
    font-size: 12px;
    opacity: 0.9;
    margin-top: 5px;
}

.seckill-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.info-item {
    text-align: center;
    padding: 15px 10px;
    background: #f8f9fa;
    border-radius: 12px;
}

.info-label {
    font-size: 11px;
    color: #666;
    margin-bottom: 8px;
}

.info-value {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.seckill-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.seckill-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.seckill-btn:hover::before {
    width: 300px;
    height: 300px;
}

.seckill-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(238, 90, 111, 0.4);
}

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

.seckill-btn.ready {
    animation: pulse 1s infinite;
}

/* ========== 中奖名单 ========== */
.winners-section,
.history-section,
.rules-section {
    background: white;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.winners-section h2,
.history-section h2,
.rules-section h2 {
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
}

.winners-list,
.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.winner-item,
.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.winner-rank {
    font-size: 18px;
    font-weight: bold;
    color: #667eea;
    min-width: 30px;
}

.winner-rank.top3 {
    color: #ff6b6b;
}

.winner-info {
    flex: 1;
    margin-left: 15px;
}

.winner-phone {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 4px;
}

.winner-time {
    font-size: 12px;
    color: #999;
}

.history-status {
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.history-status.won {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.history-status.lost {
    background: #f0f0f0;
    color: #666;
}

.empty-tip {
    text-align: center;
    color: #999;
    font-size: 14px;
    padding: 30px;
}

/* ========== 活动规则 ========== */
.rules-content {
    font-size: 14px;
    line-height: 2;
    color: #666;
}

.rules-content p {
    margin-bottom: 8px;
}

.rules-content strong {
    color: #333;
}

/* ========== 弹窗 ========== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 350px;
    width: 90%;
    text-align: center;
}

.modal-animation {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.countdown-big {
    font-size: 80px;
    font-weight: bold;
    color: #667eea;
    animation: scaleUp 1s ease;
}

.countdown-text {
    font-size: 18px;
    color: #666;
}

.modal-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.result-icon {
    font-size: 80px;
    animation: bounceIn 0.6s ease;
}

.result-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.result-detail {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
}

.close-btn {
    padding: 12px 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

/* ========== 动画 ========== */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleUp {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ========== 调试面板 ========== */
.debug-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    z-index: 10000;
    min-width: 300px;
    max-width: 90%;
}

.debug-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.debug-header h3 {
    font-size: 18px;
    color: #333;
    margin: 0;
}

.debug-close {
    background: #f0f0f0;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.debug-close:hover {
    background: #e0e0e0;
    transform: rotate(90deg);
}

.debug-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.debug-btn {
    padding: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.debug-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

.debug-info {
    margin-top: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    font-size: 13px;
    color: #666;
    line-height: 1.8;
}

.debug-info span {
    font-weight: bold;
    color: #667eea;
}

/* ========== 响应式 ========== */
@media (max-width: 480px) {
    body {
        padding: 15px;
    }

    .header h1 {
        font-size: 22px;
    }

    .checkin-days {
        gap: 6px;
    }

    .day-item {
        padding: 10px 3px;
    }

    .day-number {
        font-size: 11px;
    }

    .product-img {
        width: 120px;
        height: 120px;
        padding: 0;
    }

    .countdown-time {
        font-size: 24px;
    }
}

