/* Referral Main */
.referral-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px 80px;
}

/* Hero Section */
.referral-hero {
    text-align: center;
    margin-bottom: 60px;
}

.referral-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 15px;
}

.referral-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
}

/* Referral Section */
.referral-section {
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid rgba(64, 224, 208, 0.3);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
}

.section-header {
    margin-bottom: 30px;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
}

.section-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

/* Earnings Overview */
.earnings-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    margin-bottom: 30px;
}

.earnings-metrics {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    flex: 1;
}

.metric-card {
    background: rgba(64, 224, 208, 0.05);
    border: 1px solid rgba(64, 224, 208, 0.2);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.metric-card:hover {
    border-color: rgba(64, 224, 208, 0.4);
    background: rgba(64, 224, 208, 0.1);
    transform: translateY(-2px);
}

.metric-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
}

.green-text {
    color: #4ade80;
}

.total-available {
    background: rgba(64, 224, 208, 0.1);
    border: 1px solid rgba(64, 224, 208, 0.3);
    border-radius: 12px;
    padding: 20px 30px;
    text-align: center;
    min-width: 180px;
}

.total-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.total-value {
    font-size: 28px;
    font-weight: 800;
}

.withdraw-btn {
    width: 100%;
    background: linear-gradient(135deg, #8a2be2 0%, #40E0D0 100%);
    border: none;
    padding: 16px;
    border-radius: 12px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(64, 224, 208, 0.3);
}

.withdraw-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(64, 224, 208, 0.5);
}

/* Referral Link */
.referral-link-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.referral-link-box {
    display: flex;
    gap: 15px;
    align-items: center;
}

.referral-link-input {
    flex: 1;
    padding: 16px 20px;
    background: rgba(64, 224, 208, 0.1);
    border: 1px solid rgba(64, 224, 208, 0.3);
    border-radius: 12px;
    color: #ffffff;
    font-size: 15px;
    font-family: 'Courier New', monospace;
}

.referral-link-input:focus {
    outline: none;
    border-color: rgba(64, 224, 208, 0.6);
    background: rgba(64, 224, 208, 0.15);
}

.copy-link-btn {
    background: linear-gradient(135deg, #8a2be2 0%, #40E0D0 100%);
    border: none;
    padding: 16px 30px;
    border-radius: 12px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.copy-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(64, 224, 208, 0.4);
}

.referral-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.3);
    border-radius: 12px;
}

.status-icon {
    font-size: 20px;
    color: #4ade80;
}

.status-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

/* Level Cards */
.level-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.level-card {
    background: rgba(64, 224, 208, 0.05);
    border: 1px solid rgba(64, 224, 208, 0.2);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
}

.level-card.active {
    background: rgba(64, 224, 208, 0.1);
    border-color: rgba(64, 224, 208, 0.4);
}

.level-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.level-value {
    font-size: 36px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 10px;
}

.level-status {
    font-size: 14px;
    color: #4ade80;
    font-weight: 600;
}

.level-requirements {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
    text-align: left;
}

.requirement-item {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.requirement-item.completed {
    color: #4ade80;
}

.requirement-item.pending {
    color: rgba(255, 255, 255, 0.6);
}

/* Downlines Filters */
.downlines-header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.downlines-count {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
}

.downlines-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.search-box {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 15px;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.6);
}

.search-input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    background: rgba(64, 224, 208, 0.1);
    border: 1px solid rgba(64, 224, 208, 0.3);
    border-radius: 10px;
    color: #ffffff;
    font-size: 14px;
}

.search-input:focus {
    outline: none;
    border-color: rgba(64, 224, 208, 0.6);
    background: rgba(64, 224, 208, 0.15);
}

.filter-select {
    padding: 12px 20px;
    background: rgba(64, 224, 208, 0.1);
    border: 1px solid rgba(64, 224, 208, 0.3);
    border-radius: 10px;
    color: #ffffff;
    font-size: 14px;
    cursor: pointer;
    min-width: 150px;
}

.filter-select:focus {
    outline: none;
    border-color: rgba(64, 224, 208, 0.6);
}

.filter-select option {
    background: #0a0a0a;
    color: #ffffff;
}

/* Table Container */
.table-container {
    overflow-x: auto;
}

.downlines-table {
    width: 100%;
    border-collapse: collapse;
}

.downlines-table thead {
    background: rgba(64, 224, 208, 0.1);
}

.downlines-table th {
    padding: 15px;
    text-align: left;
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(64, 224, 208, 0.3);
}

.downlines-table td {
    padding: 15px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(64, 224, 208, 0.1);
}

.downlines-table tbody tr {
    transition: all 0.3s ease;
}

.downlines-table tbody tr:hover {
    background: rgba(64, 224, 208, 0.05);
}

.username-cell {
    font-weight: 600;
    color: #ffffff;
}

.earnings-cell {
    font-weight: 600;
}

/* Rules Grid */
.rules-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.rule-card {
    background: rgba(64, 224, 208, 0.05);
    border: 1px solid rgba(64, 224, 208, 0.2);
    border-radius: 16px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: all 0.3s ease;
}

.rule-card:hover {
    border-color: rgba(64, 224, 208, 0.4);
    background: rgba(64, 224, 208, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(64, 224, 208, 0.2);
}

.rule-icon {
    font-size: 32px;
    margin-bottom: 5px;
}

.rule-title {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
}

.rule-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.rule-text strong {
    color: #40E0D0;
}

.rule-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rule-list li {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    padding-left: 20px;
    position: relative;
}

.rule-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #40E0D0;
    font-size: 18px;
}

.rule-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.trigger-btn {
    padding: 8px 16px;
    background: rgba(64, 224, 208, 0.1);
    border: 1px solid rgba(64, 224, 208, 0.3);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.trigger-btn:hover {
    border-color: rgba(64, 224, 208, 0.5);
    background: rgba(64, 224, 208, 0.15);
}

.trigger-btn.active {
    background: linear-gradient(135deg, #8a2be2 0%, #40E0D0 100%);
    border-color: transparent;
    color: #ffffff;
}

.rule-text-small {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 10px;
    line-height: 1.5;
}

/* Reward Table */
.reward-table-container {
    overflow-x: auto;
}

.reward-table {
    width: 100%;
    border-collapse: collapse;
}

.reward-table thead {
    background: rgba(64, 224, 208, 0.1);
}

.reward-table th {
    padding: 15px;
    text-align: left;
    font-size: 14px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(64, 224, 208, 0.3);
}

.reward-table td {
    padding: 12px 15px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(64, 224, 208, 0.1);
}

.reward-table tbody tr:hover {
    background: rgba(64, 224, 208, 0.05);
}

.reward-table tfoot {
    background: rgba(64, 224, 208, 0.1);
}

.reward-table tfoot td {
    padding: 20px 15px;
    font-weight: 700;
    border-bottom: none;
}

.total-label {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
}

.total-percentage {
    font-size: 20px;
    font-weight: 800;
}

/* Unlock Conditions */
.unlock-conditions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.unlock-card {
    background: rgba(64, 224, 208, 0.05);
    border: 1px solid rgba(64, 224, 208, 0.2);
    border-radius: 16px;
    padding: 25px;
    transition: all 0.3s ease;
}

.unlock-card:hover {
    border-color: rgba(64, 224, 208, 0.4);
    background: rgba(64, 224, 208, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(64, 224, 208, 0.2);
}

.unlock-levels {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 15px;
}

.unlock-requirements {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.req-item {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
}

/* Onboarding Rewards */
.onboarding-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.onboarding-info-card {
    background: rgba(64, 224, 208, 0.1);
    border: 1px solid rgba(64, 224, 208, 0.3);
    border-radius: 16px;
    padding: 25px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.info-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.info-text {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

.info-text strong {
    color: #40E0D0;
}

.onboarding-bonus-table-container {
    background: rgba(64, 224, 208, 0.05);
    border: 1px solid rgba(64, 224, 208, 0.2);
    border-radius: 16px;
    padding: 30px;
}

.bonus-table-title {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 20px;
}

.bonus-table {
    width: 100%;
    border-collapse: collapse;
}

.bonus-table thead {
    background: rgba(64, 224, 208, 0.1);
}

.bonus-table th {
    padding: 15px;
    text-align: left;
    font-size: 14px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(64, 224, 208, 0.3);
}

.bonus-table td {
    padding: 15px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(64, 224, 208, 0.1);
}

.bonus-table tbody tr:hover {
    background: rgba(64, 224, 208, 0.05);
}

.recommended-badge {
    background: linear-gradient(135deg, #8a2be2 0%, #40E0D0 100%);
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 10px;
}

.onboarding-notes {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.note-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 15px;
    background: rgba(64, 224, 208, 0.05);
    border: 1px solid rgba(64, 224, 208, 0.2);
    border-radius: 12px;
}

.note-icon {
    font-size: 18px;
    color: #4ade80;
    flex-shrink: 0;
}

.note-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

.note-text strong {
    color: #40E0D0;
}

/* Mobile Responsive */
@media (max-width: 968px) {
    .earnings-metrics {
        grid-template-columns: repeat(3, 1fr);
    }

    .rules-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .unlock-conditions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .referral-title {
        font-size: 32px;
    }

    .referral-section {
        padding: 25px;
    }

    .earnings-header {
        flex-direction: column;
    }

    .earnings-metrics {
        grid-template-columns: repeat(2, 1fr);
    }

    .level-cards {
        grid-template-columns: 1fr;
    }

    .rules-grid {
        grid-template-columns: 1fr;
    }

    .unlock-conditions-grid {
        grid-template-columns: 1fr;
    }

    .downlines-filters {
        flex-direction: column;
    }

    .referral-link-box {
        flex-direction: column;
    }

    .copy-link-btn {
        width: 100%;
    }
}

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

    .referral-main {
        padding: 40px 15px 60px;
    }

    .referral-section {
        padding: 20px 15px;
    }

    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .downlines-table {
        font-size: 11px;
        min-width: 700px;
    }

    .downlines-table th,
    .downlines-table td {
        padding: 10px 6px;
        white-space: nowrap;
    }

    .total-available {
        min-width: auto;
        width: 100%;
    }

    .section-title {
        font-size: 22px;
    }

    .section-subtitle {
        font-size: 13px;
    }
}

