* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    background-color: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 500px;
    width: 100%;
}

h1 {
    color: #333;
    margin-bottom: 30px;
    font-size: 2rem;
}

.card-container {
    margin-bottom: 20px;
}

.claim-btn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(79, 172, 254, 0.4);
    /* 提高移动设备上的可点击性 */
    -webkit-tap-highlight-color: transparent; /* 移除点击高亮 */
    user-select: none; /* 防止文本选择 */
    min-width: 200px; /* 确保有足够的点击区域 */
    display: inline-block;
}

.claim-btn:hover,
.claim-btn:active {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.6);
}

.claim-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 手动复制输入框和按钮样式 */
#manualCopyInput {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    text-align: center;
    background-color: #f5f5f5;
}

.copy-btn {
    background-color: #2196F3;
    color: white;
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin: 10px 0;
    width: 100%;
    transition: background-color 0.3s;
}

.copy-btn:hover {
    background-color: #0b7dda;
}

.copy-btn:active {
    background-color: #0967b5;
}

/* 历史领取记录样式 */
.history-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.history-section h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.history-list {
    max-height: 300px;
    overflow-y: auto;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin-bottom: 8px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #4facfe;
    transition: all 0.2s ease;
}

.history-item:hover {
    background-color: #e9ecef;
    transform: translateX(5px);
}

.history-item .card-code {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #333;
    word-break: break-all;
}

.history-item .card-time {
    font-size: 0.8rem;
    color: #666;
    margin-left: 15px;
    white-space: nowrap;
}

.no-history {
    text-align: center;
    color: #999;
    font-style: italic;
    margin: 0;
}

/* 滚动条样式 */
.history-list::-webkit-scrollbar {
    width: 6px;
}

.history-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.card-display {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 10px;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    display: none;
    word-break: break-all;
    box-shadow: 0 5px 15px rgba(240, 147, 251, 0.4);
}

.card-display.show {
    display: block;
    animation: fadeIn 0.5s ease;
}

.info-text {
    color: #666;
    font-size: 0.9rem;
    margin-top: 20px;
}

.reset-info {
    color: #ff6b6b;
    font-weight: bold;
    margin-top: 10px;
    font-size: 1rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 30px;
    border-radius: 10px;
    width: 80%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

.modal-content h3 {
    color: #333;
    margin-bottom: 20px;
}

.modal-content p {
    color: #666;
    margin-bottom: 20px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #333;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}