/**
 * User Levels Page Styles
 * External CSS for levels.php
 */

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800&display=swap');

:root {
    --primary-color: #4a90e2;
    --secondary-color: #f39c12;
    --tertiary-color: #2ecc71;
    --background-color: #f4f7fa;
    --text-color: #333;
    --card-bg: #ffffff;
    --font-family: 'Tajawal', sans-serif;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 15px 30px rgba(0, 0, 0, 0.2);
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: var(--font-family) !important;
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
.btn,
.card-title,
.badge {
    font-family: var(--font-family) !important;
}

/* ==================== USER INFO CARD ==================== */
.user-info-card {
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    border-radius: 20px;
    box-shadow: rgba(17, 12, 46, 0.05) 0px 48px 100px 0px;
    border: none;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.user-info-card:hover {
    box-shadow: rgba(17, 12, 46, 0.08) 0px 48px 100px 0px;
    transform: translateY(-2px);
}

.user-avatar {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: rgba(50, 50, 93, 0.25) 0px 6px 12px -2px;
}

.user-verified-badge {
    width: 24px;
    height: 24px;
    border: 2px solid #fff;
}

/* ==================== PAGE HEADER ==================== */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.page-title {
    color: var(--primary-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    font-weight: 800;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.page-subtitle {
    color: #6c757d;
    font-size: 1.1rem;
    margin-top: 1.5rem;
}

/* ==================== LEVEL CARDS ==================== */
.level-card {
    background-color: var(--card-bg);
    border: none;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--shadow-md);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.level-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(to bottom, var(--level-color, #4a90e2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.level-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.level-card:hover::before {
    opacity: 1;
}

.level-card.current-level {
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(74, 144, 226, 0.3), var(--shadow-lg);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(74, 144, 226, 0.3), var(--shadow-lg);
    }
    50% {
        box-shadow: 0 0 30px rgba(74, 144, 226, 0.5), var(--shadow-lg);
    }
}

.current-level-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    z-index: 10;
    animation: slideInRight 0.5s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.level-card-body {
    padding: 2rem;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* ==================== LEVEL ICON ==================== */
.level-icon-wrapper {
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.level-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1), rgba(74, 144, 226, 0.05));
    transition: all 0.4s ease;
    position: relative;
}

.level-card:hover .level-icon {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.level-icon i {
    font-size: 2.5rem;
}

/* ==================== LEVEL INFO ==================== */
.level-name {
    color: var(--primary-color);
    font-weight: 800;
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.level-description {
    color: #6c757d;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.6;
    min-height: 2.5rem;
}

.points-required {
    color: var(--secondary-color);
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    background: rgba(243, 156, 18, 0.1);
    padding: 8px 20px;
    border-radius: 30px;
}

.points-required i {
    margin-left: 5px;
}

/* ==================== BENEFITS LIST ==================== */
.benefits-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: auto;
}

.benefits-title {
    font-size: 1rem;
    font-weight: 700;
    color: #495057;
    margin-bottom: 1rem;
    text-align: right;
}

.benefit-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
    text-align: right;
}

.benefit-list li {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    color: #495057;
    transition: all 0.2s ease;
    padding: 5px;
    border-radius: 6px;
}

.benefit-list li:hover {
    background: rgba(46, 204, 113, 0.05);
    transform: translateX(-5px);
}

.benefit-list li:before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--tertiary-color);
    margin-left: 10px;
    font-size: 0.9rem;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(46, 204, 113, 0.1);
    border-radius: 50%;
}

.benefit-list li:last-child {
    margin-bottom: 0;
}

/* ==================== LEVEL BADGE COLORS ==================== */
.text-bronze {
    color: #cd7f32;
}

.text-silver {
    color: #c0c0c0;
}

.text-gold {
    color: #ffd700;
}

.text-platinum {
    color: #e5e4e2;
}

.text-diamond {
    color: #b9f2ff;
}

.text-legendary {
    color: #ff6b6b;
}

/* ==================== POINTS EARNING CARD ==================== */
.points-card {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    border: none;
    transition: all 0.3s ease;
}

.points-card:hover {
    box-shadow: var(--shadow-lg);
}

.points-card-title {
    color: var(--primary-color);
    font-weight: 800;
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
    width: 100%;
}

.points-card-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.points-list {
    max-width: 700px;
    margin: 0 auto;
}

.points-list .list-group-item {
    border: none;
    border-radius: 12px;
    margin-bottom: 12px;
    background: #f8f9fa;
    padding: 1.2rem 1.5rem;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.points-list .list-group-item:hover {
    background: #e9ecef;
    transform: translateX(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.points-list .badge {
    font-size: 1rem;
    padding: 8px 16px;
    font-weight: 700;
}

.points-list i {
    margin-left: 10px;
    opacity: 0.7;
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.delay-1 { animation-delay: 0.1s; opacity: 0; }
.delay-2 { animation-delay: 0.2s; opacity: 0; }
.delay-3 { animation-delay: 0.3s; opacity: 0; }
.delay-4 { animation-delay: 0.4s; opacity: 0; }
.delay-5 { animation-delay: 0.5s; opacity: 0; }
.delay-6 { animation-delay: 0.6s; opacity: 0; }
.delay-7 { animation-delay: 0.7s; opacity: 0; }

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 992px) {
    .page-title {
        font-size: 2rem;
    }

    .level-card-body {
        padding: 1.5rem;
    }

    .level-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }

    .level-icon i {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 1.8rem;
    }

    .user-avatar {
        width: 60px;
        height: 60px;
    }

    .level-name {
        font-size: 1.3rem;
    }

    .points-card-title {
        font-size: 1.6rem;
    }

    .benefit-list li {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .page-title {
        font-size: 1.5rem;
    }

    .level-icon {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }

    .level-icon i {
        font-size: 1.8rem;
    }

    .level-name {
        font-size: 1.2rem;
    }

    .points-required {
        font-size: 1.1rem;
    }
}
