/* New Features CSS - Tier Badges, Achievements, Timeline, Enhanced Referral */

/* ========== TIER BADGE ========== */
.user-tier-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 165, 0, 0.1) 100%);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 20px;
    margin-bottom: 12px;
    animation: tierGlow 3s ease-in-out infinite;
}

.tier-icon {
    font-size: 18px;
    animation: tierFloat 2s ease-in-out infinite;
}

.tier-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gold-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wallet-birthday {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wallet-birthday:hover {
    color: var(--gold-primary);
}

@keyframes tierGlow {
    0%, 100% { box-shadow: 0 0 10px rgba(255, 215, 0, 0.2); }
    50% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.4); }
}

@keyframes tierFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* ========== ACHIEVEMENTS SECTION ========== */
.achievements-section {
    margin-top: 48px;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.achievement-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.achievement-card.locked {
    opacity: 0.5;
    filter: grayscale(100%);
}

.achievement-card.unlocked {
    border-color: var(--gold-primary);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.05) 0%, rgba(255, 165, 0, 0.05) 100%);
    animation: achievementUnlock 0.6s ease-out;
}

.achievement-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.achievement-icon {
    font-size: 48px;
    margin-bottom: 12px;
    display: inline-block;
}

.achievement-card.unlocked .achievement-icon {
    animation: iconBounce 0.5s ease-in-out;
}

.achievement-card h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.achievement-card p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.achievement-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.achievement-card.locked .achievement-badge {
    background: var(--hover-bg);
    color: var(--text-muted);
}

.achievement-card.unlocked .achievement-badge {
    background: var(--gradient-gold);
    color: #1a1a1a;
}

@keyframes achievementUnlock {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes iconBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2) rotate(10deg); }
}

/* ========== TIMELINE SECTION ========== */
.timeline-section {
    margin-top: 48px;
}

.timeline-container {
    margin-top: 24px;
}

.timeline-empty {
    text-align: center;
    padding: 64px 24px;
    background: var(--card-bg);
    border-radius: 16px;
}

.timeline-empty svg {
    margin-bottom: 16px;
    opacity: 0.6;
}

.timeline-empty p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.timeline-empty small {
    font-size: 13px;
    color: var(--text-muted);
}

.timeline-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}

.timeline-list::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--gold-primary), transparent);
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: 20px;
    background: var(--card-bg);
    border-radius: 16px;
    margin-bottom: 16px;
    position: relative;
    transition: all 0.3s ease;
}

.timeline-item:hover {
    background: var(--hover-bg);
    transform: translateX(8px);
}

.timeline-marker {
    width: 48px;
    height: 48px;
    background: var(--gradient-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.timeline-content {
    flex: 1;
}

.timeline-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.timeline-amount {
    font-size: 18px;
    font-weight: 700;
    color: var(--gold-primary);
    margin-bottom: 8px;
}

.timeline-date {
    font-size: 13px;
    color: var(--text-muted);
}

/* ========== ENHANCED REFERRAL BANNER ========== */
.referral-banner {
    margin-top: 48px;
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--secondary-bg) 100%);
    border-radius: 24px;
    padding: 48px;
    position: relative;
    overflow: hidden;
}

.referral-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
    animation: referralPulse 4s ease-in-out infinite;
}

.referral-content {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 32px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.referral-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.referral-icon {
    animation: referralSpin 6s linear infinite;
}

@keyframes referralSpin {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
}

@keyframes referralPulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

.referral-info h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.referral-info p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

.referral-info strong {
    color: var(--gold-primary);
}

.referral-code-box,
.referral-link-box {
    background: var(--hover-bg);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.referral-code-display {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.code-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.code-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--gold-primary);
    letter-spacing: 2px;
    font-family: 'Courier New', monospace;
}

.referral-link-input {
    flex: 1;
    padding: 14px 16px;
    background: var(--secondary-bg);
    border: 2px solid var(--hover-bg);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.referral-link-input:focus {
    border-color: var(--gold-primary);
}

.btn-copy {
    padding: 14px 24px;
    background: var(--gradient-gold);
    color: #1a1a1a;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-copy:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.4);
}

.btn-copy:active {
    transform: translateY(0);
}

.btn-copy.copied {
    background: var(--success);
    color: white;
}

.social-share {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}

.social-share span {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.social-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-btn.whatsapp {
    background: #25D366;
    color: white;
}

.social-btn.facebook {
    background: #1877F2;
    color: white;
}

.social-btn.twitter {
    background: #1DA1F2;
    color: white;
}

.social-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .timeline-list::before {
        left: 16px;
    }

    .timeline-marker {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .referral-banner {
        padding: 32px 24px;
    }

    .referral-content {
        grid-template-columns: 1fr;
        gap: 24px;
        text-align: center;
    }

    .referral-info h2 {
        font-size: 22px;
    }

    .referral-code-box,
    .referral-link-box {
        flex-direction: column;
        text-align: center;
    }

    .social-share {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .achievements-grid {
        grid-template-columns: 1fr;
    }

    .achievement-card {
        padding: 20px;
    }

    .code-value {
        font-size: 18px;
    }

    .btn-copy {
        width: 100%;
        justify-content: center;
    }
}
