/**
 * Home Page — Hero, Progress Bar, CTA, Responsive
 */

/* ============================================
   HERO GAMIFICATION
   ============================================ */

.fp-hero-gamification {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: var(--fp-spacing-xl);
}

.fp-hero-xp,
.fp-hero-streak {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: var(--fp-radius-full);
    font-weight: 700;
    font-size: 0.9rem;
}

.fp-hero-xp i {
    color: #FFD700;
}

.fp-hero-streak i {
    color: #FF6B35;
}

/* Hero Stats */
.fp-hero-stats {
    display: flex;
    gap: var(--fp-spacing-lg);
    margin-top: var(--fp-spacing-xl);
}

.fp-hero-stat {
    text-align: center;
}

.fp-hero-stat-number {
    font-size: 2rem;
    font-weight: 900;
    color: var(--fp-primary);
    display: block;
}

.fp-hero-stat-label {
    font-size: 0.875rem;
    color: var(--fp-text-secondary);
    font-weight: 500;
}

/* ============================================
   HOME PROGRESS BAR
   ============================================ */

.fp-home-progress {
    margin-top: var(--fp-spacing-xl);
}

.fp-home-progress-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.875rem;
    color: var(--fp-text-secondary);
}

.fp-home-progress-label span:last-child {
    color: var(--fp-primary);
    font-weight: 700;
}

.fp-home-progress-bar {
    height: 12px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.fp-home-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--fp-primary), var(--fp-primary-light));
    border-radius: 6px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.fp-home-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Fixed Progress Bar */
.fp-fixed-progress {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 16, 20, 0.95);
    backdrop-filter: blur(10px);
    padding: 12px 0;
    border-top: 1px solid var(--fp-border-subtle);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.fp-fixed-progress.visible {
    transform: translateY(0);
}

.fp-fixed-progress-inner {
    display: flex;
    align-items: center;
    gap: 16px;
}

.fp-fixed-progress-label {
    white-space: nowrap;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--fp-text-secondary);
    min-width: 120px;
}

.fp-fixed-progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

.fp-fixed-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--fp-primary), var(--fp-primary-light));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.fp-fixed-progress-value {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--fp-primary);
    min-width: 40px;
    text-align: left;
}

/* CTA Toast */
.fp-cta-toast {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--fp-primary);
    color: white;
    padding: 14px 32px;
    border-radius: var(--fp-radius-full);
    font-weight: 700;
    box-shadow: 0 10px 30px rgba(88, 204, 2, 0.3);
    z-index: 1000;
    transition: bottom 0.4s ease;
    cursor: pointer;
}

.fp-cta-toast.visible {
    bottom: 30px;
    animation: bounce 0.5s ease;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

/* ============================================
   EPIC GAMING LEADERBOARD CARDS
   ============================================ */

.fp-leaderboard-grid-home {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
}

/* Base Card */
.fp-epic-card {
    position: relative;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1.5px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    padding: 32px 24px 28px;
    text-align: center;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    animation: fpEpicReveal 0.6s ease forwards;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes fpEpicReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fp-epic-card:hover {
    transform: translateY(-12px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.12);
}

/* ── Rank-based glows ── */
.fp-epic-card.rank-gold {
    border-color: rgba(251, 191, 36, 0.3);
    box-shadow:
        0 0 40px rgba(251, 191, 36, 0.08),
        inset 0 1px 0 rgba(251, 191, 36, 0.15);
}

.fp-epic-card.rank-gold:hover {
    box-shadow:
        0 0 60px rgba(251, 191, 36, 0.15),
        0 20px 50px rgba(0, 0, 0, 0.3);
}

.fp-epic-card.rank-silver {
    border-color: rgba(148, 163, 184, 0.25);
    box-shadow:
        0 0 30px rgba(148, 163, 184, 0.06),
        inset 0 1px 0 rgba(148, 163, 184, 0.12);
}

.fp-epic-card.rank-silver:hover {
    box-shadow:
        0 0 50px rgba(148, 163, 184, 0.12),
        0 20px 50px rgba(0, 0, 0, 0.3);
}

.fp-epic-card.rank-bronze {
    border-color: rgba(217, 119, 6, 0.25);
    box-shadow:
        0 0 30px rgba(217, 119, 6, 0.06),
        inset 0 1px 0 rgba(217, 119, 6, 0.12);
}

.fp-epic-card.rank-bronze:hover {
    box-shadow:
        0 0 50px rgba(217, 119, 6, 0.12),
        0 20px 50px rgba(0, 0, 0, 0.3);
}

/* ── Glow Bar (top) ── */
.fp-epic-glow-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 10%, var(--fp-primary) 50%, transparent 90%);
    opacity: 0.4;
}

.fp-epic-card.rank-gold .fp-epic-glow-bar {
    background: linear-gradient(90deg, transparent 10%, #fbbf24 50%, transparent 90%);
    opacity: 0.7;
}

.fp-epic-card.rank-silver .fp-epic-glow-bar {
    background: linear-gradient(90deg, transparent 10%, #94a3b8 50%, transparent 90%);
    opacity: 0.5;
}

.fp-epic-card.rank-bronze .fp-epic-glow-bar {
    background: linear-gradient(90deg, transparent 10%, #d97706 50%, transparent 90%);
    opacity: 0.5;
}

/* ── Rank Shield ── */
.fp-epic-rank-shield {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.85rem;
    z-index: 2;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--fp-text-secondary);
}

.fp-epic-rank-shield i {
    font-size: 0.75rem;
}

.fp-epic-card.rank-gold .fp-epic-rank-shield {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(217, 119, 6, 0.15));
    border-color: rgba(251, 191, 36, 0.3);
    color: #fbbf24;
    box-shadow: 0 0 16px rgba(251, 191, 36, 0.15);
}

.fp-epic-card.rank-silver .fp-epic-rank-shield {
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.15), rgba(100, 116, 139, 0.1));
    border-color: rgba(148, 163, 184, 0.25);
    color: #cbd5e1;
}

.fp-epic-card.rank-bronze .fp-epic-rank-shield {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.15), rgba(180, 83, 9, 0.1));
    border-color: rgba(217, 119, 6, 0.25);
    color: #f59e0b;
}

/* ── Avatar ── */
.fp-epic-avatar {
    position: relative;
    width: 130px;
    height: 130px;
    margin: 0 auto 20px;
}

.fp-epic-avatar-ring {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
    position: relative;
    overflow: hidden;
}

.fp-epic-avatar-ring img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    transition: transform 0.5s ease;
}

.fp-epic-card:hover .fp-epic-avatar-ring img {
    transform: scale(1.08);
}

.fp-epic-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--fp-primary), #46a800);
    color: #fff;
    font-size: 2.5rem;
}

/* Rank avatar ring colors */
.fp-epic-card.rank-gold .fp-epic-avatar-ring {
    background: linear-gradient(135deg, #fbbf24, #d97706, #fbbf24);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.2);
}

.fp-epic-card.rank-silver .fp-epic-avatar-ring {
    background: linear-gradient(135deg, #94a3b8, #64748b, #94a3b8);
}

.fp-epic-card.rank-bronze .fp-epic-avatar-ring {
    background: linear-gradient(135deg, #d97706, #b45309, #d97706);
}

/* Tier badge (emoji) */
.fp-epic-tier-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: var(--fp-bg-primary);
    border-radius: 50%;
    border: 2px solid var(--fp-bg-primary);
    z-index: 2;
    animation: fpTierPulse 2.5s ease-in-out infinite;
}

@keyframes fpTierPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.12);
    }
}

/* ── Info ── */
.fp-epic-info {
    position: relative;
    z-index: 2;
}

.fp-epic-name {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--fp-text-primary);
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}

.fp-epic-card.rank-gold .fp-epic-name {
    background: linear-gradient(135deg, #fbbf24, #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.fp-epic-spec {
    color: var(--fp-primary);
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.fp-epic-spec i {
    color: var(--fp-accent);
    margin-left: 4px;
}

/* ── Stats Chips ── */
.fp-epic-stats {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 14px;
}

.fp-epic-stat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--fp-text-secondary);
}

.fp-epic-stat i {
    color: var(--fp-accent);
    font-size: 0.7rem;
}

.fp-epic-stat-new {
    color: var(--fp-primary);
    border-color: rgba(88, 204, 2, 0.15);
    background: rgba(88, 204, 2, 0.06);
}

.fp-epic-stat-rank {
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.2);
    background: rgba(251, 191, 36, 0.06);
}

.fp-epic-stat-rank i {
    color: #fbbf24;
}

/* ── Code Badge ── */
.fp-epic-code {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    background: linear-gradient(135deg, var(--fp-accent), var(--fp-accent-dark));
    color: #0a1014;
    margin-bottom: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
}

.fp-epic-code:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 200, 0, 0.3);
}

.fp-epic-code .fp-copy-icon {
    font-size: 0.72rem;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.fp-epic-code:hover .fp-copy-icon {
    opacity: 1;
}

.fp-epic-code.fp-copied {
    background: linear-gradient(135deg, var(--fp-primary), #46a800);
    color: #fff;
}

.fp-epic-code.fp-copied::after {
    content: '\2713  \062a\0645  \0627\0644\0646\0633\062e';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--fp-primary);
    color: #fff;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    animation: fpCopyFadeIn 0.3s ease forwards;
}

/* ── Profile Button ── */
.fp-epic-btn {
    display: block;
    padding: 12px 20px;
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    color: var(--fp-text-secondary);
    font-weight: 700;
    font-size: 0.88rem;
    text-decoration: none;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.02);
}

.fp-epic-btn:hover {
    border-color: var(--fp-primary);
    color: var(--fp-primary-light);
    background: rgba(88, 204, 2, 0.06);
    transform: translateY(-2px);
}

.fp-epic-btn i {
    margin-right: 4px;
    font-size: 0.75rem;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .fp-leaderboard-grid-home {
        grid-template-columns: 1fr;
    }

    .fp-epic-card {
        padding: 28px 20px 24px;
    }

    .fp-epic-avatar {
        width: 110px;
        height: 110px;
    }

    .fp-epic-name {
        font-size: 1.2rem;
    }
}

/* ============================================
   CTA SECTION — PREMIUM REDESIGN
   ============================================ */

.fp-cta {
    position: relative;
    padding: 100px 0 80px;
    overflow: hidden;
    background:
        radial-gradient(ellipse 80% 60% at 50% 120%, rgba(88, 204, 2, 0.12) 0%, transparent 60%),
        radial-gradient(circle at 20% 50%, rgba(28, 176, 246, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 80% 30%, rgba(139, 92, 246, 0.05) 0%, transparent 40%),
        linear-gradient(180deg, var(--fp-bg-primary) 0%, #060d12 100%);
}

/* Animated decorative orbs */
.fp-cta::before,
.fp-cta::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
    pointer-events: none;
    animation: fpCtaFloat 8s ease-in-out infinite;
}

.fp-cta::before {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(88, 204, 2, 0.25), transparent 70%);
    top: -100px;
    right: -80px;
    animation-delay: 0s;
}

.fp-cta::after {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(28, 176, 246, 0.2), transparent 70%);
    bottom: -60px;
    left: -40px;
    animation-delay: -4s;
}

@keyframes fpCtaFloat {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(20px, -20px) scale(1.08);
    }
}

/* Inner glassmorphism container */
.fp-cta-inner {
    max-width: 780px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 28px;
    padding: 56px 48px 48px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Title */
.fp-cta-title {
    font-size: 2.75rem;
    font-weight: 900;
    margin-bottom: var(--fp-spacing-md);
    background: linear-gradient(135deg, var(--fp-text-primary) 30%, var(--fp-primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

/* Subtitle */
.fp-cta-subtitle {
    font-size: 1.15rem;
    color: var(--fp-text-secondary);
    margin-bottom: var(--fp-spacing-xl);
    line-height: 1.7;
}

/* Buttons */
.fp-cta-buttons {
    display: flex;
    gap: var(--fp-spacing-lg);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.fp-cta-buttons .fp-btn-accent {
    background: linear-gradient(135deg, var(--fp-primary) 0%, #46a800 100%);
    color: #fff;
    border: none;
    padding: 16px 36px;
    font-size: 1.05rem;
    font-weight: 800;
    border-radius: var(--fp-radius-full);
    box-shadow:
        0 4px 0 #358200,
        0 8px 24px rgba(88, 204, 2, 0.3);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.fp-cta-buttons .fp-btn-accent::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.6s ease;
}

.fp-cta-buttons .fp-btn-accent:hover {
    transform: translateY(-3px);
    box-shadow:
        0 6px 0 #358200,
        0 12px 32px rgba(88, 204, 2, 0.4);
}

.fp-cta-buttons .fp-btn-accent:hover::after {
    left: 100%;
}

.fp-cta-buttons .fp-btn-ghost-light {
    color: var(--fp-text-secondary);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    padding: 16px 32px;
    border-radius: var(--fp-radius-full);
    font-weight: 700;
    transition: all 0.25s ease;
    background: rgba(255, 255, 255, 0.03);
}

.fp-cta-buttons .fp-btn-ghost-light:hover {
    border-color: var(--fp-primary);
    color: var(--fp-primary-light);
    background: rgba(88, 204, 2, 0.06);
    transform: translateY(-2px);
}

/* Features row */
.fp-cta-features {
    display: flex;
    gap: 32px;
    justify-content: center;
    flex-wrap: wrap;
}

.fp-cta-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: var(--fp-text-muted);
    font-weight: 500;
}

.fp-cta-feature i {
    color: var(--fp-primary);
    font-size: 0.9rem;
    filter: drop-shadow(0 0 4px rgba(88, 204, 2, 0.4));
}

/* ============================================
   HOMEPAGE RESPONSIVE
   ============================================ */

@media (max-width: 991px) {
    .fp-hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .fp-hero-title {
        font-size: 2.5rem;
    }

    .fp-hero-buttons {
        justify-content: center;
    }

    .fp-hero-stats {
        justify-content: center;
    }

    .fp-features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .fp-trainers-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .fp-blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .fp-hero-gamification {
        justify-content: center;
    }
}

@media (max-width: 767px) {
    .fp-hero-title {
        font-size: 2rem;
    }

    .fp-hero-subtitle {
        font-size: 1rem;
    }

    .fp-features-grid {
        grid-template-columns: 1fr;
    }

    .fp-trainers-grid {
        grid-template-columns: 1fr;
    }

    .fp-blog-grid {
        grid-template-columns: 1fr;
    }

    .fp-cta-title {
        font-size: 1.8rem;
    }

    .fp-cta-inner {
        padding: 36px 20px 32px;
        border-radius: 20px;
    }

    .fp-cta::before,
    .fp-cta::after {
        display: none;
    }

    .fp-cta-features {
        gap: 16px;
    }

    .fp-hero-stats {
        flex-direction: column;
        gap: var(--fp-spacing-md);
    }

    .fp-hero-stat-number {
        font-size: 1.5rem;
    }

    .fp-hero-gamification {
        flex-direction: column;
        gap: 8px;
    }
}