
.referral-modal {
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.referral-modal .modal-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}


.referral-invite-btn {
    padding: 6px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ff4757, #ff6b6b);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px var(--glow-red), 0 0 15px rgba(255, 71, 87, 0.3);
    flex-shrink: 0;
}

.referral-invite-btn:active {
    transform: scale(0.95);
    box-shadow: 0 1px 4px var(--glow-red), 0 0 20px rgba(255, 71, 87, 0.4);
}


.referral-link-section {
    background: rgba(22, 27, 34, 0.6);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 71, 87, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.referral-link-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 12px;
}


.referral-link-clickable {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.12) 0%, rgba(255, 107, 107, 0.12) 100%);
    border: 2px solid rgba(255, 71, 87, 0.3);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.referral-link-clickable:hover {
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.18) 0%, rgba(255, 107, 107, 0.18) 100%);
    border-color: rgba(255, 71, 87, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 71, 87, 0.4);
}

.referral-link-clickable:active {
    transform: translateY(0);
}

.referral-link-clickable.copied {
    background: linear-gradient(135deg, rgba(17, 153, 142, 0.2) 0%, rgba(56, 239, 125, 0.2) 100%);
    border-color: rgba(56, 239, 125, 0.5);
}

.link-icon {
    font-size: 20px;
    min-width: 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.link-text {
    flex: 1;
    color: var(--tg-theme-text-color, #ffffff);
    font-size: 14px;
    font-weight: 500;
    word-break: break-all;
}


.referral-stats-section {
    background: rgba(10, 14, 39, 0.4);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(74, 158, 255, 0.1);
}

.referral-stats-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 12px;
}

.referral-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.referral-stat-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(74, 158, 255, 0.05);
}

.referral-stat-card .stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #4a9eff;
    margin-bottom: 4px;
}

.referral-stat-card .stat-label {
    font-size: 11px;
    color: #8a8fa3;
}


.referral-list-section {
    background: rgba(10, 14, 39, 0.4);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(74, 158, 255, 0.1);
}

.referral-list-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 12px;
}

.referral-list {
    max-height: 200px;
    overflow-y: auto;
}

.referral-list::-webkit-scrollbar {
    width: 4px;
}

.referral-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 2px;
}

.referral-list::-webkit-scrollbar-thumb {
    background: rgba(74, 158, 255, 0.3);
    border-radius: 2px;
}

.referral-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid rgba(74, 158, 255, 0.05);
}

.referral-item:last-child {
    margin-bottom: 0;
}

.referral-item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.referral-item-name {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
}

.referral-item-stats {
    font-size: 12px;
    color: #8a8fa3;
}

.referral-item-earnings {
    font-size: 14px;
    font-weight: 600;
    color: #4a9eff;
}

.empty-state {
    text-align: center;
    padding: 32px 16px;
    color: #8a8fa3;
}

.empty-state p {
    margin: 0 0 8px 0;
}

.empty-hint {
    font-size: 12px;
    opacity: 0.7;
}


.referral-info-section {
    background: rgba(74, 158, 255, 0.05);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(74, 158, 255, 0.1);
}

.referral-info-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 12px 0;
}

.referral-info-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.referral-info-list li {
    font-size: 13px;
    color: #8a8fa3;
    padding: 8px 0;
    border-bottom: 1px solid rgba(74, 158, 255, 0.05);
}

.referral-info-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}


@media (max-width: 480px) {
    .referral-stats-grid {
        grid-template-columns: 1fr;
    }

    .referral-link-box {
        flex-direction: column;
    }

    .copy-link-btn {
        width: 100%;
    }
}
