* {
    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, #a8e6cf 0%, #88d8a3 25%, #7bc88c 50%, #5db075 75%, #3d9970 100%);
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(255,255,255,0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(255,255,255,0.1) 0%, transparent 20%),
        radial-gradient(circle at 50% 50%, rgba(255,255,255,0.05) 0%, transparent 30%);
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '🌿 🌸 🌱 🌺 🍃 🌷 🌿 🌸 🌱 🌺 🍃 🌷';
    position: fixed;
    bottom: 10px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 20px;
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
    letter-spacing: 10px;
}

.warning-banner {
    background: linear-gradient(90deg, #e8a87c, #c38d6b);
    color: white;
    text-align: center;
    padding: 12px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(195, 141, 107, 0.3);
    position: relative;
    z-index: 1;
}

.container {
    max-width: 420px;
    margin: 0 auto;
    background: linear-gradient(180deg, #fffef9 0%, #f5f9f0 100%);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(61, 153, 112, 0.25);
    position: relative;
    z-index: 1;
    border: 2px solid rgba(139, 195, 74, 0.2);
}

h1 {
    text-align: center;
    font-size: 28px;
    margin-bottom: 15px;
    color: #333;
}

.point-status {
    text-align: center;
    font-size: 20px;
    color: #666;
    margin-bottom: 25px;
}

.point-status span {
    font-weight: bold;
    color: #4CAF50;
}

/* 集點格子 */
.stamps-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 30px;
}

.stamp {
    aspect-ratio: 1;
    border: 3px dashed #ddd;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    position: relative;
}

.stamp.collected {
    border: 3px solid #4CAF50;
    background: linear-gradient(135deg, #81c784 0%, #4CAF50 100%);
    animation: stampCollected 0.5s ease;
}

.stamp.collected::after {
    content: '✓';
    position: absolute;
    bottom: 5px;
    right: 5px;
    font-size: 14px;
    color: white;
    background: rgba(0,0,0,0.2);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes stampCollected {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* QR Code 掃描器 */
#reader-container {
    margin-bottom: 20px;
}

#reader {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 15px;
}

#reader video {
    border-radius: 16px;
}

/* 按鈕樣式 */
.actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn {
    width: 100%;
    padding: 16px 24px;
    font-size: 18px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #66bb6a 0%, #43a047 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.5);
}

.btn-primary:disabled {
    background: #ccc;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #f0f0f0;
    color: #666;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
}

/* 完成提示 */
.completion-message {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border-radius: 16px;
    color: white;
    margin-bottom: 20px;
    animation: fadeIn 0.5s ease;
}

.completion-message h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.completion-message p {
    font-size: 16px;
    opacity: 0.9;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Toast 通知 */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 15px 25px;
    border-radius: 12px;
    font-size: 16px;
    z-index: 1000;
    animation: toastIn 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.toast.success {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

.toast.error {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
}

.toast.warning {
    background: linear-gradient(135deg, #ff9a56 0%, #ff6b6b 100%);
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* 響應式設計 */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 20px;
        border-radius: 20px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .stamps-container {
        gap: 8px;
    }
    
    .stamp {
        font-size: 24px;
    }
    
    .btn {
        padding: 14px 20px;
        font-size: 16px;
    }
}
