/**
 * Home Referral Styles
 * Landing page para conversão de referrals sem spotlight/leilão
 */

/* ==========================================
   CSS Variables
   ========================================== */
:root {
    --hmvip-color-bg-dark: #1a1a2e;
    --hmvip-color-bg-card: #252542;
    --hmvip-color-bg-hover: #2d2d4a;
    --hmvip-color-accent: #e72b6c;
    --hmvip-color-accent-hover: #ff3d7a;
    --hmvip-color-text: #ffffff;
    --hmvip-color-text-muted: #a0a0b0;
    --hmvip-color-success: #2ed573;
    --hmvip-color-vip: #ffa502;
    
    --hmvip-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --hmvip-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --hmvip-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
    --hmvip-shadow-glow: 0 0 20px rgba(231, 43, 108, 0.4);
    
    --hmvip-transition: all 0.3s ease;
    --hmvip-radius: 12px;
    --hmvip-radius-lg: 16px;
    
    --hmvip-container-max: 1200px;
    --hmvip-spacing-sm: 8px;
    --hmvip-spacing-md: 16px;
    --hmvip-spacing-lg: 32px;
    --hmvip-spacing-xl: 64px;
}

/* Light mode overrides: reage ao toggle do BuddyX/BuddyBoss */
html[data-bx-mode="light"] {
    --hmvip-color-bg-dark: #f5f5f7;
    --hmvip-color-bg-card: #ffffff;
    --hmvip-color-bg-hover: #f0f0f0;
    --hmvip-color-text: #1a1a1a;
    --hmvip-color-text-muted: #555555;
    --hmvip-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --hmvip-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --hmvip-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
}

html[data-bx-mode="light"] .hmvip-referral-hero,
html[data-bx-mode="light"] .hmvip-referral-creators,
html[data-bx-mode="light"] .hmvip-referral-cta {
    transition: background 0.3s ease, color 0.3s ease;
}

html[data-bx-mode="light"] .hmvip-referral-hero {
    background: linear-gradient(135deg, #f5f5f7 0%, #e8e8ec 50%, #f0f0f2 100%);
}

html[data-bx-mode="light"] .hmvip-referral-hero::before {
    background: radial-gradient(circle, rgba(231, 43, 108, 0.08) 0%, transparent 70%);
}

html[data-bx-mode="light"] .hmvip-referral-hero::after {
    background: radial-gradient(circle, rgba(46, 213, 115, 0.04) 0%, transparent 70%);
}

html[data-bx-mode="light"] .btn-secondary {
    color: var(--hmvip-color-text);
    border-color: var(--hmvip-color-text-muted);
}

html[data-bx-mode="light"] .btn-secondary:hover {
    background: rgba(0, 0, 0, 0.05);
}

html[data-bx-mode="light"] .creator-card {
    box-shadow: var(--hmvip-shadow-sm);
}

html[data-bx-mode="light"] .hmvip-referral-cta {
    background: linear-gradient(135deg, var(--hmvip-bg, #ffffff) 0%, #f5f5f7 100%);
}

/* ==========================================
   Base & Container
   ========================================== */
.hmvip-referral-hero,
.hmvip-referral-creators,
.hmvip-referral-cta {
    width: 100%;
}

.hmvip-referral-hero .container,
.hmvip-referral-creators .container,
.hmvip-referral-cta .container {
    max-width: var(--hmvip-container-max);
    margin: 0 auto;
    padding: 0 var(--hmvip-spacing-md);
}

/* ==========================================
   Hero Section
   ========================================== */
.hmvip-referral-hero {
    background: linear-gradient(135deg, var(--hmvip-color-bg-dark) 0%, #2d2d44 50%, #1f1f35 100%);
    min-height: 70vh;
    display: flex;
    align-items: center;
    padding: var(--hmvip-spacing-xl) 0;
    position: relative;
    overflow: hidden;
}

.hmvip-referral-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(231, 43, 108, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.hmvip-referral-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(46, 213, 115, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.referral-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--hmvip-color-accent), #ff6b6b);
    color: white;
    padding: var(--hmvip-spacing-sm) var(--hmvip-spacing-md);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: var(--hmvip-spacing-lg);
    animation: pulse 2s infinite;
}

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

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--hmvip-color-text);
    margin-bottom: var(--hmvip-spacing-md);
    line-height: 1.2;
}

.hero-title .brand {
    background: linear-gradient(135deg, var(--hmvip-color-accent), #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-by {
    font-size: 1.25rem;
    color: var(--hmvip-color-text-muted);
    margin-bottom: var(--hmvip-spacing-md);
}

.hero-by strong {
    color: var(--hmvip-color-accent);
    font-weight: 600;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--hmvip-color-text-muted);
    margin-bottom: var(--hmvip-spacing-lg);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.hero-actions {
    display: flex;
    gap: var(--hmvip-spacing-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--hmvip-spacing-xl);
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--hmvip-spacing-md) var(--hmvip-spacing-lg);
    border-radius: var(--hmvip-radius);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: var(--hmvip-transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--hmvip-color-accent), #ff3d7a);
    color: white;
    box-shadow: var(--hmvip-shadow-md);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #ff3d7a, var(--hmvip-color-accent));
    box-shadow: var(--hmvip-shadow-glow);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--hmvip-color-text);
    border: 2px solid var(--hmvip-color-text-muted);
}

.btn-secondary:hover {
    border-color: var(--hmvip-color-text);
    background: rgba(255, 255, 255, 0.05);
}

.btn-lg {
    padding: calc(var(--hmvip-spacing-md) * 1.25) calc(var(--hmvip-spacing-lg) * 1.5);
    font-size: 1.125rem;
}

.btn-xl {
    padding: calc(var(--hmvip-spacing-md) * 1.5) calc(var(--hmvip-spacing-lg) * 2);
    font-size: 1.25rem;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--hmvip-spacing-xl);
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--hmvip-color-text);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--hmvip-color-text-muted);
}

/* ==========================================
   Creators Section
   ========================================== */
.hmvip-referral-creators {
    background: var(--hmvip-color-bg-dark);
    padding: var(--hmvip-spacing-xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--hmvip-spacing-xl);
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--hmvip-color-text);
    margin-bottom: var(--hmvip-spacing-sm);
}

.section-header p {
    font-size: 1.125rem;
    color: var(--hmvip-color-text-muted);
}

/* Grid */
.creators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--hmvip-spacing-lg);
}

/* Creator Card */
.creator-card {
    background: var(--hmvip-color-bg-card);
    border-radius: var(--hmvip-radius-lg);
    overflow: hidden;
    text-decoration: none;
    transition: var(--hmvip-transition);
    box-shadow: var(--hmvip-shadow-sm);
}

.creator-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hmvip-shadow-lg);
    background: var(--hmvip-color-bg-hover);
}

.creator-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

.creator-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--hmvip-transition);
}

.creator-card:hover .creator-image img {
    transform: scale(1.05);
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--hmvip-color-accent), #ff6b6b);
    color: white;
    font-size: 3rem;
    font-weight: 700;
}

.verified-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: var(--hmvip-color-success);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.vip-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--hmvip-color-vip);
    color: #1a1a1a;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.creator-info {
    padding: var(--hmvip-spacing-md);
}

.creator-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--hmvip-color-text);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.creator-username {
    font-size: 0.875rem;
    color: var(--hmvip-color-text-muted);
    margin-bottom: var(--hmvip-spacing-sm);
}

.creator-followers {
    font-size: 0.8125rem;
    color: var(--hmvip-color-accent);
    font-weight: 500;
}

/* ==========================================
   CTA Section
   ========================================== */
.hmvip-referral-cta {
    background: linear-gradient(135deg, #252542 0%, #1a1a2e 100%);
    padding: var(--hmvip-spacing-xl) 0;
    text-align: center;
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--hmvip-color-text);
    margin-bottom: var(--hmvip-spacing-md);
}

.cta-content p {
    font-size: 1.125rem;
    color: var(--hmvip-color-text-muted);
    margin-bottom: var(--hmvip-spacing-lg);
}

.cta-disclaimer {
    font-size: 0.875rem !important;
    color: var(--hmvip-color-text-muted) !important;
    margin-top: var(--hmvip-spacing-lg);
    margin-bottom: 0 !important;
}

/* ==========================================
   Responsive Design
   ========================================== */

/* Tablet (768px+) */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-stats {
        gap: var(--hmvip-spacing-lg);
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .section-header h2,
    .cta-content h2 {
        font-size: 1.75rem;
    }
    
    .creators-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: var(--hmvip-spacing-md);
    }
}

/* Mobile (480px+) */
@media (max-width: 480px) {
    .hmvip-referral-hero {
        min-height: auto;
        padding: var(--hmvip-spacing-lg) 0;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 300px;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: var(--hmvip-spacing-md);
    }
    
    .creators-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--hmvip-spacing-sm);
    }
    
    .creator-card {
        display: flex;
        flex-direction: row;
        align-items: center;
    }
    
    .creator-image {
        width: 80px;
        height: 80px;
        flex-shrink: 0;
    }
    
    .creator-info {
        flex: 1;
        min-width: 0;
    }
    
    .section-header h2,
    .cta-content h2 {
        font-size: 1.5rem;
    }
}

/* Large Desktop (1400px+) */
@media (min-width: 1400px) {
    .creators-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* ==========================================
   Accessibility
   ========================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .referral-badge {
        animation: none;
    }
}

/* Focus states */
.btn-primary:focus,
.btn-secondary:focus,
.creator-card:focus {
    outline: 2px solid var(--hmvip-color-accent);
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .btn-primary {
        border: 2px solid white;
    }
    
    .creator-card {
        border: 1px solid var(--hmvip-color-text-muted);
    }
}

/* ==========================================
   Loading States
   ========================================== */
.creator-card.loading {
    animation: shimmer 1.5s infinite;
    background: linear-gradient(
        90deg,
        var(--hmvip-color-bg-card) 25%,
        var(--hmvip-color-bg-hover) 50%,
        var(--hmvip-color-bg-card) 75%
    );
    background-size: 200% 100%;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ==========================================
   Empty State
   ========================================== */
.creators-empty {
    text-align: center;
    padding: var(--hmvip-spacing-xl);
    color: var(--hmvip-color-text-muted);
}

.creators-empty-icon {
    font-size: 4rem;
    margin-bottom: var(--hmvip-spacing-md);
    opacity: 0.5;
}
