/* ========================================
   NORAVAT MARKET - REFERRALS PAGE STYLES
   Color Theme: White, Gold (#FFD700), Dark Blue
   ======================================== */

/* ========================================
   REFERRAL HERO SECTION
   ======================================== */

.referral-hero {
    text-align: center;
    padding: 3rem 0;
    margin-bottom: 3rem;
}

.referral-title {
    font-size: 3rem;
    font-weight: 900;
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 1rem;
    line-height: 1.2;
}

/* ========================================
   NOT CONNECTED STATE
   ======================================== */

.not-connected-state {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    padding: 2rem;
}

.state-card {
    max-width: 500px;
    text-align: center;
    padding: 3rem 2rem;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 1.5rem;
    backdrop-filter: blur(20px);
}

.state-card svg {
    color: rgba(148, 163, 184, 0.4);
    margin-bottom: 2rem;
}

.state-card h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #FFFFFF;
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 1rem;
}

.state-card p {
    font-size: 1.125rem;
    color: rgba(148, 163, 184, 0.8);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.state-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 2rem;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border: 1px solid rgba(255, 215, 0, 0.5);
    border-radius: 0.75rem;
    color: #0F172A;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(255, 215, 0, 0.3);
}

.state-action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 50px rgba(255, 215, 0, 0.5);
}

/* ========================================
   REFERRAL CODE SECTION
   ======================================== */

.referral-code-section {
    margin-bottom: 3rem;
}

.referral-code-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 58, 138, 0.8) 100%);
    border: 2px solid rgba(255, 215, 0, 0.5);
    border-radius: 1.5rem;
    padding: 2.5rem;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(255, 215, 0, 0.2);
}

.code-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.code-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 215, 0, 0.05) 100%);
    border: 2px solid rgba(255, 215, 0, 0.5);
    border-radius: 1rem;
    color: #FFD700;
    flex-shrink: 0;
}

.code-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #FFFFFF;
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 0.25rem;
}

.code-header p {
    font-size: 0.95rem;
    color: rgba(148, 163, 184, 0.8);
}

.code-display-wrapper {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.code-display {
    flex: 1;
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.9);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 1rem;
    color: #FFD700;
    font-size: 2.5rem;
    font-weight: 900;
    font-family: 'Orbitron', sans-serif;
    text-align: center;
    letter-spacing: 0.2em;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
}

.code-copy-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border: 1px solid rgba(255, 215, 0, 0.5);
    border-radius: 1rem;
    color: #0F172A;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.code-copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(255, 215, 0, 0.5);
}

.share-links {
    display: flex;
    gap: 1rem;
}

.share-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.5);
    border-radius: 0.75rem;
    color: #60A5FA;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.share-btn:hover {
    background: rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.share-btn.secondary {
    background: rgba(29, 155, 240, 0.2);
    border-color: rgba(29, 155, 240, 0.5);
    color: #1D9BF0;
}

.share-btn.secondary:hover {
    background: rgba(29, 155, 240, 0.3);
    box-shadow: 0 8px 25px rgba(29, 155, 240, 0.3);
}

/* ========================================
   REFERRAL STATS GRID
   ======================================== */

.referral-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.referral-stat-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 1.25rem;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
}

.referral-stat-card:hover {
    transform: translateY(-5px);
    border-color: #FFD700;
    box-shadow: 0 15px 50px rgba(255, 215, 0, 0.2);
}

.stat-icon-large {
    font-size: 3rem;
    flex-shrink: 0;
}

.stat-icon-large.gold {
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.5));
}

.stat-icon-large.blue {
    filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.5));
}

.stat-icon-large.green {
    filter: drop-shadow(0 0 20px rgba(16, 185, 129, 0.5));
}

.stat-content-large {
    flex: 1;
}

.stat-label-large {
    font-size: 0.95rem;
    color: rgba(148, 163, 184, 0.8);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.stat-value-large {
    font-size: 2rem;
    font-weight: 900;
    color: #FFFFFF;
    font-family: 'Orbitron', sans-serif;
    line-height: 1;
}

.stat-value-large.gold {
    color: #FFD700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.stat-value-large.blue {
    color: #60A5FA;
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

.stat-value-large.green {
    color: #10B981;
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}

/* ========================================
   COMMISSION STRUCTURE
   ======================================== */

.commission-structure {
    margin-bottom: 3rem;
}

.commission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.commission-card {
    position: relative;
    padding: 2.5rem 2rem;
    background: rgba(15, 23, 42, 0.9);
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 1.5rem;
    text-align: center;
    backdrop-filter: blur(20px);
    transition: all 0.4s ease;
    overflow: hidden;
}

.commission-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.05) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.commission-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: #FFD700;
    box-shadow: 0 25px 70px rgba(255, 215, 0, 0.3);
}

.commission-card:hover::before {
    opacity: 1;
}

.commission-card.level-1 {
    border-color: rgba(255, 215, 0, 0.5);
}

.commission-card.level-1:hover {
    box-shadow: 0 25px 70px rgba(255, 215, 0, 0.5);
}

.commission-badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(59, 130, 246, 0.05) 100%);
    border: 1px solid rgba(59, 130, 246, 0.5);
    border-radius: 0.5rem;
    color: #60A5FA;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.commission-card.level-1 .commission-badge {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 215, 0, 0.05) 100%);
    border-color: rgba(255, 215, 0, 0.5);
    color: #FFD700;
}

.commission-percentage {
    font-size: 4rem;
    font-weight: 900;
    font-family: 'Orbitron', sans-serif;
    color: #60A5FA;
    line-height: 1;
    margin-bottom: 1rem;
    text-shadow: 0 0 30px rgba(59, 130, 246, 0.6);
}

.commission-card.level-1 .commission-percentage {
    color: #FFD700;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
}

.commission-description {
    font-size: 1.125rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 1.5rem;
}

.commission-example {
    padding: 1.25rem;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 0.75rem;
    font-size: 0.9rem;
    color: rgba(148, 163, 184, 0.9);
    line-height: 1.6;
}

.commission-example .highlight {
    color: #FFD700;
    font-weight: 700;
    font-size: 1.1rem;
}

/* ========================================
   REFERRALS TABLE
   ======================================== */

.referrals-table-section {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 1.5rem;
    padding: 2rem;
    backdrop-filter: blur(20px);
    margin-bottom: 3rem;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.table-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #FFFFFF;
    font-family: 'Orbitron', sans-serif;
}

.refresh-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.5);
    border-radius: 0.5rem;
    color: #60A5FA;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.refresh-btn:hover {
    background: rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
}

.loading-spinner-large {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 215, 0, 0.2);
    border-top-color: #FFD700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1.5rem;
}

.loading-state p {
    color: rgba(148, 163, 184, 0.8);
    font-size: 1rem;
}

.empty-referrals-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.empty-referrals-state svg {
    color: rgba(148, 163, 184, 0.3);
    margin-bottom: 1.5rem;
}

.empty-referrals-state h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: rgba(148, 163, 184, 0.8);
    margin-bottom: 0.75rem;
}

.empty-referrals-state p {
    font-size: 1rem;
    color: rgba(148, 163, 184, 0.6);
}

/* ========================================
   REFERRALS LIST
   ======================================== */

.referrals-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.referral-item {
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.referral-item:hover {
    border-color: #FFD700;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.15);
    transform: translateY(-2px);
}

.referral-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.referral-address {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.referral-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0F172A;
    font-weight: 700;
    font-size: 1rem;
    font-family: 'Orbitron', sans-serif;
}

.referral-address-text {
    font-family: 'Orbitron', sans-serif;
    color: #FFFFFF;
    font-weight: 600;
    font-size: 0.95rem;
}

.referral-badge {
    padding: 0.375rem 0.875rem;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid #10B981;
    border-radius: 0.375rem;
    color: #10B981;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.referral-badge.inactive {
    background: rgba(148, 163, 184, 0.15);
    border-color: rgba(148, 163, 184, 0.5);
    color: rgba(148, 163, 184, 0.8);
}

.referral-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.referral-detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.referral-detail-label {
    font-size: 0.8rem;
    color: rgba(148, 163, 184, 0.7);
}

.referral-detail-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: #FFFFFF;
}

.referral-detail-value.gold {
    color: #FFD700;
}

/* ========================================
   HOW IT WORKS REFERRAL
   ======================================== */

.how-it-works-referral {
    margin-bottom: 3rem;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.step-card {
    padding: 2rem;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 1.25rem;
    transition: all 0.3s ease;
    text-align: center;
}

.step-card:hover {
    transform: translateY(-5px);
    border-color: #60A5FA;
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.3);
}

.step-card .step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-radius: 50%;
    color: #0F172A;
    font-size: 1.75rem;
    font-weight: 900;
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.4);
}

.step-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 0.75rem;
}

.step-card p {
    font-size: 0.95rem;
    color: rgba(148, 163, 184, 0.9);
    line-height: 1.6;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1024px) {
    .referral-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .commission-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .referral-title {
        font-size: 2rem;
    }

    .code-display-wrapper {
        flex-direction: column;
    }

    .code-display {
        font-size: 2rem;
    }

    .share-links {
        flex-direction: column;
    }

    .referral-stats-grid {
        grid-template-columns: 1fr;
    }

    .table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .referral-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .steps-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .referral-hero {
        padding: 2rem 0;
    }

    .referral-title {
        font-size: 1.75rem;
    }

    .referral-code-card {
        padding: 1.5rem;
    }

    .code-header {
        flex-direction: column;
        text-align: center;
    }

    .code-display {
        font-size: 1.5rem;
        letter-spacing: 0.1em;
    }

    .commission-percentage {
        font-size: 3rem;
    }

    .stat-value-large {
        font-size: 1.5rem;
    }
}