/* 推薦系統樣式 */

/* 推薦碼顯示 */
.referral-code-display {
    font-size: 1.2rem;
}

.code-label {
    color: #666;
    margin-right: 8px;
}

.code-value {
    font-weight: bold;
    font-size: 1.5rem;
    color: #007bff;
    padding: 4px 12px;
    background: #e7f3ff;
    border-radius: 4px;
}

/* 統計卡片 */
.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card.pending {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-card.success {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* 推薦任務面板 */
.referral-tasks-panel .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    user-select: none;
}

.referral-tasks-panel .card-header:hover {
    opacity: 0.95;
}

/* 進度統計小卡片 */
.stat-mini-card {
    display: flex;
    align-items: center;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.stat-mini-card:hover {
    transform: scale(1.05);
}

.stat-icon {
    font-size: 2.5rem;
    margin-right: 15px;
}

.stat-content {
    flex: 1;
}

.stat-mini-card .stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 0;
}

.stat-mini-card .stat-label {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* 朋友卡片 */
.friends-list {
    margin-top: 20px;
}

.friend-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.friend-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.friend-card-header {
    background: linear-gradient(90deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #dee2e6;
}

.friend-number {
    font-size: 1.2rem;
}

.friend-name {
    flex: 1;
    font-weight: 600;
    color: #333;
}

.friend-status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.friend-card-body {
    padding: 15px;
}

/* 進度條 */
.progress-section {
    margin-bottom: 15px;
}

.progress-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
}

.coupon-progress-bar {
    display: flex;
    gap: 4px;
    font-size: 1.5rem;
    line-height: 1;
    font-family: monospace;
}

.progress-block {
    cursor: help;
    transition: transform 0.2s;
}

.progress-block:hover {
    transform: scale(1.2);
}

.progress-block.filled {
    color: #28a745;
}

.progress-block.empty {
    color: #dee2e6;
}

/* 獎勵資訊 */
.reward-info {
    display: flex;
    gap: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 0.9rem;
}

.reward-active {
    color: #28a745;
}

.reward-pending {
    color: #ffc107;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .referral-code-display {
        font-size: 1rem;
    }
    
    .code-value {
        font-size: 1.2rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .friend-card-header {
        flex-wrap: wrap;
    }
    
    .coupon-progress-bar {
        font-size: 1.2rem;
    }
    
    .stat-mini-card {
        margin-bottom: 10px;
    }
    
    .reward-info {
        flex-direction: column;
        gap: 5px;
    }
}

/* Badge 樣式 */
.badge-warning {
    background-color: #ffc107;
    color: #212529;
}

.badge-info {
    background-color: #17a2b8;
    color: white;
}

.badge-success {
    background-color: #28a745;
    color: white;
}

.badge {
    display: inline-block;
    padding: 0.25em 0.6em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
}

/* Bootstrap Icons 相容 */
.bi {
    display: inline-block;
    vertical-align: -0.125em;
}

/* 視覺化進度條樣式 */
.visual-progress-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    position: relative;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
}

.step-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 2;
    position: relative;
}

.step-circle.completed {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: 3px solid #28a745;
}

.step-circle.ordered {
    background: linear-gradient(135deg, #ffc107 0%, #ffdb4d 100%);
    color: #333;
    border: 3px solid #ffc107;
    animation: pulse 2s infinite;
}

.step-circle.pending {
    background: #f8f9fa;
    color: #adb5bd;
    border: 3px solid #dee2e6;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(255, 193, 7, 0.4);
    }
    50% {
        box-shadow: 0 2px 16px rgba(255, 193, 7, 0.8);
    }
}

.step-check {
    font-size: 1.5rem;
}

.step-number {
    font-size: 1rem;
}

.step-label {
    margin-top: 8px;
    font-size: 0.75rem;
    color: #6c757d;
    font-weight: 500;
}

.step-connector {
    position: absolute;
    top: 25px;
    left: 50%;
    width: 100%;
    height: 4px;
    background: #dee2e6;
    z-index: 1;
}

.step-connector.completed {
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
}

.step-connector.ordered {
    background: linear-gradient(90deg, #ffc107 0%, #ffdb4d 100%);
}

/* 進度摘要 */
.progress-summary {
    margin-top: 10px;
}

/* 獎勵狀況卡片 */
.reward-status-section {
    margin-top: 20px;
}

.reward-title {
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 10px;
}

.reward-box {
    transition: transform 0.2s;
}

.reward-box:hover {
    transform: scale(1.05);
}

/* 進度圖例 */
.progress-legend {
    border: 1px solid #dee2e6;
}

.legend-title {
    font-size: 0.85rem;
    color: #6c757d;
}

.legend-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.legend-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.95rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.legend-circle.completed-demo {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: 2px solid #28a745;
}

.legend-circle.ordered-demo {
    background: linear-gradient(135deg, #ffc107 0%, #ffdb4d 100%);
    color: #333;
    border: 2px solid #ffc107;
}

.legend-circle.pending-demo {
    background: #f8f9fa;
    color: #adb5bd;
    border: 2px solid #dee2e6;
}

.legend-item span {
    font-size: 0.75rem;
    color: #6c757d;
    line-height: 1.2;
}

/* 響應式調整 */
@media (max-width: 576px) {
    .step-circle {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .step-check {
        font-size: 1.2rem;
    }
    
    .step-number {
        font-size: 0.85rem;
    }
    
    .step-label {
        font-size: 0.65rem;
    }
    
    .step-connector {
        top: 20px;
    }
    
    .reward-box {
        margin-bottom: 10px;
    }
}
/* 倒數計時樣式 */
.coupon-countdown {
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    margin-left: auto;
    margin-right: 8px;
}

.coupon-countdown.normal {
    background: #d1ecf1;
    color: #0c5460;
}

.coupon-countdown.warning {
    background: #fff3cd;
    color: #856404;
}

.coupon-countdown.urgent {
    background: #f8d7da;
    color: #721c24;
    animation: pulse 2s infinite;
}

.coupon-countdown.expired {
    background: #d6d8db;
    color: #495057;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}