/* Global Variables & Reset */
:root {
    --primary-color: #4CAF50;
    --secondary-color: #FF9800;
    --bg-light: #f5f7fa;
    --text-dark: #333;
    --text-light: #666;
    --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    background-color: var(--bg-light);
    line-height: 1.6;
}

/* Hero Section */
.referral-hero {
    position: relative;
    height: 400px;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../assets/images/refer_earn_hero_v2.png');
    background-size: cover;
    background-position: center;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

.referral-hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.referral-hero .subline {
    font-size: 1.2rem;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
}

/* Campaign Progress Section */
.campaign-progress-section {
    background: white;
    max-width: 900px;
    margin: -60px auto 40px;
    /* Overlap hero, space below */
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    text-align: center;
    position: relative;
    z-index: 20;
}

.campaign-progress-section h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.progress-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.progress-card {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.progress-bar-bg {
    background: #e0e0e0;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    width: 0%;
    transition: width 1s ease-in-out;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    margin-top: 5px;
}

.campaign-frozen-banner {
    background: #fff3cd;
    color: #856404;
    padding: 20px;
    border: 1px solid #ffeeba;
    border-radius: 8px;
    margin: 20px auto;
    max-width: 900px;
    text-align: center;
    font-weight: 600;
    display: none;
    /* Hidden by default */
}

/* User Count */
.user-count-display {
    font-size: 1rem;
    color: #666;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* Role Selection Cards */
.role-selection {
    display: flex;
    justify-content: center;
    gap: 20px;
    gap: 20px;
    padding: 0 20px;
    margin-top: 0;
    position: relative;
    z-index: 10;
    flex-wrap: wrap;
}

.role-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    width: 280px;
    text-align: center;
    box-shadow: var(--card-shadow);
    cursor: pointer;
    transition: var(--transition-speed);
    border: 2px solid transparent;
}

.role-card:hover,
.role-card.active {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.role-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.role-card h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Role Content Sections */
.role-content-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.role-content {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
}

.role-content.active {
    display: block;
}

.benefits-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.benefits-list li {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.benefits-list i {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
    display: block;
}

.important-badge {
    display: inline-block;
    background: #ffebee;
    color: #c62828;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 15px;
}

/* Leaderboard Section */
.leaderboard-section {
    background: #e8f5e9;
    padding: 60px 20px;
    text-align: center;
}

.reward-highlight {
    font-size: 1.5rem;
    color: #4CAF50;
    font-weight: 700;
    margin: 20px 0;
}

/* Anti-Fraud Section */
.trust-section {
    max-width: 900px;
    margin: 40px auto;
    padding: 40px 20px;
    text-align: center;
}

.trust-badge-row {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.trust-badge {
    flex: 1;
    min-width: 200px;
    text-align: center;
}

.trust-badge i {
    font-size: 2rem;
    color: #607d8b;
    margin-bottom: 10px;
}

/* Terms & Conditions */
.terms-section {
    max-width: 800px;
    margin: 20px auto 100px;
    /* Bottom margin for sticky CTA */
    padding: 20px;
    border-top: 1px solid #ddd;
}

.terms-header {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    font-weight: 600;
}

.terms-content {
    display: none;
    padding: 15px;
    font-size: 0.9rem;
    color: #666;
}

.terms-content.open {
    display: block;
}

/* Sticky CTA Footer */
.sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    padding: 15px 20px;
    display: flex;
    justify-content: center;
    gap: 15px;
    z-index: 100;
    animation: slideUp 0.3s ease-out;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.3);
}

.btn-whatsapp {
    background: #25D366;
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .referral-hero h1 {
        font-size: 1.8rem;
    }

    .role-selection {
        flex-direction: column;
        align-items: center;
    }

    .sticky-cta {
        flex-direction: column;
        padding: 20px;
    }

    .btn-primary,
    .btn-whatsapp {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}