/* 计算中弹窗样式 */
.calculation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 15, 15, 0.85);
    backdrop-filter: blur(15px) saturate(1.2);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
}

.calculation-modal {
    background: rgba(25, 25, 35, 0.95);
    backdrop-filter: blur(20px) saturate(1.3);
    border-radius: 16px;
    padding: 30px;
    max-width: 380px;
    width: 85%;
    text-align: center;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #999999;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 10;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transform: scale(1.1);
}

.calculation-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.modal-icon {
    font-size: 48px;
    margin-bottom: 16px;
    animation: spin 2s linear infinite;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.modal-title {
    font-size: 24px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.modal-subtitle {
    font-size: 14px;
    color: #b8b8b8;
    margin-bottom: 24px;
    line-height: 1.4;
}

.lottery-info {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.lottery-info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.lottery-info-row:last-child {
    margin-bottom: 0;
}

.lottery-info-label {
    color: #a0a0a0;
    font-weight: 500;
}

.lottery-info-value {
    color: #ffffff;
    font-weight: 600;
}

.period-number {
    color: #ffd700;
    font-size: 18px;
}

.winning-numbers {
    color: #ff6b6b;
    font-size: 18px;
    letter-spacing: 2px;
}

.progress-section {
    margin-bottom: 30px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #81C784);
    border-radius: 4px;
    animation: progress-pulse 2s ease-in-out infinite;
    transition: width 0.3s ease;
}

@keyframes progress-pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

.time-info {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #e0e0e0;
}

.countdown {
    font-size: 20px;
    font-weight: bold;
    color: #ffd700;
    margin-bottom: 16px;
    text-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.estimated-time {
    font-size: 12px;
    color: #999999;
    margin-bottom: 20px;
}

.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.modal-button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.button-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.button-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.button-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* 移动端适配 */
@media (max-width: 600px) {
    .calculation-modal {
        padding: 25px 15px;
        margin: 15px;
        max-width: 90%; /* 减小最大宽度以适应小屏幕 */
        width: 90%; /* 减小宽度 */
    }
    
    .modal-title {
        font-size: 20px; /* 减小标题字体 */
    }
    
    .modal-subtitle {
        font-size: 13px; /* 减小副标题字体 */
    }
    
    .modal-icon {
        font-size: 40px; /* 减小图标大小 */
        margin-bottom: 12px;
    }
    
    .lottery-info {
        padding: 15px; /* 减小内边距 */
        margin-bottom: 20px;
    }
    
    .lottery-info-row {
        flex-direction: column;
        text-align: left;
        margin-bottom: 12px;
        font-size: 13px; /* 减小字体 */
    }
    
    .lottery-info-value {
        margin-top: 4px;
    }
    
    .period-number, .winning-numbers {
        font-size: 16px; /* 减小特殊值字体 */
    }
    
    .countdown {
        font-size: 18px; /* 减小倒计时字体 */
        margin-bottom: 12px;
    }
    
    .modal-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .modal-button {
        padding: 12px 20px;
        font-size: 13px;
    }
}
