/**
 * استایل‌های سیستم امتیازدهی
 * طراحی مخصوص صفحات امتیازات و جوایز
 */

/* کارت‌های امتیازات */
.points-card {
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.points-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.points-card .card-body {
    padding: 2rem;
}

.points-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.points-label {
    font-size: 1rem;
    opacity: 0.8;
}

/* سطح‌بندی کاربران */
.user-level-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.user-level-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.level-bronze {
    color: #cd7f32;
}

.level-silver {
    color: #c0c0c0;
}

.level-gold {
    color: #ffd700;
}

.level-platinum {
    color: #e5e4e2;
}

/* جوایز */
.reward-card {
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.reward-card:hover {
    border-color: #28a745;
    transform: scale(1.02);
}

.reward-card .card-body {
    padding: 1.5rem;
}

.reward-points {
    font-size: 1.2rem;
    font-weight: bold;
}

.reward-description {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* تاریخچه تراکنش‌ها */
.transaction-table {
    border-radius: 10px;
    overflow: hidden;
}

.transaction-table th {
    background-color: #f8f9fa;
    border: none;
    font-weight: 600;
    padding: 1rem;
}

.transaction-table td {
    padding: 1rem;
    border: none;
    border-bottom: 1px solid #e9ecef;
}

.transaction-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* نشان‌های وضعیت */
.status-badge {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

.status-earn {
    background-color: #d4edda;
    color: #155724;
}

.status-spend {
    background-color: #f8d7da;
    color: #721c24;
}

.status-expire {
    background-color: #fff3cd;
    color: #856404;
}

/* نمودارها */
.chart-container {
    position: relative;
    height: 300px;
    margin: 2rem 0;
}

/* دکمه‌های عملیات */
.action-btn {
    border-radius: 25px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* مودال‌ها */
.points-modal .modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.points-modal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px 15px 0 0;
}

.points-modal .modal-header .btn-close {
    filter: invert(1);
}

/* فرم‌ها */
.points-form .form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.points-form .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.points-form .form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

/* آمار و نمودارها */
.stats-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.stats-number {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
}

.stats-label {
    color: #6c757d;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* پیشرفت سطح */
.level-progress {
    background-color: #e9ecef;
    border-radius: 10px;
    height: 20px;
    overflow: hidden;
    margin: 1rem 0;
}

.level-progress-bar {
    background: linear-gradient(90deg, #28a745, #20c997);
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
}

.level-progress-text {
    text-align: center;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #6c757d;
}

/* انیمیشن‌ها */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .points-card .card-body {
        padding: 1.5rem;
    }
    
    .points-number {
        font-size: 2rem;
    }
    
    .user-level-icon {
        font-size: 2rem;
    }
    
    .transaction-table th,
    .transaction-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }
    
    .action-btn {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .points-card .card-body {
        padding: 1rem;
    }
    
    .points-number {
        font-size: 1.8rem;
    }
    
    .stats-card {
        padding: 1.5rem;
    }
    
    .stats-number {
        font-size: 1.5rem;
    }
}

/* تم تاریک */
@media (prefers-color-scheme: dark) {
    .points-card {
        background-color: #2d3748;
        color: white;
    }
    
    .transaction-table {
        background-color: #2d3748;
        color: white;
    }
    
    .transaction-table th {
        background-color: #4a5568;
    }
    
    .transaction-table tbody tr:hover {
        background-color: #4a5568;
    }
    
    .points-form .form-control {
        background-color: #4a5568;
        border-color: #718096;
        color: white;
    }
    
    .points-form .form-control:focus {
        background-color: #4a5568;
        border-color: #667eea;
        color: white;
    }
    
    .stats-card {
        background-color: #2d3748;
        color: white;
    }
}

/* افکت‌های ویژه */
.glow-effect {
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* تایپوگرافی */
.points-title {
    font-family: 'Vazir', sans-serif;
    font-weight: 700;
    color: #2d3748;
}

.points-subtitle {
    font-family: 'Vazir', sans-serif;
    font-weight: 500;
    color: #4a5568;
}

/* نمایش امتیازات در فروشگاه */
.product-points-display {
    text-align: center;
    margin-top: 0.5rem;
}

.product-points-display small {
    font-size: 0.75rem;
    font-weight: 500;
}

.product-points-display .fas.fa-star {
    color: #ffc107;
    margin-left: 0.25rem;
}

.product-points-display .product-points {
    font-weight: 600;
    color: #28a745;
}

/* Hide price display element */
.price-display {
    display: none !important;
}

/* Cart points display */
.cart-points-display {
    text-align: center;
    margin-top: 0.25rem;
}

.cart-points-display small {
    font-size: 0.7rem;
    font-weight: 500;
}

.cart-points-display .fas.fa-star {
    color: #ffc107;
    margin-left: 0.25rem;
}

.cart-points-display .cart-points {
    font-weight: 600;
    color: #28a745;
}

/* آیکون‌ها */
.points-icon {
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

/* جداول */
.table-modern {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.table-modern th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    text-align: center;
    padding: 1rem;
}

.table-modern td {
    text-align: center;
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.table-modern tbody tr:last-child td {
    border-bottom: none;
}

.table-modern tbody tr:hover {
    background-color: #f8f9fa;
    transform: scale(1.01);
    transition: all 0.3s ease;
}
